============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined libxmp_get_sample() MOV EAX,dword ptr [RDI + 0x6d0] CMP EAX,ESI JLE LAB_00118910 MOVSXD RSI,ESI MOV RDX,qword ptr [RDI + 0x700] LEA RAX,[RSI*0x8] SUB RAX,RSI LEA R8,[RDX + RAX*0x8] LAB_00118903: MOV RAX,R8 RET ?? 66h f ?? 0Fh ?? 1Fh ?? 84h ?? 00h ?? 00h ?? 00h ?? 00h ?? 00h LAB_00118910: MOV EDX,dword ptr [RDI + 0x2430] XOR R8D,R8D ADD EDX,EAX CMP EDX,ESI JLE LAB_00118903 SUB ESI,EAX MOV RDX,qword ptr [RDI + 0x2440] MOVSXD RSI,ESI LEA RAX,[RSI*0x8] SUB RAX,RSI LEA R8,[RDX + RAX*0x8] MOV RAX,R8 RET ?? 66h f Actual src: struct xmp_sample *libxmp_get_sample(struct context_data *ctx, int smp) { struct smix_data *smix = &ctx->smix; struct module_data *m = &ctx->m; struct xmp_module *mod = &m->mod; struct xmp_sample *xxs; if (smp < mod->smp) { xxs = &mod->xxs[smp]; } else if (smp < mod->smp + smix->smp) { xxs = &smix->xxs[smp - mod->smp]; } else { xxs = NULL; } return xxs; } Predicted src: int get_set_get(const char *name) { int i; for (i = 0; i < i++) return 0; i++) if (i == 0) return 0; i++) return 0; } return 0; } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined sge_generic_cal() PUSH R13 MOV ESI,0x1 PUSH R12 MOV R12,RDI XOR EDI,EDI SUB RSP,0x8 CALL rmon_condition ;undefined rmon_condition() TEST EAX,EAX JNZ LAB_00271be8 LAB_00271b9b: LEA RDI,[.data:CAL_Type] CALL lCreateElem ;undefined lCreateElem() TEST R12,R12 MOV ESI,0x2256a MOV R13,RAX LEA RAX,[.rodata:s_template_00282aed+6] ;= "template" CMOVZ R12,RAX MOV RDI,R13 MOV RDX,R12 CALL lSetString ;undefined lSetString() XOR EDI,EDI MOV ESI,0x1 CALL rmon_condition ;undefined rmon_condition() TEST EAX,EAX JNZ LAB_00271c08 LAB_00271bd8: ADD RSP,0x8 MOV RAX,R13 POP R12 POP R13 RET ?? 0Fh ?? 1Fh ?? 40h @ ?? 00h LAB_00271be8: CALL cl_thread_get_thread_config ;undefined cl_thread_get_thread_config() TEST RAX,RAX JZ LAB_00271c40 MOV RSI,qword ptr [RAX] LEA RDI,[.rodata:SGE_FUNC.1] ;= "sge_generic_cal" CALL rmon_menter ;undefined rmon_menter() JMP LAB_00271b9b ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_00271c08: CALL cl_thread_get_thread_config ;undefined cl_thread_get_thread_config() TEST RAX,RAX JZ LAB_00271c58 MOV RCX,qword ptr [RAX] MOV EDX,0xa1f LEA RSI,[.rodata:s_../libs/sgeobj/sge_calendar.c_002a0a39] ;= "../libs/sgeobj/sge_calendar.c" LEA RDI,[.rodata:SGE_FUNC.1] ;= "sge_generic_cal" CALL rmon_mexit ;undefined rmon_mexit() ADD RSP,0x8 MOV RAX,R13 POP R12 POP R13 RET ?? 0Fh ?? 1Fh ?? 80h ?? 00h ?? 00h ?? 00h ?? 00h LAB_00271c40: XOR ESI,ESI LEA RDI,[.rodata:SGE_FUNC.1] ;= "sge_generic_cal" CALL rmon_menter ;undefined rmon_menter() JMP LAB_00271b9b ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_00271c58: XOR ECX,ECX MOV EDX,0xa1f LEA RSI,[.rodata:s_../libs/sgeobj/sge_calendar.c_002a0a39] ;= "../libs/sgeobj/sge_calendar.c" LEA RDI,[.rodata:SGE_FUNC.1] ;= "sge_generic_cal" CALL rmon_mexit ;undefined rmon_mexit() JMP LAB_00271bd8 ?? 66h f Actual src: lListElem* sge_generic_cal(char *cal_name) { lListElem *calp; DENTER(TOP_LAYER, "sge_generic_cal"); calp = lCreateElem(CAL_Type); lSetString(calp, CAL_name, cal_name?cal_name:"template"); DRETURN(calp); } Predicted src: static void _init (GObject *self) { g_return_if_fail (self!= NULL); g_return_if_fail (self!= NULL); if_fail (self!= NULL) return; return; } ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined menu_media_disk_disciple_drive2_saveas() MOV ESI,0x152 JMP menu_media_save ;undefined menu_media_save() ?? 66h f Actual src: static MENU_CALLBACK( menu_media_disk_disciple_drive2_saveas ) { menu_media_save( gtk_action, 0x152 ); } Predicted src: static void _cb(void) { } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined _cffi_f_ncplane_greyscale() ;local_20 undefined1 -20 ;local_30 undefined8 -30 ;local_38 undefined8 -38 ;local_40 undefined8 -40 PUSH RBP MOV RBP,RSP PUSH R13 PUSH R12 LEA R13=>local_40,[RBP + -0x38] MOV R12,RSI PUSH RBX MOV RDX,R13 SUB RSP,0x28 MOV RDI,qword ptr [.data:_cffi_types[200]] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + local_30+0x8],RAX XOR EAX,EAX MOV qword ptr [RBP + local_38+0x8],0x0 CALL qword ptr [.bss:_cffi_exports[184]] TEST RAX,RAX JZ LAB_00142f48 MOV RCX,RAX XOR EAX,EAX CMP RCX,0x280 JBE LAB_00142f28 LAB_00142e96: LEA R8=>local_38,[RBP + -0x30] MOV RDX,R13 MOV RSI,R12 MOV qword ptr [RBP + local_40+0x8],RAX MOV RDI,qword ptr [.data:_cffi_types[200]] CALL _cffi_convert_array_argument ;undefined _cffi_convert_array_argume... TEST EAX,EAX JS LAB_00142f70 MOV RBX,qword ptr [RBP + local_38+0x8] CALL .plt:PyEval_SaveThread ;undefined PyEval_SaveThread() MOV R12,RAX CALL qword ptr [.bss:_cffi_exports[104]] MOV RDI,qword ptr [RBP + local_40+0x8] CALL .plt:ncplane_greyscale ;undefined ncplane_greyscale() CALL qword ptr [.bss:_cffi_exports[112]] MOV RDI,R12 CALL .plt:PyEval_RestoreThread ;undefined PyEval_RestoreThread() TEST RBX,RBX JZ LAB_00142f00 NOP word ptr CS:[RAX + RAX*0x1] LAB_00142ef0: MOV RDI,RBX MOV RBX,qword ptr [RBX] CALL .plt:PyObject_Free ;undefined PyObject_Free() TEST RBX,RBX JNZ LAB_00142ef0 LAB_00142f00: MOV RAX=>EXTERNAL:_Py_NoneStruct,qword ptr [->_Py_NoneStruct] ;= 001807f8 ;=?? ADD qword ptr [RAX]=>EXTERNAL:_Py_NoneStruct,0x1 ;=?? LAB_00142f0b: MOV RDX,qword ptr [RBP + local_30+0x8] SUB RDX,qword ptr FS:[0x28] JNZ LAB_00142f74 LEA RSP=>local_20,[RBP + -0x18] POP RBX POP R12 POP R13 POP RBP RET ?? 0Fh ?? 1Fh ?? 00h LAB_00142f28: LEA RAX,[RCX + 0x17] AND RAX,-0x10 SUB RSP,RAX LEA RAX,[RSP + 0xf] AND RAX,-0x10 JMP LAB_00142e96 ?? 0Fh ?? 1Fh ?? 80h ?? 00h ?? 00h ?? 00h ?? 00h LAB_00142f48: CALL .plt:PyEval_SaveThread ;undefined PyEval_SaveThread() MOV R12,RAX CALL qword ptr [.bss:_cffi_exports[104]] MOV RDI,qword ptr [RBP + local_40+0x8] CALL .plt:ncplane_greyscale ;undefined ncplane_greyscale() CALL qword ptr [.bss:_cffi_exports[112]] MOV RDI,R12 CALL .plt:PyEval_RestoreThread ;undefined PyEval_RestoreThread() JMP LAB_00142f00 ?? 90h LAB_00142f70: XOR EAX,EAX JMP LAB_00142f0b LAB_00142f74: CALL .plt:::__stack_chk_fail ;undefined __stack_chk_fail() NOP dword ptr [RAX] Actual src: static PyObject * _cffi_f_ncplane_greyscale(PyObject *self, PyObject *arg0) { struct ncplane * x0; Py_ssize_t datasize; struct _cffi_freeme_s *large_args_free = NULL; datasize = _cffi_prepare_pointer_call_argument( _cffi_type(25), arg0, (char **)&x0); if (datasize!= 0) { x0 = ((size_t)datasize) <= 640? (struct ncplane *)alloca((size_t)datasize) : NULL; if (_cffi_convert_array_argument(_cffi_type(25), arg0, (char **)&x0, datasize, &large_args_free) < 0) return NULL; } Py_BEGIN_ALLOW_THREADS _cffi_restore_errno(); { ncplane_greyscale(x0); } _cffi_save_errno(); Py_END_ALLOW_THREADS (void)self; /* unused */ if (large_args_free!= NULL) _cffi_free_array_arguments(large_args_free); Py_INCREF(Py_None); return Py_None; } Predicted src: static void _init (GtkWidget *self) { self->priv = NULL; self->data = NULL; self->data = NULL; self->data = NULL; } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined RTSgBufCopyFromBuf() CMP RDI,0xfff JBE LAB_00182458 MOV RAX,-0x100000000000000 PUSH RBP MOV R8,RDI MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,RDI SUB RSP,0x8 AND R8,RAX JNZ LAB_00182460 MOV R15,RSI CMP RSI,0xfff JBE LAB_00182432 TEST RSI,RAX JNZ LAB_00182432 MOV R13,RDX MOV R14,RDX TEST RDX,RDX JNZ LAB_001823f8 JMP LAB_0018242f ?? 0Fh ?? 1Fh ?? 00h LAB_001823c0: ADD EDX,0x1 MOV dword ptr [RBX + 0xc],EDX CMP ECX,EDX JBE LAB_001823e0 SHL RDX,0x4 ADD RDX,qword ptr [RBX] MOV RAX,qword ptr [RDX] MOV qword ptr [RBX + 0x10],RAX MOV RAX,qword ptr [RDX + 0x8] MOV qword ptr [RBX + 0x18],RAX LAB_001823e0: TEST R12,R12 JZ LAB_00182450 MOV RSI,R15 MOV RDX,R12 ADD R15,R12 CALL .plt:::memcpy ;void * memcpy(void * __dest, void *... SUB R14,R12 JZ LAB_0018242f LAB_001823f8: MOV EDX,dword ptr [RBX + 0xc] MOV ECX,dword ptr [RBX + 0x8] MOV RAX,qword ptr [RBX + 0x18] CMP EDX,ECX JZ LAB_00182448 LAB_00182406: CMP R14,RAX MOV R12,RAX MOV RDI,qword ptr [RBX + 0x10] CMOVBE R12,R14 SUB RAX,R12 MOV qword ptr [RBX + 0x18],RAX JZ LAB_001823c0 ADD R12,RDI MOV RDX,R14 MOV RSI,R15 MOV qword ptr [RBX + 0x10],R12 CALL .plt:::memcpy ;void * memcpy(void * __dest, void *... LAB_0018242f: MOV R8,R13 LAB_00182432: ADD RSP,0x8 MOV RAX,R8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET ?? 0Fh ?? 1Fh ?? 40h @ ?? 00h LAB_00182448: TEST RAX,RAX JNZ LAB_00182406 NOP dword ptr [RAX] LAB_00182450: SUB R13,R14 JMP LAB_0018242f ?? 0Fh ?? 1Fh ?? 00h LAB_00182458: XOR EAX,EAX RET ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_00182460: XOR R8D,R8D JMP LAB_00182432 ?? 66h f Actual src: RTDECL(size_t) RTSgBufCopyFromBuf(PRTSGBUF pSgBuf, const void *pvBuf, size_t cbCopy) { AssertPtrReturn(pSgBuf, 0); AssertPtrReturn(pvBuf, 0); size_t cbLeft = cbCopy; while (cbLeft) { size_t cbThisCopy = cbLeft; void *pvDst = rtSgBufGet(pSgBuf, &cbThisCopy); if (!cbThisCopy) break; memcpy(pvDst, pvBuf, cbThisCopy); cbLeft -= cbThisCopy; pvBuf = (const void *)((uintptr_t)pvBuf + cbThisCopy); } return cbCopy - cbLeft; } Predicted src: static void _init (const char *data) { if (data == NULL) { return; } if (data!= NULL) { return; } return; }