============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined op_d060_21_ff() PUSH R14 PUSH R13 PUSH R12 LEA R12,[.bss:regs] PUSH RBP MOV EBP,EDI AND EDI,0x7 LEA R14,[R12 + RDI*0x4 + 0x20] PUSH RBX SHR EBP,0x9 MOV dword ptr [.bss:OpcodeFamily],0xb MOV EAX,dword ptr [R14]=>.bss:regs[32] AND EBP,0x7 LEA R13D,[RAX + -0x2] MOV EDI,R13D CALL qword ptr [.bss:x_get_word] MOV dword ptr [R14],R13D=>.bss:regs[32] MOV EDI,0x2 MOV R13D,dword ptr [R12 + RBP*0x4]=>.bss:regs MOV EBX,EAX MOV EAX,dword ptr [.bss:regs[188]] MOV dword ptr [.bss:regs[184]],EAX CALL get_word_ce020_prefetch_opcode ;undefined get_word_ce020_prefetch_op... MOVZX EDX,R13W XOR ECX,ECX MOV word ptr [.bss:regs[104]],AX MOVZX EAX,BX ADD EDX,EAX MOV EAX,R13D ADD AX,BX MOV EAX,dword ptr [.bss:regflags] MOV word ptr [R12 + RBP*0x4]=>.bss:regs,DX SETC CL XOR ESI,ESI TEST DX,DX SETZ SIL XOR R13D,EDX XOR EBX,EDX AND EAX,0xffffbffe AND EBX,R13D SHL ESI,0xe AND ECX,0x1 ADD dword ptr [.bss:regs[64]],0x2 MOVSX EBX,BX OR EAX,ESI SHL ECX,0x8 SHR EBX,0x1f OR EAX,EBX POP RBX POP RBP AND AH,0xfe POP R12 POP R13 OR EAX,ECX POP R14 MOV ECX,EAX AND AH,0x7f SHR ECX,0x8 MOV dword ptr [.bss:regflags+4],ECX MOV ECX,EDX AND ECX,0x8000 OR EAX,ECX MOV dword ptr [.bss:regflags],EAX RET ?? 66h f Actual src: void REGPARAM2 op_d060_21_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 = 11; /* ea H:2,T:2,C:0 fea */ uaecptr srca; srca = m68k_areg(regs, srcreg) - 2; uae_s16 src = x_get_word(srca); m68k_areg(regs, srcreg) = srca; uae_s16 dst = m68k_dreg(regs, dstreg); ipl_fetch(); regs.irc = get_word_ce020_prefetch_opcode(2); /* OP zero */ uae_u32 newv = ((uae_u16)(dst)) + ((uae_u16)(src)); int flgs = ((uae_s16)(src)) < 0; int flgo = ((uae_s16)(dst)) < 0; int flgn = ((uae_s16)(newv)) < 0; SET_ZFLG(((uae_s16)(newv)) == 0); SET_VFLG((flgs ^ flgn) & (flgo ^ flgn)); SET_CFLG(((uae_u16)(~dst)) < ((uae_u16)(src))); COPY_CARRY(); SET_NFLG(flgn!= 0); m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); m68k_incpci(2); return; } Predicted src: void REGPARAM2 op_23b8_23_ff(uae_u32 opcode) { int count_cycles = 0; uae_u32 real_opcode = opcode; uae_u32 srcreg = (real_opcode & 7); OpcodeFamily = 59; /* ea H:2,T:0,C:0 fea */ uaecptr srca; srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_word_ce020_prefetch(2); uae_s8 src = x_get_byte(srca); ipl_fetch(); regs.irc = get_word_ce020_prefetch_opcode(4); /* OP zero */ 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 ^ flgn) & (flgn ^ flgo)); SET_CFLG(((uae_u8)(src)) > ((uae_u8)(dst))); COPY_CARRY(); SET_NFLG(flgn!= 0); x_put_byte(srca, newv); m68k_incpci(4); return; } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined smime_free_privacydata() PUSH RBP MOV RBP,RDI MOV RDI,qword ptr [RDI + 0x18] CALL .plt:::gpgme_release ;undefined gpgme_release() MOV RDI,RBP POP RBP JMP .plt:::g_free ;undefined g_free() ?? 66h f Actual src: static void smime_free_privacydata(PrivacyData *_data) { PrivacyDataPGP *data = (PrivacyDataPGP *) _data; gpgme_release(data->ctx); g_free(data); } Predicted src: static void data_release_data (gpointer data) { g_free (data->data); g_free (data); } ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined LzmaEnc_SetProps() ;local_10 undefined8 -10 ;local_18 undefined8 -18 ;local_28 undefined1[16] -28 ;local_38 undefined1[16] -38 ; 00128944 ;local_48 undefined1[16] -48 PUSH RBX MOV RBX,RDI SUB RSP,0x40 MOVDQU XMM0,xmmword ptr [RSI] MOVDQU XMM1,xmmword ptr [RSI + 0x10] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + local_10+0x48],RAX XOR EAX,EAX MOVDQU XMM2,xmmword ptr [RSI + 0x20] MOV RAX,qword ptr [RSI + 0x30] MOV RDI,RSP MOVAPS xmmword ptr [RSP]=>local_48,XMM0 MOV qword ptr [RSP + local_18+0x48],RAX MOVAPS xmmword ptr [RSP + local_38[0]+0x48],XMM1 MOVAPS xmmword ptr [RSP + local_28[0]+0x48],XMM2 CALL LzmaEncProps_Normalize ;undefined LzmaEncProps_Normalize() CMP dword ptr [RSP + local_38[0]+0x48],0x8 MOV EAX,0x5 JG LAB_001289d0 CMP dword ptr [RSP + local_38[4]+0x48],0x4 MOV RSI,qword ptr [RSP + local_38[0]+0x48] JG LAB_001289d0 MOV EDX,dword ptr [RSP + local_38[8]+0x48] CMP EDX,0x4 JG LAB_001289d0 MOV ECX,dword ptr [RSP + local_48[4]+0x48] CMP ECX,0x60000000 JA LAB_001289d0 MOV EAX,dword ptr [RSP + local_28[0]+0x48] MOV dword ptr [RBX + 0xac],ECX MOV ECX,0x111 MOV dword ptr [RBX + 0x68],EDX MOV EDX,dword ptr [RSP + local_38[12]+0x48] CMP EAX,ECX MOV qword ptr [RBX + 0x60],RSI CMOVA EAX,ECX MOV ECX,0x5 CMP EAX,ECX CMOVC EAX,ECX MOV ECX,dword ptr [RSP + local_28[4]+0x48] MOV dword ptr [RBX + 0x44],EAX XOR EAX,EAX TEST EDX,EDX SETZ AL MOV dword ptr [RBX + 0x80],EAX TEST ECX,ECX JZ LAB_00128998 MOV EDX,dword ptr [RSP + local_28[8]+0x48] MOV byte ptr [RBX + 0x701],0x1 MOV EAX,0x2 CMP EDX,0x1 JLE LAB_001289a4 CMP EDX,0x3 MOV EAX,0x4 CMOVLE EAX,EDX JMP LAB_001289a4 ?? 0Fh ?? 1Fh ?? 00h LAB_00128998: MOV byte ptr [RBX + 0x701],0x0 MOV EAX,0x4 LAB_001289a4: MOV dword ptr [RBX + 0x73c],EAX MOV EAX,dword ptr [RSP + local_28[12]+0x48] MOV dword ptr [RBX + 0x71c],EAX MOV EAX,dword ptr [RSP + local_18+0x48] MOV dword ptr [RBX + 0x84],EAX XOR EAX,EAX CMP dword ptr [RSP + local_18+0x4c],0x1 SETG AL MOV dword ptr [RBX + 0x8c],EAX XOR EAX,EAX LAB_001289d0: MOV RDX,qword ptr [RSP + local_10+0x48] SUB RDX,qword ptr FS:[0x28] JNZ LAB_001289e6 ADD RSP,0x40 POP RBX RET LAB_001289e6: CALL .plt:::__stack_chk_fail ;undefined __stack_chk_fail() NOP dword ptr [RAX + RAX*0x1] Actual src: SRes LzmaEnc_SetProps(CLzmaEncHandle pp, const CLzmaEncProps *props2) { CLzmaEnc *p = (CLzmaEnc *)pp; CLzmaEncProps props = *props2; LzmaEncProps_Normalize(&props); if (props.lc > LZMA_LC_MAX || props.lp > LZMA_LP_MAX || props.pb > LZMA_PB_MAX || props.dictSize > ((UInt64)1 << kDicLogSizeMaxCompress) || props.dictSize > kMaxHistorySize) return SZ_ERROR_PARAM; p->dictSize = props.dictSize; { unsigned fb = props.fb; if (fb < 5) fb = 5; if (fb > LZMA_MATCH_LEN_MAX) fb = LZMA_MATCH_LEN_MAX; p->numFastBytes = fb; } p->lc = props.lc; p->lp = props.lp; p->pb = props.pb; p->fastMode = (props.algo == 0); p->matchFinderBase.btMode = (Byte)(props.btMode? 1 : 0); { UInt32 numHashBytes = 4; if (props.btMode) { if (props.numHashBytes < 2) numHashBytes = 2; else if (props.numHashBytes < 4) numHashBytes = props.numHashBytes; } p->matchFinderBase.numHashBytes = numHashBytes; } p->matchFinderBase.cutValue = props.mc; p->writeEndMark = props.writeEndMark; #ifndef _7ZIP_ST /* if (newMultiThread!= _multiThread) { ReleaseMatchFinder(); _multiThread = newMultiThread; } */ p->multiThread = (props.numThreads > 1); #endif return SZ_OK; } Predicted src: static int __pm_SetChar(struct rte_eth_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; struct rte_eth_dev *dev = dev->dev; struct rte_eth_dev *dev = dev->dev; struct rte_eth_dev *dev = dev->dev; dev->dev = dev->dev; dev->dev = dev->dev; dev->dev = dev->dev; dev->dev = dev->dev; dev->dev = dev->dev; dev->dev = dev->dev; dev->dev = dev->dev; dev->dev = dev->dev; dev->dev = dev->dev; dev->dev = dev->dev; return 0; } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* SurfaceGui::TaskGeomFillSurface::accept() * ;************************************************************************************************************************************************************ ;undefined accept(void) MOV RDI,qword ptr [RDI + 0x58] JMP .plt:LAB_00129b10 ?? 90h Actual src: bool TaskGeomFillSurface::accept() { return widget->accept(); } Predicted src: int main() { return (int)0; } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* TitanLoggerApi::TitanLogEvent_sourceInfo__list_template::list_item(unsigned int) * ;************************************************************************************************************************************************************ ;undefined list_item(TitanLogEvent_sourceInfo__list_template * this, uint param_1) ;this TitanLogEve... RDI ;param_1 uint ESI SUB RSP,0x8 MOV EAX,dword ptr [this] LEA EDX,[RAX + -0x4] CMP EDX,0x1 JBE LAB_001cda43 CMP EAX,0xb JNZ LAB_001cda62 LAB_001cda43: CMP dword ptr [this + 0x28],param_1 JBE LAB_001cda70 MOV param_1,param_1 MOV RDX,qword ptr [this + 0x30] ADD RSP,0x8 LEA RAX,[param_1*0x8] SUB RAX,param_1 LEA RAX,[RDX + RAX*0x8] RET LAB_001cda62: LEA this,[.rodata:s_Internal_error:_Accessing_a_list_004d47a0] ;= "Internal error: Accessing a list... XOR EAX,EAX CALL TTCN_error ;undefined TTCN_error(char * param_1,... LAB_001cda70: LEA this,[.rodata:s_Internal_error:_Index_overflow_i_004d4818] ;= "Internal error: Index overflow in... XOR EAX,EAX CALL TTCN_error ;undefined TTCN_error(char * param_1,... NOP Actual src: TitanLogEvent_sourceInfo__list_template& TitanLogEvent_sourceInfo__list_template::list_item(unsigned int list_index) { if (template_selection!= VALUE_LIST && template_selection!= COMPLEMENTED_LIST && template_selection!= CONJUNCTION_MATCH) TTCN_error("Internal error: Accessing a list element of a non-list template of type @TitanLoggerApi.TitanLogEvent.sourceInfo_list."); if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of type @TitanLoggerApi.TitanLogEvent.sourceInfo_list."); return value_list.list_value[list_index]; } Predicted src: boolean PREGEN__RECORD_template::list_item_list_item_template::list_item() const { if (template_selection!= SPECIFIC_VALUE) TTCN_error("Accessing a non-list.list_item_list.list_item"); if (template_selection!= SPECIFIC_VALUE) TTCN_error("Accessing a non-list.list_item.list_item_list.list_item"); if (template_selection!= SPECIFIC_VALUE) TTCN_error("Accessing a non-list.list_item.list_item_list.list_item"); return TRUE; }