Skip to content

Crashing when used on a protected app/game #2

@anr2me

Description

@anr2me

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions