============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined fatal() SUB RSP,0x8 XOR EAX,EAX CALL error ;undefined error() MOV EDI,0x2 CALL .plt:::exit ;void exit(int __status) NOP dword ptr CS:[RAX + RAX*0x1] Actual src: void fatal(mesg, errnum) #ifdef __STDC__ const #endif char *mesg; int errnum; { error(mesg, errnum); exit(2); } Predicted src: static void error(int sig) { exit(1); exit(1); } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined dpiStmt__check() PUSH R12 MOV RCX,RDX MOV R12,RDX MOV RDX,RSI PUSH RBP MOV ESI,0xfa3 MOV RBP,RDI SUB RSP,0x8 CALL .plt:dpiGen__startPublicFn ;undefined dpiGen__startPublicFn() TEST EAX,EAX JS LAB_0011ce70 CMP qword ptr [RBP + 0x28],0x0 JZ LAB_0011ce50 MOV RAX,qword ptr [RBP + 0x30] TEST RAX,RAX JZ LAB_0011ce08 CMP qword ptr [RAX + 0x28],0x0 JZ LAB_0011ce50 LAB_0011ce08: MOV RDI,qword ptr [RBP + 0x18] MOV RSI,R12 CALL .plt:dpiConn__checkConnected ;undefined dpiConn__checkConnected() TEST EAX,EAX JS LAB_0011ce70 XOR EAX,EAX CMP word ptr [RBP + 0x88],0x0 JZ LAB_0011ce30 LAB_0011ce24: ADD RSP,0x8 POP RBP POP R12 RET ?? 0Fh ?? 1Fh ?? 40h @ ?? 00h LAB_0011ce30: MOV RSI,R12 MOV RDI,RBP CALL .plt:dpiStmt__init ;undefined dpiStmt__init() ADD RSP,0x8 SAR EAX,0x1f POP RBP POP R12 RET ?? 66h f ?? 2Eh . ?? 0Fh ?? 1Fh ?? 84h ?? 00h ?? 00h ?? 00h ?? 00h ?? 00h LAB_0011ce50: ADD RSP,0x8 MOV RDI,R12 MOV EDX,0x40e XOR EAX,EAX POP RBP LEA RSI,[.rodata:s_check_closed_0013b679] ;= "check closed" POP R12 JMP .plt:dpiError__set ;undefined dpiError__set(undefined pa... ?? 0Fh ?? 1Fh ?? 00h LAB_0011ce70: MOV EAX,0xffffffff JMP LAB_0011ce24 ?? 66h f Actual src: static int dpiStmt__check(dpiStmt *stmt, const char *fnName, dpiError *error) { if (dpiGen__startPublicFn(stmt, DPI_HTYPE_STMT, fnName, error) < 0) return DPI_FAILURE; if (!stmt->handle || (stmt->parentStmt &&!stmt->parentStmt->handle)) return dpiError__set(error, "check closed", DPI_ERR_STMT_CLOSED); if (dpiConn__checkConnected(stmt->conn, error) < 0) return DPI_FAILURE; if (stmt->statementType == 0 && dpiStmt__init(stmt, error) < 0) return DPI_FAILURE; return DPI_SUCCESS; } Predicted src: int dpiError__init( dpiError *error, dpiError *error) { dpiError error; if ((error = dpiError__init(error, dpiError))) return dpiError__set(error, dpiError, dpiError, dpiError); if (error == NULL) return dpiError__set(error, dpiError, dpiError, dpiError, dpiError); return dpiError__set(error, dpiError, dpiError, dpiError); } ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined gf_dm_sess_get_stats(undefined param_1, undefined param_2, undefined param_3, undefined param_4, undefined param_5, undefined param_6, undefined8 param_7) ;param_1 undefined DIL ;param_2 undefined SIL ;param_3 undefined DL ;param_4 undefined CL ;param_5 undefined R8B ;param_6 undefined R9B ;param_7 undefined8 8 MOV RAX,param_1 MOV param_1,qword ptr [RSP + param_7] TEST RAX,RAX JZ LAB_001c3669 TEST param_2,param_2 JZ LAB_001c35f9 MOV R10,qword ptr [RAX + 0x38] MOV qword ptr [param_2],R10 LAB_001c35f9: TEST param_3,param_3 JZ LAB_001c3605 MOV param_2,qword ptr [RAX + 0x58] MOV qword ptr [param_3],param_2 LAB_001c3605: TEST param_4,param_4 JZ LAB_001c3622 MOV param_3,dword ptr [RAX + 0x109c] MOV param_2,0x0 CMP param_3,0x40000000 CMOVZ param_3,param_2 MOV qword ptr [param_4],param_3 LAB_001c3622: TEST param_5,param_5 JZ LAB_001c3630 MOV param_4,dword ptr [RAX + 0x10a0] MOV qword ptr [param_5],param_4 LAB_001c3630: TEST param_6,param_6 JZ LAB_001c363e MOV param_3,dword ptr [RAX + 0x10d8] MOV dword ptr [param_6],param_3 LAB_001c363e: TEST param_1,param_1 JZ LAB_001c364b MOV param_3,dword ptr [RAX + 0x1094] MOV dword ptr [param_1],param_3 LAB_001c364b: MOV param_3,dword ptr [RAX + 0x1094] MOV EAX,0x1 CMP param_3,0xa JZ LAB_001c366e XOR EAX,EAX CMP param_3,0xb MOV param_3,0xfffffff3 CMOVZ EAX,param_3 RET LAB_001c3669: MOV EAX,0xffffffff LAB_001c366e: RET ?? 90h Actual src: GF_EXPORT GF_Err gf_dm_sess_get_stats(GF_DownloadSession * sess, const char **server, const char **path, u64 *total_size, u64 *bytes_done, u32 *bytes_per_sec, GF_NetIOStatus *net_status) { if (!sess) return GF_BAD_PARAM; if (server) *server = sess->server_name; if (path) *path = sess->remote_path; if (total_size) { if (sess->total_size==SIZE_IN_STREAM) *total_size = 0; else *total_size = sess->total_size; } if (bytes_done) *bytes_done = sess->bytes_done; if (bytes_per_sec) *bytes_per_sec = sess->bytes_per_sec; if (net_status) *net_status = sess->status; if (sess->status == GF_NETIO_DISCONNECTED) return GF_EOS; else if (sess->status == GF_NETIO_STATE_ERROR) return GF_SERVICE_ERROR; return GF_OK; } Predicted src: GF_EXPORT GF_Err gf_stats_get_stats(GF_Err gf_stats_t *stats, u32 gf_stats_id, u32 *offset, u32 *offset, u32 *offset, u32 *offset, u32 *offset, u32 *offset, u32 *offset, u32 *offset, u32 *offset, u32 *offset, u32 *offset, u32 *offset, u32 *offset, u32 *offset, u32 *offset, u32 *offset, u32 *offset, u32 *offset) { if (!stats ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset ||!offset | ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* HistogramDockerDock::startUpdateCanvasProjection() * ;************************************************************************************************************************************************************ ;undefined startUpdateCanvasProjection(HistogramDockerDock * this) ;this HistogramDo... RDI MOV RAX,qword ptr [this + 0x28] TEST byte ptr [RAX + 0x9],0x80 JNZ LAB_0010b110 RET ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_0010b110: MOV this,qword ptr [this + 0x48] JMP .plt:LAB_00108030 ?? 90h Actual src: void HistogramDockerDock::startUpdateCanvasProjection() { if (isVisible()) { m_imageIdleWatcher->startCountdown(); } } Predicted src: void SUpdateUpdate::UpdateUpdate() { if (m_pUpdate) { m_pUpdate->Update(); } } ============================== 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 CPUFUNC(op_0a0_0)(uae_u32 opcode) { uae_u32 srcreg = (opcode & 7); {{ uaecptr srca; srca = m68k_areg (regs, srcreg); { uae_s8 src = get_byte (srca); { uaecptr dsta; dsta = get_disp_ea_000 (m68k_areg (regs, dstreg), get_diword (2)); CLEAR_CZNV (); SET_ZFLG (((uae_s8)(src)) == 0); SET_NFLG (((uae_s8)(src)) < 0); put_byte (dsta, src); }}}} m68k_incpc (4); return 8 * CYCLE_UNIT / 2; }