"""Trace active draft-state enum literals and the current-state response consumers."""

for literal in ("DRAFTSQUAD_ON", "DRAFTSQUAD_OFF", "DRAFT_SQUAD", "squadState",
                "stateParam1", "stateParam2", "roundsInfo"):
    print("\n=== LITERAL", literal, "===")
    for hit in find_all(literal.encode() + b"\x00", (".rdata", ".data")):
        print("HIT", hex(hit), "XREFS", xrefs_to(hit)[:100])
        for _frm, _typ, _name, entry in xrefs_to(hit):
            print("\n--- XREF FUNCTION", hex(entry), fname(entry), "---")
            print(dec(entry, 500))

for target in (0x180147070,):
    print("\n=== STATE DESERIALIZER", hex(target), fname(target), "===")
    print(dec(target, 500))
    print("CALLERS", callers(target))

print("QUERY_DONE")
