============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined fn_handler() ;local_20 undefined8 -20 ;local_30 undefined8 -30 ;local_38 undefined8 -38 PUSH R12 PUSH RBP PUSH RBX MOVSXD RBX,EDI SUB RSP,0x20 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + local_20+0x38],RAX XOR EAX,EAX LEA EAX,[RBX + -0x1] CMP EAX,0x3f JA LAB_0010680f CALL .plt:::__errno_location ;int * __errno_location(void) SHL RBX,0x4 MOV RDI,RSP MOV R12D,dword ptr [RAX] MOV RBP,RAX LEA RAX,[.data:signals] MOV RAX=>.data:signals,qword ptr [RAX + RBX*0x1] MOV qword ptr [RSP + local_30+0x38],0x0 MOV qword ptr [RSP]=>local_38,RAX CALL funcall ;undefined funcall() MOV dword ptr [RBP],R12D MOV RAX,qword ptr [RSP + local_20+0x38] SUB RAX,qword ptr FS:[0x28] JNZ LAB_0010681b ADD RSP,0x20 POP RBX POP RBP POP R12 RET LAB_0010680f: LEA RDI,[.rodata:s_unknown_signal_001133de] ;= "unknown signal" CALL panic ;undefined panic() LAB_0010681b: CALL .plt:::__stack_chk_fail ;undefined __stack_chk_fail() ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined rc_exit() ;local_10 undefined8 -10 ;local_20 undefined8 -20 ;local_28 undefined8 -28 SUB RSP,0x28 Actual src: static void fn_handler(int s) { char *sig[2]; int olderrno; if (s < 1 || s >= NUMOFSIGNALS) panic("unknown signal"); olderrno = errno; sig[0] = signals[s].name; sig[1] = NULL; funcall(sig); errno = olderrno; } Predicted src: static void handler(int sig) { int i; for (i = 0; i < sig; i++) { if (sig[i].handler == sig) { exit(1); } } } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined sidebar_init_entry() ;local_20 undefined8 -20 ;local_28 undefined8 -28 PUSH R12 PUSH RBP SUB RSP,0x18 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + local_20+0x28],RAX XOR EAX,EAX MOV EAX,dword ptr [.bss:sidebar__unit_init_count] MOV qword ptr [RSP]=>local_28,0x0 LEA EDX,[RAX + 0x1] MOV dword ptr [.bss:sidebar__unit_init_count],EDX TEST EAX,EAX JZ LAB_003dc170 LAB_003dc152: MOV RAX,qword ptr [RSP + local_20+0x28] SUB RAX,qword ptr FS:[0x28] JNZ LAB_003dc1ab ADD RSP,0x18 POP RBP POP R12 RET ?? 66h f ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_003dc170: MOV R12,RSP MOV RBP,RDI MOV RDI,R12 CALL unit_init_entry ;undefined unit_init_entry() MOV RSI,qword ptr [RSP]=>local_28 TEST RSI,RSI JZ LAB_003dc198 LAB_003dc187: MOV RDI,RBP CALL .plt:::g_propagate_error ;undefined g_propagate_error() JMP LAB_003dc152 ?? 0Fh ?? 1Fh ?? 80h ?? 00h ?? 00h ?? 00h ?? 00h LAB_003dc198: MOV RDI,R12 CALL sidebar_init ;undefined sidebar_init() MOV RSI,qword ptr [RSP]=>local_28 TEST RSI,RSI JNZ LAB_003dc187 JMP LAB_003dc152 LAB_003dc1ab: CALL .plt:::__stack_chk_fail ;undefined __stack_chk_fail() ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined sidebar_terminate_entry() MOV EAX,dword ptr [.bss:sidebar__unit_init_count] Actual src: void sidebar_init_entry (GError** error) { gint _tmp0_; GError* _inner_error0_ = NULL; _tmp0_ = sidebar__unit_init_count; sidebar__unit_init_count = _tmp0_ + 1; if (_tmp0_!= 0) { return; } unit_init_entry (&_inner_error0_); if (G_UNLIKELY (_inner_error0_!= NULL)) { g_propagate_error (error, _inner_error0_); return; } sidebar_init (&_inner_error0_); if (G_UNLIKELY (_inner_error0_!= NULL)) { g_propagate_error (error, _inner_error0_); return; } } Predicted src: static void entry_entry_init (gpointer key, gpointer user_data) { g_return_if_fail (key!= NULL); g_return_if_fail (key!= NULL); g_return_if_fail (key!= NULL); g_return_if_fail (key!= NULL); g_return_if_fail (key!= NULL); g_return_if_fail (key!= NULL); if (key!= NULL) { g_error_init (error, NULL); return; } else { g_error_init (&error); return; } } ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* AstNotEqual::accept(ecf::ExprAstVisitor&) * ;************************************************************************************************************************************************************ ;undefined accept(AstNotEqual * this, ExprAstVisitor * param_1) ;this AstNotEqual * RDI ;param_1 ExprAstVisi... RSI PUSH R12 MOV R12,this PUSH RBP MOV RBP,param_1 SUB RSP,0x8 CALL .plt:AstRoot::accept ;undefined accept(AstRoot * this, Exp... MOV RAX,qword ptr [RBP] MOV param_1,R12 MOV this,RBP MOV RAX,qword ptr [RAX + 0x68] ADD RSP,0x8 POP RBP POP R12 JMP RAX ?? 90h Actual src: void AstNotEqual::accept(ExprAstVisitor& v) { AstRoot::accept(v); v.visitNotEqual(this); } Predicted src: void Line::set(std::ostream& out) { out << out << out; } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* idLBCache::Reset() * ;************************************************************************************************************************************************************ ;undefined Reset(idLBCache * this) ;this idLBCache * RDI PUSH R15 LEA R15,[this + 0xcc] PUSH R14 MOV R14,this PUSH R13 PUSH R12 PUSH RBP LEA RBP,[this + 0x4] PUSH RBX SUB RSP,0x8 LAB_0080c80c: MOV R13,qword ptr [RBP + 0x14] MOV dword ptr [RBP],0x0 TEST R13,R13 JZ LAB_0080c85c MOV EAX,dword ptr [RBP + 0x8] TEST EAX,EAX JLE LAB_0080c854 SUB EAX,0x1 LEA RBX,[R13 + 0x10] LEA RAX,[RAX + RAX*0x2] SHL RAX,0x6 LEA R12,[R13 + RAX*0x1 + 0xd0] NOP word ptr [RAX + RAX*0x1] LAB_0080c840: MOV this,RBX ADD RBX,0xc0 CALL idStr::FreeData ;undefined FreeData(idStr * this) CMP RBX,R12 JNZ LAB_0080c840 LAB_0080c854: MOV this,R13 LAB_0080c857: CALL Mem_Free16 ;undefined Mem_Free16(void * param_1) LAB_0080c85c: MOV qword ptr [RBP + 0x14],0x0 ADD RBP,0x28 MOV dword ptr [RBP + -0x24],0x0 MOV dword ptr [RBP + -0x20],0x0 CMP RBP,R15 JNZ LAB_0080c80c MOV qword ptr [R14 + 0xc8],0x0 XOR EAX,EAX MOV dword ptr [R14 + 0xd0],0x0 MOV qword ptr [R14 + 0xe8],0x0 MOV dword ptr [R14 + 0xf0],0x0 MOV qword ptr [R14 + 0xd8],0x0 MOV dword ptr [R14 + 0xe0],0x0 MOV word ptr [R14 + 0xe4],AX ADD RSP,0x8 POP RBX POP RBP POP R12 POP R13 POP R14 POP R15 RET ?? 66h f Actual src: void idLBCache::Reset() { for( int i = 0; i < NUM_ROW_BLOCKS; i++ ) { rowBlocks[i].startIndex = 0; rowBlocks[i].rows.Clear(); } def = NULL; filter = DEFAULT_LEADERBOARD_FILTER; pendingDef = NULL; pendingFilter = DEFAULT_LEADERBOARD_FILTER; rowOffset = 0; requestingRows = false; numRowsInLeaderboard = 0; entryIndex = 0; loadingNewLeaderboard = false; } Predicted src: void CDataData::Clear() { for (int i = 0; i < m_count; i++) { for (int i = 0; i < m_count; i++) { for (int i = 0; i < m_count; i++) { m_count[i] = m_count[i]; } } } } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* op_0690_40_ff(unsigned int) * ;************************************************************************************************************************************************************ ;undefined op_0690_40_ff(uint param_1) ;param_1 uint EDI AND param_1,0x7 PUSH R12 MOV RAX,qword ptr [.bss:regs[72]] MOV R12D,dword ptr [.bss:regs[32] + param_1*0x4] PUSH RBP PUSH RBX MOV EBX,dword ptr [RAX + 0x2] MOV EBP,R12D MOV param_1,R12D SHR EBP,0x10 MOV RAX,qword ptr [.bss:mem_banks + RBP*0x8] BSWAP EBX MOV EDX,dword ptr [RAX + 0x6c] OR dword ptr [.bss:special_mem],EDX CALL qword ptr [RAX] XOR ECX,ECX MOV ESI,EAX MOV EDX,EAX MOV EAX,dword ptr [.bss:regflags] ADD ESI,EBX SETZ CL AND EAX,0xffffbffe MOV param_1,ESI SHL ECX,0xe XOR param_1,EBX OR EAX,ECX MOV ECX,ESI XOR ECX,EDX AND ECX,param_1 MOV param_1,R12D SHR ECX,0x1f OR EAX,ECX AND AH,0xfe ADD EDX,EBX SETC DL Actual src: uae_u32 REGPARAM2 CPUFUNC(op_4650_0)(uae_u32 opcode) { uae_u32 srcreg = (opcode & 7); {{ uaecptr srca; srca = m68k_areg (regs, srcreg); { uae_s16 src = get_word (srca); { uae_u32 dst = ~src; CLEAR_CZNV (); SET_ZFLG (((uae_s16)(dst)) == 0); SET_NFLG (((uae_s16)(dst)) < 0); put_word (srca, dst); }}}} m68k_incpc (2); return 8 * CYCLE_UNIT / 2; } Predicted src: uae_u32 REGPARAM2 op_0f8_0_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; srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword_mmu040(2); uae_s8 src = x_get_byte(srca); m68k_areg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); m68k_incpci(4); return (1 * 4 * CYCLE_UNIT / 2 + count_cycles) * 4; }