import sys
sys.path.insert(0,'/tmp/claude-0/-root-ants/f0a0d69c-fbe4-4887-8c0d-a5302a0da398/scratchpad')
from thumb import *
def find_type(name):
    for i,t in enumerate(TYPES):
        ns,nm=S(t[1]),S(t[0]); full=(ns+'.' if ns else '')+nm
        if full==name: return i
def show(typename, only=None, maxs=20):
    ti=find_type(typename)
    if ti is None: print('!! not found',typename); return
    t=TYPES[ti]; ms,mc=t[13],t[20]
    print('\n########## %s ##########'%typename)
    for k in range(mc):
        m=METHODS[ms+k]; nm=S(m[0])
        if only and not any(o.lower() in nm.lower() for o in only): continue
        a=method_addr(m[6]); sz=fn_size(a)
        ls=method_lits(a,sz)
        print('  %s  @0x%x (%d bytes)'%(nm,a,sz))
        for s in ls[:maxs]: print('        %r'%s[:120])
show('FE.DevOptions',['GrantGold','GrantCash','ForceUpgrade','ServerMaintenance','ResetUser'])
