# 执行原ARM编解码;只有libm调用用显式f32替身。不是速度或游戏停止判据。 # Executes the original ARM codec; only libm calls use explicit f32 stand-ins. Not a criterion for speed or for the game stopping. import math, struct, hashlib, sys from pathlib import Path from unicorn import Uc, UC_ARCH_ARM64, UC_MODE_ARM, UC_HOOK_CODE from unicorn.arm64_const import * P=Path(sys.argv[1]) if len(sys.argv)>1 else Path(__file__).with_name('build')/'main.orig.bin' b=P.read_bytes(); u=Uc(UC_ARCH_ARM64,UC_MODE_ARM) u.mem_map(0,0x4000000); u.mem_write(0,b) u.mem_map(0x7000000,0x20000) STOP,VEC,OUT,AMP,FLAG=0x7000000,0x7001000,0x7002000,0x7002010,0x7002020 bits=lambda v:struct.unpack('