============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined op_907a_33_ff() MOV EAX,dword ptr [.bss:regs[64]] PUSH R12 SHR EDI,0x9 PUSH RBP AND EDI,0x7 PUSH RBX LEA R12D,[RAX + 0x2] MOV EBP,EDI LEA RBX,[.bss:regs] MOV dword ptr [.bss:OpcodeFamily],0x7 MOV EDI,R12D MOV dword ptr [.bss:CurrentInstrCycles],0xc CALL mmu_get_iword.constprop.0 ;undefined mmu_get_iword.constprop.0() MOVSX EDI,AX ADD EDI,R12D CALL uae_mmu060_get_word ;undefined uae_mmu060_get_word() MOV EDI,EBP XOR ESI,ESI MOV EDX,dword ptr [RBX + RDI*0x4]=>.bss:regs MOV R8D,EAX MOVZX EAX,AX MOV R9D,R8D MOVZX ECX,DX SUB ECX,EAX MOV EAX,dword ptr [.bss:regflags] SETZ SIL XOR R9D,EDX SHL ESI,0xe AND EAX,0xffffbffe OR EAX,ESI MOV ESI,EDX XOR ESI,ECX AND ESI,R9D MOVSX ESI,SI SHR ESI,0x1f OR EAX,ESI XOR ESI,ESI AND AH,0xfe CMP R8W,DX SETA SIL XOR DX,DX ADD dword ptr [.bss:regs[64]],0x4 SHL ESI,0x8 OR EAX,ESI MOV ESI,EAX AND AH,0x7f SHR ESI,0x8 MOV dword ptr [.bss:regflags+4],ESI MOV ESI,ECX MOVZX ECX,CX AND ESI,0x8000 OR EDX,ECX OR EAX,ESI MOV dword ptr [RBX + RDI*0x4]=>.bss:regs,EDX POP RBX MOV dword ptr [.bss:regflags],EAX POP RBP MOV EAX,0x1000 POP R12 RET ?? 0Fh Actual src: uae_u32 REGPARAM2 op_907a_33_ff(uae_u32 opcode) { int count_cycles = 0; uae_u32 real_opcode = opcode; uae_u32 dstreg = (real_opcode >> 9) & 7; OpcodeFamily = 7; CurrentInstrCycles = 12; uaecptr srca; srca = m68k_getpci() + 2; srca += (uae_s32)(uae_s16)get_iword_mmu060(2); uae_s16 src = get_word_mmu060(srca); uae_s16 dst = m68k_dreg(regs, dstreg); 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 ^ flgo) & (flgn ^ flgo)); SET_CFLG(((uae_u16)(src)) > ((uae_u16)(dst))); COPY_CARRY(); SET_NFLG(flgn!= 0); m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); m68k_incpci(4); return (1 * 4 * CYCLE_UNIT / 2 + count_cycles) * 4; } Predicted src: uae_u32 REGPARAM2 op_0f0_0_ff(uae_u32 opcode) { int count_cycles = 0; uae_u32 real_opcode = opcode; uae_u32 srcreg = (real_opcode & 7); OpcodeFamily = 59; CurrentInstrCycles = 12; uaecptr srca; srca = m68k_areg(regs, srcreg); uae_s16 src = get_word_mmu040(srca); uae_s16 dst = m68k_areg(regs, dstreg); uae_s16 dst = m68k_areg(regs, dstreg); uae_u32 newv = ((uae_u16)(dst)) - ((uae_u16)(src)); int flgs = ((uae_s16)(src)) < 0; int flgn = ((uae_s16)(newv)) < 0; SET_ZFLG(((uae_s16)(newv)) == 0); SET_VFLG((flgs ^ flgn) & (flgn ^ flgo)); SET_CFLG(((uae_u16)(src)) > ((uae_u16)(dst))); COPY_CARRY(); SET_NFLG(flgn!= 0); m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xffff); m68k_incpci(2); return (2 * CYCLE_UNIT / 2 + count_cycles) | (((2 * CYCLE_UNIT / 2 + count_cycles) * 4) * CYCLE_UNIT / 2 + count_cycles) * 4) << 16); } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined xxmc_unlock_surfaces() PUSH RBP LEA RBP,[RDI + 0x1470] PUSH RBX MOV RBX,RDI MOV RDI,RBP SUB RSP,0x8 CALL .plt:::pthread_mutex_lock ;int pthread_mutex_lock(pthread_mutex... MOV EAX,dword ptr [RBX + 0x14c8] TEST EAX,EAX JLE LAB_0010628d SUB EAX,0x1 MOV dword ptr [RBX + 0x14c8],EAX JZ LAB_001062a0 LAB_0010628d: ADD RSP,0x8 MOV RDI,RBP POP RBX POP RBP JMP .plt:::pthread_mutex_unlock ;int pthread_mutex_unlock(pthread_mut... ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_001062a0: LEA RDI,[RBX + 0x1498] CALL .plt:::pthread_cond_broadcast ;int pthread_cond_broadcast(pthread_c... ADD RSP,0x8 MOV RDI,RBP POP RBX POP RBP JMP .plt:::pthread_mutex_unlock ;int pthread_mutex_unlock(pthread_mut... ?? 66h f Actual src: static void xxmc_unlock_surfaces(vo_driver_t *this_gen) { xxmc_driver_t *driver = (xxmc_driver_t *) this_gen; xvmc_context_reader_unlock( &driver->xvmc_lock ); } Predicted src: void x11_mutex_lock(x11_mutex_t *mutex) { pthread_mutex_lock(&mutex->mutex); pthread_mutex_unlock(&mutex->mutex); pthread_mutex_unlock(&mutex->mutex); pthread_mutex_unlock(&mutex->mutex); } ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined hc_AES_decrypt_key() PUSH RBX MOV RBX,RDX MOV EDX,ESI MOV RSI,RDI MOV RDI,RBX CALL _hc_rijndaelKeySetupDec ;undefined _hc_rijndaelKeySetupDec() CMP EAX,0x1 MOV dword ptr [RBX + 0xf0],EAX POP RBX SBB EAX,EAX RET ?? 66h f Actual src: int AES_set_decrypt_key(const unsigned char *userkey, const int bits, AES_KEY *key) { key->rounds = rijndaelKeySetupDec(key->key, userkey, bits); if (key->rounds == 0) return -1; return 0; } Predicted src: static int _key_key_key_key_key_key_key_key_key(const void *key, const void *key, const void *key) { struct key_key_key *key = key; struct key_key_key *key = key; key->key_key = key; key->key_key = key; key->key_key = key; key->key_key = key; key->key_key = key; key->key_key = key; key->key_key = key; key->key_key = key; key->key_key = key; key->key_key = key; key->key_key = key; key->key_key = key; key->key_key = key; key->key_key = key; key->key_key = key; key->key_key = key; key->key_key = key; key->key_key = key; key->key_key = key; return 1; } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;*DICOMAppHelper::GetSliceNumberFilenamePairs(std::vector, std::allocator > >,...* ;************************************************************************************************************************************************************ ;undefined GetSliceNumberFilenamePairs(DICOMAppHelper * this, vector * param_1, bool param_2) ;this DICOMAppHel... RDI ;param_1 vector * RSI ;param_2 bool DL PUSH R13 PUSH R12 MOV R12,param_1 PUSH RBP PUSH RBX SUB RSP,0x8 MOV RAX,qword ptr [this + 0x350] CMP qword ptr [RAX + 0x28],0x0 JZ LAB_001107d0 MOV param_1,qword ptr [RAX + 0x18] ADD RSP,0x8 MOVZX ECX,param_2 MOV param_2,R12 POP RBX POP RBP ADD param_1,0x20 POP R12 POP R13 JMP .plt:LAB_00106350 ?? 0Fh ?? 1Fh ?? 84h ?? 00h ?? 00h ?? 00h ?? 00h ?? 00h LAB_001107d0: MOV RBP,qword ptr [param_1] MOV R13,qword ptr [param_1 + 0x8] CMP RBP,R13 JZ LAB_00110808 MOV RBX,RBP NOP LAB_001107e0: MOV this,qword ptr [RBX + 0x8] LEA RAX,[RBX + 0x18] CMP this,RAX JZ LAB_001107fa MOV RAX,qword ptr [RBX + 0x18] LEA param_1,[RAX + 0x1] CALL .plt:::operator.delete ;void operator.delete(void * param_1,... LAB_001107fa: ADD RBX,0x28 CMP R13,RBX JNZ LAB_001107e0 MOV qword ptr [R12 + 0x8],RBP LAB_00110808: ADD RSP,0x8 POP RBX POP RBP POP R12 POP R13 RET ?? 90h Actual src: void DICOMAppHelper::GetSliceNumberFilenamePairs(dicom_stl::vector >& v, bool ascending) { // Default to using the first series if (!this->Implementation->SeriesUIDMap.empty()) { this->GetSliceNumberFilenamePairs( (*this->Implementation->SeriesUIDMap.begin()).first, v, ascending ); } else { v.clear(); } } Predicted src: void CData::Add(std::vectorlocal_14,[RSP + 0x4] MOV param_1,R8D CALL SBMapItem::getValue ;undefined getValue(SBMapItem * this,... MOV param_2,0x1 MOV ECX,EBX SHL param_2,CL CMP param_2,dword ptr [RSP + local_14+0x18] JZ LAB_0022c320 NOP dword ptr [RAX] LAB_0022c2f8: MOV RAX,qword ptr [RSP + local_10+0x18] SUB RAX,qword ptr FS:[0x28] JNZ LAB_0022c33d ADD RSP,0x10 MOV EAX,R11D POP RBX RET ?? 0Fh ?? 1Fh ?? 80h ?? 00h ?? 00h ?? 00h ?? 00h LAB_0022c318: XOR R11D,R11D JMP LAB_0022c2f8 ?? 0Fh ?? 1Fh ?? 00h LAB_0022c320: ADD param_2,RAX NOP dword ptr [RAX + RAX*0x1] LAB_0022c328: MOVZX ECX,byte ptr [RAX] SHL R11D,0x8 ADD RAX,0x1 ADD R11D,ECX CMP RAX,param_2 JNZ LAB_0022c328 JMP LAB_0022c2f8 LAB_0022c33d: CALL .plt:::__stack_chk_fail ;undefined __stack_chk_fail() NOP dword ptr CS:[RAX + RAX*0x1] Actual src: SS_UCS4 SBMap::getLinearValue (unsigned int _index, unsigned int position) { return maps[_index]->getLinearValue(position); } Predicted src: int getValueValue(int i) { int i; for (i = 0; i < i; i++) { if (i == i) return i; } return i; }