|
const char* ImportDLLName = (const char*)BaseAddress + Descriptor->Name; |
On a protected app/program some of the Descriptor contains invalid value resulting to a crash due to access violation, seems to start with a Descriptor that is filled with zeroes (0x00)
Adding these lines should be able to prevent the crash.
const char* ImportDLLName = (const char*)BaseAddress + Descriptor->Name;
// On a packed/protected program, some of the descriptors might contains an invalid data (feels like exceeding the actual number of import descriptors), zero-filled Descriptor seems to be used as terminator.
if (!Descriptor->Name || !Descriptor->FirstThunk)
break;
DInput8HookingExample/MinimalDInput8Hook/Hook.cpp
Line 36 in b9b7e79
On a protected app/program some of the Descriptor contains invalid value resulting to a crash due to access violation, seems to start with a Descriptor that is filled with zeroes (0x00)
Adding these lines should be able to prevent the crash.