Ghidra 12.2 project and full dump of isaac-ng.exe v1.9.7.17, query scripts, notes indexed by entity, anm2/rooms reimplementations, and db/ (names + fields) that build.sh re-applies. Fixes awk numeric address comparison in find.sh/decompile.sh. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
14 lines
654 B
Python
14 lines
654 B
Python
"""consts.py ADDR...: the float at each address of the decompiled exe."""
|
|
import struct, sys
|
|
d = open('decomp/bin/isaac-ng.exe', 'rb').read()
|
|
pe = struct.unpack_from('<I', d, 0x3c)[0]; n = struct.unpack_from('<H', d, pe + 6)[0]; opt = struct.unpack_from('<H', d, pe + 20)[0]
|
|
secs = []
|
|
for i in range(n):
|
|
o = pe + 24 + opt + i * 40; vs, va, rs, ro = struct.unpack_from('<IIII', d, o + 8); secs.append((0x400000 + va, max(vs, rs), ro))
|
|
def rd(v):
|
|
for va, sz, ro in secs:
|
|
if va <= v < va + sz: return ro + v - va
|
|
for a in sys.argv[1:]:
|
|
o = rd(int(a, 16))
|
|
print(a, struct.unpack_from('<f', d, o)[0], d[o:o + 32].split(b'\0')[0][:30])
|