13 lines
No EOL
426 B
Python
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))) |