Replace most magic numbers from previous commit with named constants, if the constants names are known.

Instead of low 32 bits of ptr, use hash of file path for sector information.
This commit is contained in:
chss95cs@gmail.com
2023-05-01 09:32:33 -04:00
parent b270c59d0c
commit dcb98683cf
4 changed files with 18 additions and 10 deletions

View File

@@ -449,7 +449,7 @@ dword_result_t RtlImageDirectoryEntryToData_entry(dword_t Base, dword_t MappedAs
if (!nt_header) {
return 0;
}
if (nt_header->OptionalHeader.Magic != 0x10B) {
if (nt_header->OptionalHeader.Magic != IMAGE_NT_OPTIONAL_HDR32_MAGIC) {
return 0;
}
if (DirectoryEntry >= nt_header->OptionalHeader.NumberOfRvaAndSizes) {