import pickle,struct,bisect,sys from capstone import * img=open('sdk.bin','rb').read();md=Cs(CS_ARCH_ARM64,CS_MODE_ARM);md.detail=True syms=pickle.load(open('sdk_syms.pkl','rb')) funcs=sorted((v,k) for k,(v,s) in syms.items() if v<0x58d930) addrs=[f[0] for f in funcs] def fname(a): i=bisect.bisect_right(addrs,a)-1; return f'{funcs[i][1]}+{a-funcs[i][0]:#x}' m=struct.unpack_from('>32 nm=struct.unpack_from('>26==0x25 or w>>26==0x05: tgt=o+(((w&0x3ffffff)^0x2000000)-0x2000000)*4 if tgt in want: print('call',want[tgt],'from',fname(o)) pickle.dump(plt,open('sdk_plt.pkl','wb'))