============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined gimp_curves_tool_key_press() PUSH R13 MOV R13,RDX PUSH R12 MOV R12,RSI PUSH RBP MOV RBP,RDI CALL gimp_curves_tool_get_type ;undefined gimp_curves_tool_get_type() MOV RDI,RBP MOV RSI,RAX CALL .plt:::g_type_check_instance_cast ;undefined g_type_check_instance_cast() CMP qword ptr [RBP + 0x58],0x0 JZ LAB_0024f7fd MOV RDI,qword ptr [RAX + 0x2c8] TEST RDI,RDI JZ LAB_0024f7fd MOV RSI,R12 CALL .plt:::gtk_widget_event ;undefined gtk_widget_event() TEST EAX,EAX JNZ LAB_0024f830 LAB_0024f7fd: CALL gimp_tool_get_type ;undefined gimp_tool_get_type() MOV RDI,qword ptr [.bss:gimp_curves_tool_parent_class] MOV RSI,RAX CALL .plt:::g_type_check_class_cast ;undefined g_type_check_class_cast() MOV RDX,R13 MOV RSI,R12 MOV RDI,RBP MOV RAX,qword ptr [RAX + 0xd8] POP RBP POP R12 POP R13 JMP RAX ?? 0Fh ;? -> 00841f0f ?? 1Fh ?? 84h ?? 00h ?? 00h ?? 00h ?? 00h ?? 00h LAB_0024f830: POP RBP MOV EAX,0x1 POP R12 POP R13 RET ?? 0Fh Actual src: static gboolean gimp_curves_tool_key_press (GimpTool *tool, GdkEventKey *kevent, GimpDisplay *display) { GimpCurvesTool *c_tool = GIMP_CURVES_TOOL (tool); if (tool->display && c_tool->graph) { if (gtk_widget_event (c_tool->graph, (GdkEvent *) kevent)) return TRUE; } return GIMP_TOOL_CLASS (parent_class)->key_press (tool, kevent, display); } Predicted src: static void gimp_tool_tool_tool_finalize (GObject *object) { g_return_if_fail (object!= NULL); g_return_if_fail (object!= NULL); if (G_OBJECT_CLASS (parent_class)->finalize (object); } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined dev_c1700_mb_wic2t_set_nio() CMP EDX,0x1 JA LAB_00179172 ADD EDX,dword ptr [RSI + 0x20] CMP EDX,0x20 JZ LAB_00179188 JA LAB_00179168 CMP EDX,0x10 JZ LAB_00179180 CMP EDX,0x11 JNZ LAB_00179172 MOV ESI,0x3 LAB_0017914e: MOV RAX,qword ptr [RDI + 0xa20] MOV RDX,RCX MOV RDI,qword ptr [RAX + 0x510] JMP mpc860_scc_set_nio ;undefined mpc860_scc_set_nio() ?? 0Fh ?? 1Fh ?? 40h @ ?? 00h LAB_00179168: MOV ESI,0x2 CMP EDX,0x21 JZ LAB_0017914e LAB_00179172: MOV EAX,0xffffffff RET ?? 0Fh ?? 1Fh ?? 84h ?? 00h ?? 00h ?? 00h ?? 00h ?? 00h LAB_00179180: XOR ESI,ESI JMP LAB_0017914e ?? 0Fh ?? 1Fh ?? 40h @ ?? 00h LAB_00179188: MOV ESI,0x1 JMP LAB_0017914e ?? 90h Actual src: static int dev_c1700_mb_wic2t_set_nio(vm_instance_t *vm,struct cisco_card *card, u_int port_id,netio_desc_t *nio) { u_int scc_chan; if ((port_id > 1) || (dev_c1700_mb_wic_get_scc_chan(card,port_id,&scc_chan) == -1)) return(-1); return(mpc860_scc_set_nio(VM_C1700(vm)->mpc_data,scc_chan,nio)); } Predicted src: int hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined vncRandRGetOutputName() PUSH R12 MOVSXD RDI,EDI PUSH RBP SUB RSP,0x8 MOV RSI,qword ptr [.bss:randrGlueContext[8]] MOV RAX,qword ptr [RSI + 0x28] MOV RDX,qword ptr [RAX + RDI*0x8] MOV RDI,qword ptr [.bss:randrGlueContext] CALL .plt:::XRRGetOutputInfo ;undefined XRRGetOutputInfo() TEST RAX,RAX JZ LAB_00139f60 MOV RDI,qword ptr [RAX + 0x10] MOV RBP,RAX CALL .plt:::strdup ;char * strdup(char * __s) MOV RDI,RBP MOV R12,RAX CALL .plt:::XRRFreeOutputInfo ;undefined XRRFreeOutputInfo() ADD RSP,0x8 MOV RAX,R12 POP RBP POP R12 RET ?? 0Fh ?? 1Fh ?? 40h @ ?? 00h LAB_00139f60: ADD RSP,0x8 LEA RDI,[.rodata:s__00173901+14] ;= "" POP RBP POP R12 JMP .plt:::strdup ;char * strdup(char * __s) ?? 66h f Actual src: char *vncRandRGetOutputName(int outputIdx) { vncGlueContext *ctx = &randrGlueContext; XRROutputInfo *output = XRRGetOutputInfo(ctx->dpy, ctx->res, ctx->res->outputs[outputIdx]); if (!output) { return strdup(""); } char *ret = strdup(output->name); XRRFreeOutputInfo(output); return ret; } Predicted src: const char * GetName(const char *name) { if (name == NULL) { return NULL; } if (name[0] == '\0') { return NULL; } return name[1]; } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined txn_body_cleanup_txn_changes() MOV R8,RDI MOV RCX,qword ptr [RSI + 0x10] MOV RDI,qword ptr [RSI + 0x8] MOV RDX,RSI MOV RSI,qword ptr [R8] JMP .plt:LAB_00109bc0 ?? 66h f Actual src: static svn_error_t * txn_body_cleanup_txn_changes(void *baton, trail_t *trail) { const char *key = *(const char **)baton; return svn_fs_bdb__changes_delete(trail->fs, key, trail, trail->pool); } Predicted src: static void cleanup_cleanup(void *data, void *data EINA_UNUSED, void *event_info EINA_UNUSED, void *event_info EINA_UNUSED, void *event_info EINA_UNUSED, void *event_info EINA_UNUSED, void *event_info EINA_UNUSED, void *event_info EINA_UNUSED, void *event_info EINA_UNUSED, void *event_info EINA_UNUSED, void *event_info EINA_info EINA_UNUSED) { if (event_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info->user_info- ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* strcasestr_len(char const*, int, char const*) * ;************************************************************************************************************************************************************ ;undefined strcasestr_len(char * param_1, int param_2, char * param_3) ;param_1 char * RDI ;param_2 int ESI ;param_3 char * RDX PUSH R15 PUSH R14 MOV R14,param_1 MOV param_1,param_3 PUSH R13 MOV R13,param_3 PUSH R12 PUSH RBP MOVSXD RBP,param_2 PUSH RBX SUB RSP,0x8 CALL .plt:::strlen ;size_t strlen(char * __s) CMP RBP,RAX JL LAB_00135e08 MOV R15,RAX SUB RBP,RAX JS LAB_00135e08 XOR EBX,EBX JMP LAB_00135dd9 LAB_00135dd0: ADD RBX,0x1 CMP RBP,RBX JL LAB_00135e08 LAB_00135dd9: LEA R12,[R14 + RBX*0x1] MOV param_3,R15 MOV param_1,R13 MOV param_2,R12 CALL .plt:::g_ascii_strncasecmp ;undefined g_ascii_strncasecmp() TEST EAX,EAX JNZ LAB_00135dd0 LAB_00135def: ADD RSP,0x8 MOV RAX,R12 POP RBX POP RBP POP R12 POP R13 POP R14 POP R15 RET ?? 0Fh ?? 1Fh ?? 80h ?? 00h ?? 00h ?? 00h ?? 00h LAB_00135e08: XOR R12D,R12D JMP LAB_00135def ?? 0Fh Actual src: char *strcasestr_len(const char *haystack, int haystack_len, const char *needle) { gssize needle_len = (gssize)strlen(needle); int i; if (needle_len > haystack_len) return NULL; i = 0; while (i <= haystack_len - needle_len) { if (g_ascii_strncasecmp(needle, haystack + i, needle_len) == 0) return (char *)haystack + i; i++; } return NULL; } Predicted src: const char * g_size(const char *name, const char *name, size_t len) { size_t i; for (i = 0; i < len; i++) if (name[i] == '\0') return NULL; return g_strdup(name[i]); }