Merge noimportexport into main #1

Merged
Aiden-Isik merged 2 commits from noimportexport into main 2024-12-30 16:14:10 +00:00
Showing only changes of commit 41f0e70a79 - Show all commits

View file

@ -152,15 +152,15 @@ int getSectionRwxFlags(FILE *pe, struct sections *sections)
int getHdrData(FILE *pe, struct peData *peData, uint8_t flags)
{
// Get header data required for ANY XEX
// PE size
struct stat peStat;
fstat(fileno(pe), &peStat);
peData->size = peStat.st_size;
// Getting PE header offset before we go any further..
fseek(pe, 0x3C, SEEK_SET);
uint32_t peOffset = get32BitFromPE(pe);
// PE size
fseek(pe, peOffset + 0x50, SEEK_SET);
peData->size = get32BitFromPE(pe);
// Base address
fseek(pe, peOffset + 0x34, SEEK_SET);
peData->baseAddr = get32BitFromPE(pe);