diff --git a/game_payload/src/pe.c b/game_payload/src/pe.c index f0e6c91..86f3e43 100644 --- a/game_payload/src/pe.c +++ b/game_payload/src/pe.c @@ -1,5 +1,3 @@ -#include - #include void pe_find_section(HMODULE module, const char *section, MEMORY_BASIC_INFORMATION *buf) { @@ -8,11 +6,11 @@ void pe_find_section(HMODULE module, const char *section, MEMORY_BASIC_INFORMATI IMAGE_DOS_HEADER* dosHeader = (IMAGE_DOS_HEADER*)module; IMAGE_NT_HEADERS64* ntHeaders = (IMAGE_NT_HEADERS64*)(cModule + dosHeader->e_lfanew); - uint16_t sectionCount = ntHeaders->FileHeader.NumberOfSections; + WORD sectionCount = ntHeaders->FileHeader.NumberOfSections; IMAGE_SECTION_HEADER* sectionHeader = (IMAGE_SECTION_HEADER*)(ntHeaders + 1); void* targetAddress = 0x0; - for (uint16_t i = 0; i < sectionCount; i++) { + for (WORD i = 0; i < sectionCount; i++) { if (strncmp((char*)sectionHeader->Name, section, 8) == 0) { targetAddress = (void*)(cModule + sectionHeader->VirtualAddress); break;