From 9a1405c828ff5f1fcdd80d67af651b960d3b29fc Mon Sep 17 00:00:00 2001 From: mkrsym1 Date: Sun, 25 Jun 2023 01:42:32 +0300 Subject: [PATCH] Use winapi types in pe.c --- game_payload/src/pe.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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;