============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined nl80211_update_dh_ie() PUSH R15 MOV R15,RCX PUSH R14 MOVZX R14D,DX PUSH R13 MOV R13,RDI PUSH R12 MOV R12,RSI PUSH RBP PUSH RBX MOV RBX,R8 SUB RSP,0x10 MOVZX ECX,byte ptr [RSI + 0x1] MOVZX EDX,byte ptr [RSI] MOV RBP,qword ptr [RDI] PUSH R14 MOV EDI,0x2 MOVZX EAX,byte ptr [RSI + 0x5] PUSH RAX MOVZX EAX,byte ptr [RSI + 0x4] PUSH RAX MOVZX R9D,byte ptr [RSI + 0x3] XOR EAX,EAX MOVZX R8D,byte ptr [RSI + 0x2] LEA RSI,[.rodata:s_nl80211:_Updating_DH_IE_peer:_%0_003a7ab8] ;= "nl80211: Updating DH IE peer: %02... CALL wpa_printf ;undefined wpa_printf(undefined param... MOV ESI,dword ptr [R13 + 0x10] MOV RDI,qword ptr [R13] XOR EDX,EDX ADD RSP,0x20 MOV ECX,0x87 CALL nl80211_ifindex_msg ;undefined nl80211_ifindex_msg() MOV R13,RAX TEST RAX,RAX JZ LAB_002f5ea8 MOV RCX,R12 MOV EDX,0x6 MOV ESI,0x6 MOV RDI,RAX CALL .plt:::nla_put ;undefined nla_put() TEST EAX,EAX JNZ LAB_002f5ea8 MOV EDX,R14D MOV ESI,0x48 MOV RDI,R13 CALL .plt:::nla_put_u16 ;undefined nla_put_u16() TEST EAX,EAX JNZ LAB_002f5ea8 TEST R15,R15 JZ LAB_002f5e45 MOV RCX,R15 MOV EDX,EBX MOV ESI,0x2a MOV RDI,R13 CALL .plt:::nla_put ;undefined nla_put() TEST EAX,EAX JNZ LAB_002f5ea8 LAB_002f5e45: MOV RDI,qword ptr [RBP] SUB RSP,0x8 MOV RDX,R13 XOR R9D,R9D XOR R8D,R8D XOR ECX,ECX MOV RSI,qword ptr [RDI + 0x40] PUSH 0x0 CALL send_and_recv ;undefined send_and_recv(undefined pa... MOV R12D,EAX POP RAX POP RDX TEST R12D,R12D JNZ LAB_002f5e80 LAB_002f5e6d: ADD RSP,0x8 MOV EAX,R12D POP RBX POP RBP POP R12 POP R13 POP R14 POP R15 RET ?? 90h LAB_002f5e80: MOV EDI,R12D NEG EDI CALL .plt:::strerror ;char * strerror(int __errnum) MOV EDX,R12D MOV EDI,0x2 LEA RSI,[.rodata:s_nl80211:_update_dh_ie_failed_err_003a7b00] ;= "nl80211: update_dh_ie failed err=... MOV RCX,RAX XOR EAX,EAX CALL wpa_printf ;undefined wpa_printf(undefined param... JMP LAB_002f5e6d ?? 0Fh ?? 1Fh ?? 00h LAB_002f5ea8: MOV RDI,R13 MOV R12D,0xffffff97 CALL .plt:::nlmsg_free ;undefined nlmsg_free() JMP LAB_002f5e6d ?? 0Fh Actual src: static int nl80211_update_dh_ie(void *priv, const u8 *peer_mac, u16 reason_code, const u8 *ie, size_t ie_len) { int ret; struct nl_msg *msg; struct i802_bss *bss = priv; struct wpa_driver_nl80211_data *drv = bss->drv; wpa_printf(MSG_DEBUG, "nl80211: Updating DH IE peer: " MACSTR " reason %u", MAC2STR(peer_mac), reason_code); if (!(msg = nl80211_bss_msg(bss, 0, NL80211_CMD_UPDATE_OWE_INFO)) || nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, peer_mac) || nla_put_u16(msg, NL80211_ATTR_STATUS_CODE, reason_code) || (ie && nla_put(msg, NL80211_ATTR_IE, ie_len, ie))) { nlmsg_free(msg); return -ENOBUFS; } ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL); if (ret) { wpa_printf(MSG_DEBUG, "nl80211: update_dh_ie failed err=%d (%s)", ret, strerror(-ret)); } return ret; } Predicted src: static int put_msg(struct rte_eth_dev *dev, struct rte_eth_dev *dev, struct rte_eth_dev *dev, struct rte_eth_dev *dev) { struct rte_eth_dev *dev = dev->dev; struct rte_eth_dev *dev = dev->dev; int ret; if (!dev->dev) { return -1; } ret = rte_eth_msg(dev->dev, dev->dev, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id, dev->id); return 0; } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* TreeMap::getNumSeqs() * ;************************************************************************************************************************************************************ ;undefined getNumSeqs(TreeMap * this) ;this TreeMap * RDI MOV RAX,qword ptr [this + 0x8] SUB RAX,qword ptr [this] SAR RAX,0x5 RET ?? 0Fh Actual src: int TreeMap::getNumSeqs() { return namesOfSeqs.size(); } Predicted src: int32_t SMapMap::size() { return m_tree.size(); } ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* CFileItemList::Size() const * ;************************************************************************************************************************************************************ ;undefined Size(CFileItemList * this) ;this CFileItemLi... RDI PUSH R12 PUSH RBP LEA RBP,[this + 0x3d8] PUSH RBX MOV RBX,this MOV this,RBP CALL .plt:::pthread_mutex_lock ;int pthread_mutex_lock(pthread_mutex... MOV R12,qword ptr [RBX + 0x338] MOV this,RBP SUB R12,qword ptr [RBX + 0x330] CALL .plt:::pthread_mutex_unlock ;int pthread_mutex_unlock(pthread_mut... SAR R12,0x4 POP RBX POP RBP MOV EAX,R12D POP R12 RET ?? 0Fh ;? -> 00841f0f Actual src: int CFileItemList::Size() const { CSingleLock lock(m_lock); return (int)m_items.size(); } Predicted src: int32_t CItem::size() const { return m_size.size(); } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined startree_search() MOV R9,R8 XOR R8D,R8D JMP startree_search_for ;undefined startree_search_for() ?? 0Fh Actual src: void startree_search(const startree_t* s, const double* xyzcenter, double radius2, double** xyzresults, double** radecresults, int* nresults) { startree_search_for(s, xyzcenter, radius2, xyzresults, radecresults, NULL, nresults); } Predicted src: int search_search_search_search (const char *name, const char *name, const char *search_name) { return (search_search_search_search (name, name, NULL,search_name, NULL)); } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined op_edc0_22_ff() PUSH RBX MOV EBX,EDI MOV EDI,0x2 MOV dword ptr [.bss:OpcodeFamily],0x5d AND EBX,0x7 MOV dword ptr [.bss:CurrentInstrCycles],0x8 CALL get_word_030_prefetch ;undefined get_word_030_prefetch() MOV ESI,EAX TEST AH,0x8 JZ LAB_009bbe18 SAR AX,0x6 LEA R9,[.bss:regs] AND EAX,0x7 MOV EDX,dword ptr [R9 + RAX*0x4]=>.bss:regs MOV ECX,EDX AND ECX,0x1f LAB_009bbd46: TEST SIL,0x20 JZ LAB_009bbe00 MOV EAX,ESI AND EAX,0x7 MOV R8D,dword ptr [R9 + RAX*0x4]=>.bss:regs SUB R8D,0x1 AND R8D,0x1f ADD R8D,0x1 LAB_009bbd65: MOV EAX,dword ptr [R9 + RBX*0x4]=>.bss:regs ROL EAX,CL MOV ECX,0x20 MOV EDI,EAX SHR EAX,0x1f SUB ECX,R8D SHL EAX,0xf SHR EDI,CL MOV ECX,EAX MOV EAX,dword ptr [.bss:regflags] AND AH,0x3f OR EAX,ECX XOR ECX,ECX TEST EDI,EDI SETZ CL SHL ECX,0xe OR EAX,ECX LEA ECX,[R8 + -0x1] AND EAX,0xfffffefe MOV dword ptr [.bss:regflags],EAX MOV EAX,0x1 SHL EAX,CL TEST EAX,EAX JNZ LAB_009bbdbf JMP LAB_009bbdc3 ?? 66h f ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_009bbdb8: ADD EDX,0x1 SHR EAX,1 JZ LAB_009bbdc3 LAB_009bbdbf: TEST EDI,EAX JZ LAB_009bbdb8 LAB_009bbdc3: SAR SI,0xc MOV EAX,dword ptr [.bss:regs[188]] MOV EDI,0x4 AND ESI,0x7 MOV dword ptr [R9 + RSI*0x4]=>.bss:regs,EDX MOV dword ptr [.bss:regs[184]],EAX CALL get_word_030_prefetch ;undefined get_word_030_prefetch() ADD dword ptr [.bss:regs[64]],0x4 POP RBX MOV word ptr [.bss:regs[104]],AX MOV EAX,0x1000 RET ?? 0Fh ?? 1Fh ?? 80h ?? 00h ?? 00h ?? 00h ?? 00h LAB_009bbe00: LEA R8D,[RSI + 0x1f] AND R8D,0x1f ADD R8D,0x1 JMP LAB_009bbd65 ?? 0Fh ?? 1Fh ?? 80h ?? 00h ?? 00h ?? 00h ?? 00h LAB_009bbe18: MOV ECX,EAX LEA R9,[.bss:regs] SAR CX,0x6 AND ECX,0x1f MOV EDX,ECX JMP LAB_009bbd46 ?? 90h Actual src: uae_u32 REGPARAM2 op_edc0_22_ff(uae_u32 opcode) { int count_cycles = 0; uae_u32 real_opcode = opcode; uae_u32 dstreg = real_opcode & 7; OpcodeFamily = 93; CurrentInstrCycles = 8; uae_s16 extra = get_word_030_prefetch(2); uae_u32 bdata[2]; uae_s32 offset = extra & 0x800? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; int width = (((extra & 0x20? m68k_dreg(regs, extra & 7) : extra) - 1) & 0x1f) + 1; uae_u32 offset2 = offset; uae_u32 tmp = m68k_dreg(regs, dstreg); offset &= 0x1f; tmp = (tmp << offset) | (tmp >> (32 - offset)); bdata[0] = tmp & ((1 << (32 - width)) - 1); SET_ALWAYS_NFLG(((uae_s32)tmp) < 0? 1 : 0); tmp >>= (32 - width); SET_ZFLG(tmp == 0); SET_VFLG(0); SET_CFLG(0); { uae_u32 mask = 1 << (width - 1); while (mask) { if (tmp & mask) break; mask >>= 1; offset2++; }} m68k_dreg(regs, (extra >> 12) & 7) = offset2; ipl_fetch(); regs.irc = get_word_030_prefetch(4); m68k_incpci(4); return (1 * 4 * CYCLE_UNIT / 2 + count_cycles) * 4; } Predicted src: uae_u32 REGPARAM2 op_33f0_33_ff(uae_u32 opcode) { int count_cycles = 0; uae_u32 real_opcode = opcode; uae_u32 srcreg = (real_opcode & 7); uae_u32 dstreg = (real_opcode >> 9) & 7; OpcodeFamily = 30; CurrentInstrCycles = 12; uaecptr srca; m68k_incpci(2); srca = x_get_disp_ea_020(m68k_areg(regs, srcreg), 0); uae_s8 src = x_get_byte(srca); uaecptr dsta; dsta = m68k_areg(regs, dstreg); uae_s8 dst = m68k_areg(regs, dstreg); uae_u32 newv = ((uae_u8)(dst)) - ((uae_u8)(src)); int flgs = ((uae_s8)(src)) < 0; int flgo = ((uae_s8)(dst)) < 0; int flgn = ((uae_s8)(newv)) < 0; SET_ZFLG(((uae_s8)(newv)) == 0); SET_VFLG((flgs ^ flgo) & (flgn ^ flgo)); SET_CFLG(((uae_u8)(src)) > ((uae_u8)(dst))); COPY_CARRY(); SET_NFLG(flgn!= 0); ipl_fetch(); regs.irc = get_word_030_prefetch(4); x_put_byte(dsta, newv); return (2 * 4 * CYCLE_UNIT / 2 + count_cycles) * 4; }