dccloader/tools/dis2has.py
wrapper 6713c84666
All checks were successful
ci/woodpecker/push/msm6050 Pipeline was successful
new context reader, remove platform specific memory routines
2026-08-01 21:20:30 +07:00

13 lines
No EOL
426 B
Python

import re
import sys
import struct
if __name__ == "__main__":
outFile = open(sys.argv[2], "wb")
for l in open(sys.argv[1], "r"):
#print(l.rstrip())
p = re.search(r"([0-9-]*) \(([\S]*)\): ([\S]*) = ([\S]*)", l.rstrip())
#print(l.rstrip())
if not p: continue
outFile.write(struct.pack("<LLL", int(p[1]) ^ 0xffffffff, int(p[3], 16), int(p[4], 16)))