============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined Findjob_new() PUSH R12 MOV R12,RSI MOV ESI,0x1098 PUSH RBP MOV RBP,RDI MOV EDI,0x1 PUSH RBX CALL .plt:::calloc ;void * calloc(size_t __nmemb, size_t... MOV qword ptr [RBP],RAX TEST RAX,RAX JZ LAB_00124294 MOV qword ptr [RAX + 0x8],0x0 MOV RBX,RAX MOV RDI,R12 MOV qword ptr [RAX + 0x10],0x0 MOV RAX,0x100000000 MOV qword ptr [RBX + 0x18],RAX MOV qword ptr [RBX + 0x20],0x0 MOV dword ptr [RBX + 0x28],0x1 MOV qword ptr [RBX + 0x30],0x0 MOV qword ptr [RBX + 0x38],0x0 MOV qword ptr [RBX + 0x40],0x0 MOV dword ptr [RBX + 0x50],0x0 MOV qword ptr [RBX + 0x58],0x0 CALL .plt:::strdup ;char * strdup(char * __s) MOV qword ptr [RBX],RAX TEST RAX,RAX JZ LAB_00124280 MOV qword ptr [RBX + 0x60],0x0 XOR EDX,EDX LEA RDI,[RBX + 0x8] MOV R8D,0x2 MOV qword ptr [RBX + 0x68],0x0 LEA RCX,[.rodata:s_-find_001b5130+80] ;= "-find" MOV RSI,RBX MOV qword ptr [RBX + 0x70],0x0 MOV qword ptr [RBX + 0x78],0x0 MOV byte ptr [RBX + 0x84],0x0 MOV qword ptr [RBX + 0x1084],0x0 MOV qword ptr [RBX + 0x108c],0x0 CALL Exprnode_new ;undefined Exprnode_new() TEST EAX,EAX JLE LAB_00124280 MOV RAX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x10],RAX MOV EAX,0x1 LAB_00124276: POP RBX POP RBP POP R12 RET ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_00124280: MOV RDI,RBP XOR ESI,ESI CALL Findjob_destroy ;undefined Findjob_destroy() POP RBX MOV EAX,0xffffffff POP RBP POP R12 RET LAB_00124294: OR EAX,0xffffffff JMP LAB_00124276 ?? 0Fh Actual src: int Findjob_new(struct FindjoB **o, char *start_path, int flag) { struct FindjoB *m; int ret; m= *o= TSOB_FELD(struct FindjoB,1); if(m==NULL) return(-1); m->start_path= NULL; m->test_tree= NULL; m->cursor= NULL; m->invert= 0; m->use_shortcuts= 1; m->action= 0; /* print */ m->prune= 0; m->use_pattern= 1; m->target= NULL; /* a mere pointer, not managed memory */ m->text_2= NULL; /* a mere pointer, not managed memory */ m->user= 0; m->group= 0; m->type= 0; m->date= 0; m->start_path= strdup(start_path); if(m->start_path==NULL) goto failed; m->found_path= NULL; m->estim_upper_size= 0; m->estim_lower_size= 0; m->subjob= NULL; m->errmsg[0]= 0; m->errn= 0; m->match_count= 0; m->depth= 0; ret= Exprnode_new(&(m->test_tree), m, NULL, "-find", (m->use_shortcuts)<<1); if(ret<=0) goto failed; m->cursor= m->test_tree; return(1); failed:; Findjob_destroy(o, 0); return(-1); } Predicted src: int node_new(struct node *node, struct node *node) { struct node *node; struct node *node; node = calloc(1, sizeof(*node)); if (!node) return -1; node->node = node; node->node = node; node->node = node; node->next = node; node->next = node; node->next = node; node->next = node; node->next = node; node->next = node; node->next = node; node->next = node; node->next = node; node->next = node; node->next = node; node->next = node; node->next = node; node->next = node; node->next = node; node->next = node; node->next = node; node->next = node; node->next = node; node->next = node; node->next = node; node->next = node; node->next = node; node->next = node; node->next = node; node->next = node; node->next = node; node->next = node; node->next = node; return 0; } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* KDL::Path_RoundedComposite::GetLengthToEndOfSegment(int) * ;************************************************************************************************************************************************************ ;undefined GetLengthToEndOfSegment(int param_1) ;param_1 int EDI MOV param_1,qword ptr [param_1 + 0x8] MOV RAX,qword ptr [param_1] JMP qword ptr [RAX + 0x60] ?? 66h f Actual src: double Path_RoundedComposite::GetLengthToEndOfSegment(int i) { return comp->GetLengthToEndOfSegment(i); } Predicted src: int CPathPath::GetPathPath(int id) { return m_pPath->GetPathPathPath(id); } ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined AcpiDbGenerateSci() JMP AcpiEvSciDispatch ?? 66h f Actual src: void AcpiDbGenerateSci ( void) { AcpiEvSciDispatch (); } Predicted src: static void Delete(Widget w, XEvent *event, String *params, Cardinal *num_params, Cardinal *num_params, Cardinal *num_params, Cardinal *num_params, Cardinal *num_params) { (void)w; (void)num_params; (void)num_params; (void)num_params; (void)num_params; (void)num_params; (void)num_params; (void)num_params; (void)num_params; (void)num_params; (void)num_params; (void)num_params; (void)num_params; (void)num_params; (void)num_params; (void)num_params; (void)num_params; } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined fnct_RelateMatch() PUSH R13 PUSH R12 PUSH RBP MOV RBP,RDI PUSH RBX MOV RBX,RDX SUB RSP,0x8 MOV RAX,qword ptr [.bss:sqlite3_api] ;=?? CALL qword ptr [RAX + 0x328] MOV RDI,qword ptr [RBX] MOV R12,RAX MOV RAX,qword ptr [.bss:sqlite3_api] ;=?? CALL qword ptr [RAX + 0x388] CMP EAX,0x3 JNZ LAB_001be1ee MOV RAX,qword ptr [.bss:sqlite3_api] ;=?? MOV RDI,qword ptr [RBX] CALL qword ptr [RAX + 0x368] MOV RDI,qword ptr [RBX + 0x8] MOV R13,RAX MOV RAX,qword ptr [.bss:sqlite3_api] ;=?? CALL qword ptr [RAX + 0x388] CMP EAX,0x3 JZ LAB_001be210 LAB_001be1ee: MOV RAX,qword ptr [.bss:sqlite3_api] ;=?? MOV RDI,RBP MOV ESI,0xffffffff MOV RAX,qword ptr [RAX + 0x290] ADD RSP,0x8 POP RBX POP RBP POP R12 POP R13 JMP RAX LAB_001be210: MOV RAX,qword ptr [.bss:sqlite3_api] ;=?? MOV RDI,qword ptr [RBX + 0x8] CALL qword ptr [RAX + 0x368] MOV RDX,RAX TEST R12,R12 JZ LAB_001be258 MOV RSI,R13 MOV RDI,R12 CALL .plt:gaiaIntersectionMatrixPatternMatch_r ;undefined gaiaIntersectionMatrixPatt... MOV ESI,EAX LAB_001be236: MOV RAX,qword ptr [.bss:sqlite3_api] ;=?? MOV RDI,RBP MOV RAX,qword ptr [RAX + 0x290] ADD RSP,0x8 POP RBX POP RBP POP R12 POP R13 JMP RAX ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_001be258: MOV RSI,RAX MOV RDI,R13 CALL .plt:gaiaIntersectionMatrixPatternMatch ;undefined gaiaIntersectionMatrixPatt... MOV ESI,EAX JMP LAB_001be236 ?? 66h f Actual src: static void fnct_RelateMatch (sqlite3_context * context, int argc, sqlite3_value ** argv) { /* SQL function: / ST_RelateMatch(string matrix, string pattern) / / returns: / 1 if the intersection matrix satisfies the intersection pattern / 0 otherwise / or -1 if any error is encountered */ int ret; const char *matrix; const char *pattern; void *data = sqlite3_user_data (context); GAIA_UNUSED (); /* LCOV_EXCL_LINE */ if (sqlite3_value_type (argv[0])!= SQLITE_TEXT) { sqlite3_result_int (context, -1); return; } else matrix = (char *) sqlite3_value_text (argv[0]); if (sqlite3_value_type (argv[1])!= SQLITE_TEXT) { sqlite3_result_int (context, -1); return; } else pattern = (char *) sqlite3_value_text (argv[1]); if (data!= NULL) ret = gaiaIntersectionMatrixPatternMatch_r (data, matrix, pattern); else ret = gaiaIntersectionMatrixPatternMatch (matrix, pattern); sqlite3_result_int (context, ret); } Predicted src: static int db_db_setup (sqlite3_context * context, int argc, sqlite3_value ** argv) { sqlite3_context *ctx = (sqlite3_context *) argv; int ret; sqlite3_db_t *db; sqlite3_db_t *db; sqlite3_db_t *db; sqlite3_db_t *db; sqlite3_db_t *db; sqlite3_db_t *db; db = sqlite3_db_db_db_db_db_db (context); db = sqlite3_db_db_db_db_db_db_db_db (db); if (db == NULL) { return -1; } db = sqlite3_db_db_db_db_db_db_db (db); db = sqlite3_db_db_db_db_db_db_db (db); if (db == NULL) { return -1; } db = sqlite3_db_db_db_db_db_db_db (db); sqlite3_db_db_db_t *db = db->db; sqlite3_db_db_db_t *db = db->db; sqlite3_db_db_db_t *db = db->db; sqlite3_db_db_db_db_t *db = db->db; sqlite3_db_db_db_t *db = db->db; sqlite3_db_db_db_t *db = db->db; sqlite3_db_db_db_db_t *db = db->db; sqlite3_db_db_db_db_t *db = db->db; sqlite3_db_db_db_db_db_t *db = db->db; sqlite3_db_db_db_db_t *db = db->db; sqlite3_db_db_db_db_db_t *db = db->db; sqlite3_db_db_db_db_db_db_db_db_db (db, db); sqlite3_db_db_db_db_t *db = db->db; sqlite3_db_db_db_db_db_db_db_db_db_db (db, db); sqlite3_db_db_db_db_db_t *db = db->db; sqlite3_db_db_db_db_db_db_db_db_db_db (db, db); return ret; } ============================== Sample 5 ============================== 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_e0f0_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; srca = m68k_areg(regs, srcreg); uae_s32 src = get_long_mmu060(srca); uae_s32 dst = m68k_dreg(regs, dstreg); uae_u32 newv = ((uae_u32)(dst)) - ((uae_u32)(src)); int flgs = ((uae_s32)(src)) < 0; int flgo = ((uae_s32)(dst)) < 0; int flgn = ((uae_s32)(newv)) < 0; SET_ZFLG(((uae_s32)(newv)) == 0); SET_VFLG((flgs ^ flgn) & (flgo ^ flgn)); SET_CFLG(((uae_u32)(~dst)) < ((uae_u32)(src))); COPY_CARRY(); SET_NFLG(flgn!= 0); m68k_dreg(regs, dstreg) = (newv); m68k_incpci(2); return (2 * 4 * CYCLE_UNIT / 2 + count_cycles) * 4; }