mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-22 15:51:16 +00:00
Read the addresses in the exe headers as little endian
This commit is contained in:
parent
3d7b08e3e6
commit
4b69132082
@ -76,15 +76,15 @@ def __init__(self, filename):
|
|||||||
|
|
||||||
# Read ImageBase
|
# Read ImageBase
|
||||||
self.file.seek(0xB4)
|
self.file.seek(0xB4)
|
||||||
self.imagebase = struct.unpack('i', self.file.read(4))[0]
|
self.imagebase, = struct.unpack('<i', self.file.read(4))
|
||||||
|
|
||||||
# Read .text VirtualAddress
|
# Read .text VirtualAddress
|
||||||
self.file.seek(0x184)
|
self.file.seek(0x184)
|
||||||
self.textvirt = struct.unpack('i', self.file.read(4))[0]
|
self.textvirt, = struct.unpack('<i', self.file.read(4))
|
||||||
|
|
||||||
# Read .text PointerToRawData
|
# Read .text PointerToRawData
|
||||||
self.file.seek(0x18C)
|
self.file.seek(0x18C)
|
||||||
self.textraw = struct.unpack('i', self.file.read(4))[0]
|
self.textraw, = struct.unpack('<i', self.file.read(4))
|
||||||
logger.debug('... Parsing finished')
|
logger.debug('... Parsing finished')
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user