"""Which response drives the applier: standalone GET /settings, or the settings member
of userMassInfo? Enumerate every caller of the settings deserializer FUN_18013c6d0 and,
for each, whether its completion path reaches vt+0x988.
CONTROL: FUN_180174630 (the userMassInfo deser) must appear, since it is the call site
already traced at 0x180174abb.
"""
import traceback
try:
    print("=== callers of FUN_18013c6d0 (settings deser) ===")
    for frm, typ, fn, ent in xrefs_to(0x18013c6d0):
        print("   %#x %-22s %s ent=%#x" % (frm, typ, fn, ent))
    print("\n=== callers of FUN_180173e00 (the applying callback) ===")
    for frm, typ, fn, ent in xrefs_to(0x180173e00):
        print("   %#x %-22s %s ent=%#x" % (frm, typ, fn, ent))
    print("\n=== callers of FUN_180174580 (the request builder holding that callback) ===")
    for frm, typ, fn, ent in xrefs_to(0x180174580):
        print("   %#x %-22s %s ent=%#x" % (frm, typ, fn, ent))
    print("\n=== route literals near the massinfo request ===")
    for pat in (b"userMassInfo", b"/settings", b"settings"):
        for h in find_all(pat, blocks=(".rdata",))[:6]:
            print("  %#x %r xrefs=%s" % (h, rd_str(h, 50),
                  [(hex(x[0]), x[2]) for x in xrefs_to(h)][:3]))
except Exception:
    traceback.print_exc()
