diff --git a/src/loader.cpp b/src/loader.cpp index ea6e69c..f5509b7 100644 --- a/src/loader.cpp +++ b/src/loader.cpp @@ -678,7 +678,11 @@ bool wibo::Executable::resolveImports() { while (dir->name) { char *dllName = fromRVA(dir->name); DEBUG_LOG("DLL Name: %s\n", dllName); - uint32_t *lookupTable = fromRVA(dir->importLookupTable); + + // Older PEs (NT 3.5-era) omit the ILT and only ship the IAT, which + // on disk holds the hint/name RVAs that later get overwritten. + uint32_t iltRVA = dir->importLookupTable ? dir->importLookupTable : dir->importAddressTable; + uint32_t *lookupTable = fromRVA(iltRVA); uint32_t *addressTable = fromRVA(dir->importAddressTable); ModuleInfo *module = loadModule(dllName);