#!/usr/bin/env python3 """Dump CardsDLL's NULL-terminated {const char*, int} vocabulary tables from the ON-DISK PE. READ-ONLY, static. The transfer-market analysis records tradeState as decoding through a table walk at 0x180229e40 and lists sibling vocabularies (type/zone/lev/pos) as tables of the same shape. This prints the exact token spellings and their integer codes, so the accepted strings come from the client rather than from inference. """ import struct DLL = "/mnt/games/FIFA 17/CardsDLL_Win64_retail.dll" TABLES = [ (0x180229E40, "tradeState (table walk)"), (0x180229C30, "type"), (0x1802296E0, "zone"), (0x180229A60, "lev"), (0x1802295C0, "pos"), (0x180229AB0, "cat"), (0x180229880, "form"), ] MAX_ROWS = 64 pe = open(DLL, "rb").read() e_lfanew = struct.unpack_from(" off %s ===" % (name, table_va, hex(base) if base else None)) if base is None: print(" (VA did not resolve)") continue for i in range(MAX_ROWS): ptr, code = struct.unpack_from("