Files
Thomas MartinandClaude Opus 5.5 0cfd512cf4 Add disc extractor, reverse-engineering tools and feasibility audit
- tools/extract.py: pure-Python extractor for SLES-54645 (ISO9660, SLZ chains,
  SLE decryption, module/overlay export with ELF segment validation, IRX, index)
- tools/slz.py: tri-Ace SLZ types 0-3 and SLE decryption, reimplemented from
  the game's own routines
- scripts/, ghidra_scripts/: exploration scripts used during the audit
- toolchain/Dockerfile: analysis container (binutils MIPS, Python)
- docs/AUDIT.md: phase 1 and 2 feasibility audit (GO for static recompilation)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 18:57:22 +02:00

17 lines
637 B
Python

"""Hexdump bytes of the main ELF at virtual addresses. Usage: read_vaddr.py <addr> <len> [<addr> <len> ...]"""
import sys
ELF = "/work/extracted/SLES_546.45"
BASE, OFF = 0x100000, 0x2E00 # main PT_LOAD vaddr / file offset
data = open(ELF, "rb").read()
args = sys.argv[1:]
for a, n in zip(args[::2], args[1::2]):
va, n = int(a, 16), int(n, 0)
buf = data[va - BASE + OFF:va - BASE + OFF + n]
print(f"--- 0x{va:x}")
for i in range(0, len(buf), 16):
c = buf[i:i + 16]
print(f"{va + i:08x} " + " ".join(f"{b:02x}" for b in c).ljust(48)
+ "".join(chr(b) if 32 <= b < 127 else "." for b in c))