"""Q18: FUN_1800fed90 -- a switch whose case set is EXACTLY {0x91..0x96}. Q17's case-label enumeration (control passed on FUN_1800d8330) found exactly one function whose switch discriminates the six high club subtypes and nothing else: FUN_1800fed90. If 0x91..0x96 are trophies, this is where each one is turned into a concrete thing, and the six arms should be distinguishable. Also decompile FUN_1800f4bc0 and FUN_1800f2f70 (case sets 0xa..0x14, i.e. they distinguish 10 and 11, the other two cardtype-7 subtypes) and FUN_1800d8260 / FUN_1800d86c0 / FUN_1800d8b50 (small enum->string helpers next to the classifier). CONTROL: FUN_1800d8b50 is called by the club URL builder FUN_18012ddf0 to render a value for query key atom 0x243; it should decompile to a code->string table, which is a known shape. If it comes out as something else, my reading of the URL builder is wrong. """ import traceback try: for a in (0x1800FED90, 0x1800F4BC0, 0x1800F2F70, 0x1800D8260, 0x1800D86C0, 0x1800D8B50): src = dec(a) print("=" * 78) print("FUN_%x len=%d" % (a, len(src))) print(src if len(src) < 9000 else src[:9000] + "\n...[cut at 9000, len above]") print("=" * 78) print("=== callers ===") for a in (0x1800FED90, 0x1800F4BC0): print(" callers of %#x:" % a) for frm, typ, fn, ent in xrefs_to(a): print(" %s(%#x) via %#x %s" % (fn, ent, frm, typ)) except Exception: traceback.print_exc()