Files
OpenFUT/fifa17-recon/tools/ghidra_queries/q_md_seasons_9.py
T

24 lines
981 B
Python

"""q9: do FUN_18006ac20 / FUN_180105c90 / FUN_180057b00 WRITE (push/clear) the season
vector, or only READ it? Confirms the SeasonList deser is the sole populator.
Signature of a writer: assigns plVar[1] (size) or calls a push/grow (FUN_180166e00 /
FUN_180050a00) after the +0x898 getter. A reader only iterates *plVar..plVar[1].
"""
import traceback
try:
for a in (0x18006ac20, 0x180105c90, 0x180057b00):
d = dec(a)
# find the region around the +0x898 call
i = d.find("0x898")
seg = d[max(0,i-200):i+500] if i >= 0 else d[:600]
writes = ("166e00" in d) or ("180050a00" in d) or ("0512f0" in d and "[1] = " in d)
print("=" * 60, hex(a), "LEN", len(d))
print(" push(166e00)?", "180166e00" in d, " copy(50a00)?", "180050a00" in d,
" clear(512f0)?", "1800512f0" in d)
print(seg)
sys.stdout.flush()
os._exit(0)
except Exception:
traceback.print_exc()
sys.stdout.flush()
os._exit(0)