"""BATCH 8: the two GUID-returning stubs are undefined functions. Read them as raw instructions and find the vtable that holds them. CONTROL: both stubs must decode to 'mov eax, ; ret' -- if they do not, my reading of them as interface-id getters is wrong and I say so.""" import traceback, struct OUT = "/tmp/claude-1000/-home-alex-Documents-OpenFUT/8e521ca1-ca3e-4138-bb96-df1744dd1d30/scratchpad/cards/adv2/q8_raw.txt" try: f = open(OUT, "w") def P(*a): f.write(" ".join(str(x) for x in a) + "\n") for lo, hi in ((0x1800E1650, 0x1800E1690), (0x180113F40, 0x180113F80)): P("### raw %#x..%#x" % (lo, hi)) P(" bytes:", read_bytes(lo, hi - lo).hex()) it = listing.getInstructions(addr(lo), True) while it.hasNext(): i = it.next() a = int(i.getAddress().getOffset()) if a >= hi: break P(" %#x %s" % (a, i)) P() for cand in (0x1800E1660, 0x180113F50, 0x180113F4C, 0x180113F40): hits = find_all(struct.pack("