"""Map the sole live category-notifier listener into CardsDLL.

Live capture 2026-08-07:
  listener object  0x4216ca48
  listener vtable  0x6ffffc20d6d0
  vtable +0x08     0x6ffffc1e577a
  CardsDLL slide   0x6ffe7c020000
  static method    0x1801c577a
"""

TARGET = 0x1801C577A
VTABLE = 0x1801ED6D0

print("=== live notifier listener method ===")
target_function = func(TARGET)
if target_function is None:
    print("no Ghidra function at %#x" % TARGET)
    print("raw PE decoding: jmp [0x1801e5200], imported CRT _purecall")
else:
    print("containing function:", target_function.getName(),
          hex(int(target_function.getEntryPoint().getOffset())))
    print(dec(TARGET))

print("\n=== listener vtable ===")
for slot, target, name in vtable(VTABLE, 12):
    print("%+#04x  %#x  %s" % (slot, target, name))

print("\n=== method callers/xrefs ===")
print("callers:", callers(TARGET) if target_function is not None else [])
for row in xrefs_to(TARGET):
    print(row)
