implement relocation in GetPE32DataW

This commit is contained in:
Duncan Ogilvie 2017-12-13 04:59:11 +01:00
parent 8b4d39653e
commit 2e835e23ff
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
1 changed files with 4 additions and 0 deletions

View File

@ -594,6 +594,10 @@ public:
return WhichSection < sections.size() ? ULONG_PTR(&sections.at(WhichSection).GetHeader().Name[0]) : 0;
case UE_IMAGEBASE:
return headers->OptionalHeader.ImageBase;
case UE_RELOCATIONTABLEADDRESS:
return headers->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress;
case UE_RELOCATIONTABLESIZE:
return headers->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].Size;
default:
__debugbreak();
}