============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined vector_delete() TEST RDI,RDI JZ LAB_001bd150 PUSH RBP MOV RBP,RDI CALL .plt:IvocVect::~IvocVect ;undefined ~IvocVect(IvocVect * this) MOV RDI,RBP MOV ESI,0x28 POP RBP JMP .plt:::operator.delete ;void operator.delete(void * param_1,... ?? 0Fh ?? 1Fh ?? 40h @ ?? 00h LAB_001bd150: RET ?? 66h f Actual src: void vector_delete(Vect* v){delete v;} Predicted src: void delete(void *ptr) { delete ptr; } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined free_image() TEST RSI,RSI JZ LAB_003215e8 PUSH RBP MOV RAX,qword ptr [RDI + 0x1c8] MOV RBP,RSI MOV RCX,qword ptr [RAX + 0x50] MOV RAX,qword ptr [RSI + 0xd0] MOV RSI,qword ptr [RSI + 0xc8] TEST RAX,RAX JZ LAB_003215a8 MOV qword ptr [RAX + 0xc8],RSI LAB_00321562: MOV RAX,qword ptr [RBP + 0xc8] TEST RAX,RAX JZ LAB_0032157c MOV RDX,qword ptr [RBP + 0xd0] MOV qword ptr [RAX + 0xd0],RDX LAB_0032157c: MOV RDX,qword ptr [RBP + 0xc0] MOV RAX,qword ptr [RCX + 0x8] MOV RSI,RBP MOV qword ptr [RAX + RDX*0x8],0x0 MOV RAX,qword ptr [RBP + 0xa0] CALL qword ptr [RAX + 0x18] MOV RDI,RBP POP RBP JMP xfree ;undefined xfree() ?? 0Fh ?? 1Fh ?? 00h LAB_003215a8: MOV R8,qword ptr [RBP + 0xb8] MOV RDX,0x5e1d27a3ee9c011 MOV RAX,R8 MUL RDX MOV RAX,R8 SUB RAX,RDX SHR RAX,1 ADD RDX,RAX MOV RAX,qword ptr [RCX] SHR RDX,0x9 IMUL RDX,RDX,0x3e9 SUB R8,RDX MOV qword ptr [RAX + R8*0x8],RSI JMP LAB_00321562 ?? 0Fh ?? 1Fh ?? 00h LAB_003215e8: RET ?? 0Fh Actual src: static void free_image (struct frame *f, struct image *img) { if (img) { struct image_cache *c = FRAME_IMAGE_CACHE (f); /* Remove IMG from the hash table of its cache. */ if (img->prev) img->prev->next = img->next; else c->buckets[img->hash % IMAGE_CACHE_BUCKETS_SIZE] = img->next; if (img->next) img->next->prev = img->prev; c->images[img->id] = NULL; #if!defined USE_CAIRO && defined HAVE_XRENDER if (img->picture) XRenderFreePicture (FRAME_X_DISPLAY (f), img->picture); if (img->mask_picture) XRenderFreePicture (FRAME_X_DISPLAY (f), img->mask_picture); #endif /* Windows NT redefines 'free', but in this file, we need to avoid the redefinition. */ #ifdef WINDOWSNT #undef free #endif /* Free resources, then free IMG. */ img->type->free (f, img); xfree (img); } } Predicted src: static void image_image_free(void *data, void *data, size_t size) { size_t i; for (i = 0; i < size; i++) { if (data[i] == data[i]) { data[i] = data[i]; data[i] = data[i]; data[i] = data[i]; data[i] = data[i]; data[i] = data[i]; data[i] = data[i]; } } } ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined tti_rnum() PUSH R13 PUSH R12 XOR R12D,R12D PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x8 MOV byte ptr [RDI],0xff NOP dword ptr [RAX + RAX*0x1] LAB_00108968: CALL sim_poll_kbd ;undefined sim_poll_kbd() TEST EAX,EAX JZ LAB_00108968 TEST AH,0x20 JNZ LAB_00108968 CMP EAX,0xfff JLE LAB_001089c2 AND EAX,0x7f CMP AL,0xd JZ LAB_001089d0 CMP AL,0x7e JZ LAB_001089e0 CMP AL,0x60 JZ LAB_001089e0 MOV R13,qword ptr [.data:tti_to_num] ;= 0011d820 MOVSX EBX,AL MOV ESI,EBX MOV RDI=>.rodata:s_0123456789|=@:;}_0011d820,R13 ;= "0123456789|=@:;}" CALL .plt:::strchr ;char * strchr(char * __s, int __c) MOV EDI,0x7 TEST RAX,RAX JZ LAB_001089b5 SUB RAX,R13 MOV EDI,EBX OR EAX,R12D MOV byte ptr [RBP],AL LAB_001089b5: CALL tto_write ;undefined tto_write() CMP byte ptr [RBP],0xff JZ LAB_00108968 XOR EAX,EAX LAB_001089c2: ADD RSP,0x8 POP RBX POP RBP POP R12 POP R13 RET ?? 0Fh ?? 1Fh ?? 00h LAB_001089d0: MOV byte ptr [RBP],0x7f MOV EDI,0xd JMP LAB_001089b5 ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_001089e0: MOVSX EDI,AL MOV R12D,0x10 JMP LAB_001089b5 ?? 0Fh Actual src: t_stat tti_rnum (int8 *c) { int8 raw, flg = 0; char *cp; t_stat r; *c = -1; /* no char yet */ do { r = tti_read (&raw); /* get char */ if (r!= SCPE_OK) /* error? */ return r; if (raw == '\r') /* return? mark */ *c = 0x7F; else if ((raw == '~') || (raw == '`')) /* flag? mark */ flg = FLAG; else if (cp = strchr (tti_to_num, raw)) /* legal? */ *c = ((int8) (cp - tti_to_num)) | flg; /* assemble char */ else raw = 007; /* beep! */ tto_write (raw); /* echo */ } while (*c == -1); return SCPE_OK; } Predicted src: static int write_poll(const char *name) { int ret; if (name) ret = 1; if (name[0] == '\0') ret = 1; else if (name[0] == '\0') ret = 1; else if (name[0] == '\0') ret = 1; else if (name[0] == '\0') ret = 1; else if (name[0] == '\0') ret = 1; else if (name[0] == '\0') ret = 1; else if (name[0] == '\0') ret = 1; else if (name[0] == '\0') ret = 1; else if (name[0] == '\0') ret = 1; return ret; } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined _cffi_const_LGLSXP() MOV qword ptr [RDI],0xa XOR EAX,EAX RET ?? 66h f Actual src: static int _cffi_const_LGLSXP(unsigned long long *o) { int n = (LGLSXP) <= 0; *o = (unsigned long long)((LGLSXP) | 0); /* check that LGLSXP is an integer */ if (!_cffi_check_int(*o, n, 10U)) n |= 2; return n; } Predicted src: static int _cffi_const_NCKEY_NCKEY(unsigned long long *o) { int n = (NCKEY_NCKEY_NCKEY_NCKEY) <= 0; *o = (unsigned long long)((NCKEY_NCKEY_NCKEY_NCKEY) | 0); /* check that check that an integer */ return n; } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined pomodoro_stats_week_page_real_get_reference_value_data_free() PUSH RBP MOV RBP,RDI MOV RDI,qword ptr [RDI + 0x20] TEST RDI,RDI JZ LAB_00133eba CALL .plt.got:::g_object_unref ;undefined g_object_unref() MOV qword ptr [RBP + 0x20],0x0 LAB_00133eba: MOV RSI,RBP MOV EDI,0x30 POP RBP JMP .plt:::g_slice_free1 ;undefined g_slice_free1() ?? 0Fh Actual src: static void pomodoro_stats_week_page_real_get_reference_value_data_free (gpointer _data) { PomodoroStatsWeekPageGetReferenceValueData* _data_; _data_ = _data; _g_object_unref0 (_data_->self); g_slice_free (PomodoroStatsWeekPageGetReferenceValueData, _data_); } Predicted src: static void geary_imap_page_real_get_value_data_free_data_free (gpointer _data) { GearyImapEnginePageData* _data_; _data_ = _data; _g_object_unref0 (_data_->self); g_slice_free (GearyImapEnginePageData, _data_); }