============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined LoadIntoExtraScreen() MOV EDX,0x1 XOR ESI,ESI JMP TFB_DrawScreen_Copy ;undefined TFB_DrawScreen_Copy() ?? 0Fh Actual src: void LoadIntoExtraScreen (PRECT r) { TFB_DrawScreen_Copy(r, TFB_SCREEN_MAIN, TFB_SCREEN_EXTRA); } Predicted src: static void _delete(void *data) { (void)data; (void)data; (void)data; (void)data; (void)data; (void)data; (void)data; (void)data; (void)data; } ============================== Sample 2 ============================== 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: uae_u32 REGPARAM2 op_0_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_word_prefetch(2); uae_s32 dst = x_get_word(dsta); uae_s32 dst = x_get_word(dsta); uae_u32 newv = ((uae_u32)(dst)) - ((uae_u32)(src)); int flgs = ((uae_s32)(src)) < 0; int flgn = ((uae_s32)(newv)) < 0; int flgn = ((uae_s32)(newv)) < 0; int flgn = ((uae_s32)(newv)) < 0; SET_ZFLG(((uae_s32)(newv)) == 0); SET_VFLG((flgs ^ flgo) & (flgn ^ flgn)); SET_CFLG(((uae_u32)(src)) > ((uae_u32)(src))); SET_NFLG(flgn!= 0); m68k_dreg(regs, dstreg) = (newv); m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); m68k_incpci(2); return (1 * 4 * CYCLE_UNIT / 2 + count_cycles) * 4; } ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined startree_search() MOV R9,R8 XOR R8D,R8D JMP startree_search_for ;undefined startree_search_for() ?? 0Fh Actual src: void startree_search(const startree_t* s, const double* xyzcenter, double radius2, double** xyzresults, double** radecresults, int* nresults) { startree_search_for(s, xyzcenter, radius2, xyzresults, radecresults, NULL, nresults); } Predicted src: static int tree_tree_tree_tree_tree_tree_tree_tree_tree_tree_tree_tree_tree_tree_tree (const char *tree, const char *path) { return get_tree_tree_tree_tree_tree_tree (tree, NULL, NULL, NULL); } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined NhlCvtBooleanToString() ;local_10 undefined8 -10 ;local_14 undefined2 -14 ;local_18 undefined4 -18 ;local_28 undefined1[16] -28 PUSH RBX MOV EDX,0x67 MOV RBX,RSI SUB RSP,0x20 MOVDQA XMM0,xmmword ptr [.rodata:s_NhlCvtBooleanToSNhlCvtStringGenA_002b1f70] ;= "NhlCvtBooleanToSNhlCvtStringGenAr... MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + local_10+0x28],RAX XOR EAX,EAX MOV dword ptr [RSP + local_18+0x28],0x6e697274 MOV word ptr [RSP + local_14+0x28],DX MOVAPS xmmword ptr [RSP]=>local_28,XMM0 TEST ECX,ECX JNZ LAB_00158520 MOV EAX,dword ptr [RDI + 0x8] LEA RDX,[.data:false.427] ;= "False" TEST EAX,EAX LEA RAX,[.data:true.428] ;= 0075725400h CMOVZ RAX,RDX MOV EDX,dword ptr [RSI] TEST EDX,EDX JZ LAB_001584f0 MOV RCX,qword ptr [RSI + 0x8] TEST RCX,RCX JZ LAB_001584f0 MOV dword ptr [RSI],0x8 CMP EDX,0x7 JA LAB_00158510 MOV EAX,0xfffffffc LAB_001584d4: MOV RDX,qword ptr [RSP + local_10+0x28] SUB RDX,qword ptr FS:[0x28] JNZ LAB_00158546 ADD RSP,0x20 POP RBX RET ?? 66h f ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_001584f0: MOV dword ptr [RBX],0x8 MOV qword ptr [.bss:val.426],RAX ;=?? LEA RAX,[.bss:val.426] ;=?? MOV qword ptr [RBX + 0x8],RAX=>.bss:val.426 ;=?? MOV EAX,0xffffffff JMP LAB_001584d4 ?? 90h LAB_00158510: MOV qword ptr [RCX],RAX MOV EAX,0xffffffff JMP LAB_001584d4 ?? 66h f ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_00158520: MOV RCX,RSP MOV ESI,0x3e8 MOV EDI,0xfffffffc LEA RDX,[.rodata:s_%s:Called_with_improper_number_o_002af620+48] ;= "%s:Called with improper number of... CALL .plt:NhlPError ;undefined NhlPError(undefined param_... MOV dword ptr [RBX],0x0 MOV EAX,0xfffffffc JMP LAB_001584d4 LAB_00158546: CALL .plt:::__stack_chk_fail ;undefined __stack_chk_fail() NOP dword ptr [RAX + RAX*0x1] Actual src: static NhlErrorTypes NhlCvtBooleanToString CvtArgs { static char true[] = "True"; static char false[] = "False"; char func[] = "NhlCvtBooleanToString"; NhlString tstring; NhlErrorTypes ret = NhlNOERROR; if(nargs!= 0){ NhlPError(NhlFATAL,NhlEUNKNOWN, "%s:Called with improper number of args",func); to->size = 0; return NhlFATAL; } if(from->data.intval) tstring = true; else tstring = false; _NhlSetVal(NhlString,sizeof(NhlString),tstring); } Predicted src: static void set_data(void *data, const void *data, size_t len) { struct data *data = data; struct data_data *data = data; struct data_data *data = data; data = data->data; data->data = data; data->data = data; data->data = data; data->data = data; data->data = data; data->data = data; data->data = data; data->data = data; data->data = data; } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined go_conf_set_bool() PUSH R12 MOV R12D,EDX PUSH RBP SUB RSP,0x8 CALL .plt:go_conf_get_node ;undefined go_conf_get_node() TEST RAX,RAX JZ LAB_00164620 MOV RDI,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RAX + 0x10] MOV EDX,R12D MOV RBP,RAX CALL .plt:::g_settings_set_boolean ;undefined g_settings_set_boolean() ADD RSP,0x8 MOV RDI,RBP POP RBP POP R12 JMP .plt.got:go_conf_free_node ;undefined go_conf_free_node() ?? 66h f ?? 2Eh . ?? 0Fh ?? 1Fh ?? 84h ?? 00h ?? 00h ?? 00h ?? 00h ?? 00h LAB_00164620: ADD RSP,0x8 POP RBP POP R12 RET ?? 0Fh Actual src: void go_conf_set_bool (GOConfNode *node, gchar const *key, gboolean val) { GOConfNode *real_node = go_conf_get_node (node, key); if (!real_node) { d (g_warning ("Unable to set key '%s'", key)); return; } g_settings_set_boolean (real_node->settings, real_node->key, val); go_conf_free_node (real_node); } Predicted src: static void g_node_node_set_node_node_node_node_node (GObject *node, const gchar *node) { g_return_if_fail (node!= NULL); g_return_if_fail (node!= NULL); g_node_node_node_node_node_node_node_node_node_node_node_node_node_node_node_node_node (node, node); }