Read section info from PE header (#311)

* Read section info from PE header

* Remove the need for textraw and textvirt members

* typo
This commit is contained in:
MS
2023-12-06 14:30:09 -05:00
committed by GitHub
parent a7b81539b1
commit b46801a774
3 changed files with 181 additions and 27 deletions

View File

@@ -86,7 +86,7 @@ def sanitize(file, placeholder_generator, mnemonic, op_str):
for i, word in enumerate(words):
try:
inttest = int(word, 16)
if inttest >= file.imagebase + file.textvirt:
if inttest >= file.get_section_offset_by_index(1):
words[i] = placeholder_generator.get(inttest)
except ValueError:
pass