Files
OpenFUT/fifa17-recon/tools/ghidra_queries/q_gate_accessors.py
T
funman300 897259c8fb fifa17-recon: the /settings 42-flag gate, and why Seasons never asks
ENDPOINT_MAP said this class reads one key, `configs`, and that was true and
useless. What it missed is what happens after each element closes: the client
feeds the STRING VALUE of `type` back through the atom hasher and switches on
the result, 42 arms wide. A flag is a row, not a key, and the client hashes our
string itself.

Followed it to the end. FUN_18011dc50 is the only writer of the IS_* UI gate
bytes inside FutDataManagerImpl, every line is `byte = (field == 1)`, and the
constructor never touches those bytes. So a flag nobody sends is a gate nobody
opens. friendlySeasonsEnabled and enableDraftMode have never been sent by
anything, which is a mechanism for Seasons refusing while making zero requests
to any of the four servers.

The store is the control that makes this readable: IS_STORE_ENABLED is the same
kind of byte and its screen works, because storeEnabled and friends already
ship through the Blaze config store. That list has no seasons or draft flag.

Ship the gates behind FUT_SETTINGS (off/keep/gates, default gates), and
re-assert the working store flags in the same array on purpose: once a
populated array makes the applier run, it writes EVERY gate byte, so omitting
them could switch off a screen that works today.

maximumTradePileSize=100 rides along as a positive control, because a boolean
that changes nothing cannot distinguish "the flag did not help" from "the array
never reached the consumer".

check_settings_flags.py asserts each shipped name against the atom table AND
the recovered switch, since a misnamed flag is silently inert and looks exactly
like a failed fix. enableSquadBuildingSetsFeature is the reason both checks are
needed: a real atom with no arm here.

Live: 439 contract checks pass, market unit suite passes.
Not yet tested in game.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-05 12:11:20 -07:00

44 lines
2.0 KiB
Python

"""Decompile the gate accessors themselves.
The publisher calls virtuals on the object returned by the service locator:
+0x270 IS_TRADING_ENABLED +0x280 IS_STORE_ENABLED (CONTROL: works today)
+0x2b0 IS_FRIENDLY_SEASON_ENABLED +0x2b8 IS_TOURNAMENT_QUIT_ENABLED
+0x2c0 IS_PROCESSING_STATE_ENABLED +0x2c8 IS_DRAFT_MODE_ENABLED
+0x2d8 IS_STORY_MODE_REWARD_ENABLED +0x2f0 IS_RETURNING_USER_REWARDS_...
FutDataManagerImpl's ctor installs three vtables (multiple inheritance):
PTR_LAB_18021c2a0 at +0, PTR_FUN_18021cda8 at +8, PTR_LAB_18021cdb8 at +0x10.
The locator hands back one of the sub-objects, so try all three and keep whichever
resolves these slots to real functions. Reading the accessor settles what each
gate actually reads, which the field-offset arithmetic can only guess at.
"""
SLOTS = {0x270: "IS_TRADING_ENABLED", 0x280: "IS_STORE_ENABLED (CONTROL)",
0x2B0: "IS_FRIENDLY_SEASON_ENABLED", 0x2B8: "IS_TOURNAMENT_QUIT_ENABLED",
0x2C0: "IS_PROCESSING_STATE_ENABLED", 0x2C8: "IS_DRAFT_MODE_ENABLED",
0x2D8: "IS_STORY_MODE_REWARD_ENABLED", 0x2F0: "IS_RETURNING_USER_REWARDS"}
for vt in (0x18021C2A0, 0x18021CDA8, 0x18021CDB8):
print("#" * 78)
print("# vtable %#x" % vt)
print("#" * 78)
ok = 0
for off, name in sorted(SLOTS.items()):
try:
t = qword(vt + off)
except Exception as e:
print(" +%#05x %-34s <unreadable>" % (off, name))
continue
f = fm.getFunctionAt(addr(t)) if 0x180000000 <= t < 0x181000000 else None
print(" +%#05x %-34s -> %#x %s" % (off, name, t, f.getName() if f else "(not a function)"))
if f:
ok += 1
print(" resolved %d/%d" % (ok, len(SLOTS)))
if ok >= len(SLOTS) - 1:
print("\n -- accessor bodies --")
for off, name in sorted(SLOTS.items()):
t = qword(vt + off)
if fm.getFunctionAt(addr(t)):
print("\n === +%#05x %s ===" % (off, name))
print(dec(t))
print()