============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined mi_free_size_aligned() MOV R8,RDX MOV RAX,RDI XOR EDX,EDX PUSH R12 DIV R8 PUSH RBP MOV R12,RSI SUB RSP,0x8 MOV RBP,RDI TEST RDX,RDX JNZ LAB_003191c0 ADD RSP,0x8 MOV RSI,R12 MOV RDI,RBP POP RBP POP R12 JMP mi_free_size ;undefined mi_free_size() ?? 90h LAB_003191c0: LEA RCX,[.rodata:__func__.3] ;= "mi_free_size_aligned" MOV EDX,0x219 LEA RSI,[.rodata:s_./extlib/mimalloc/src/alloc.c_003c138d] ;= "./extlib/mimalloc/src/alloc.c" LEA RDI,[.rodata:s_((uintptr_t)p_%_alignment)_==_0_003c1330] ;= "((uintptr_t)p % alignment) == 0" CALL _mi_assert_fail ;undefined _mi_assert_fail() ?? EBh ?? CCh ?? 66h f Actual src: void mi_free_size_aligned(void* p, size_t size, size_t alignment) mi_attr_noexcept { UNUSED_RELEASE(alignment); mi_assert(((uintptr_t)p % alignment) == 0); mi_free_size(p,size); } Predicted src: void p_alloc_size(void *p, size_t size) { size_t i; for (i = 0; i < size; i++) { p_alloc_free(p, size); } } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined up_client_initable_init() PUSH R13 MOV R13,RDX PUSH R12 MOV R12,RDI PUSH RBP MOV RBP,RSI PUSH RBX SUB RSP,0x8 CALL .plt:up_client_get_type ;undefined up_client_get_type() MOV RDI,R12 MOV RSI,RAX CALL .plt:::g_type_check_instance_cast ;undefined g_type_check_instance_cast() MOV EDI,0x1 MOV R9,R13 MOV R8,RBP MOVSXD RBX,dword ptr [.bss:UpClient_private_offset] ;=?? LEA RCX,[.rodata:s_/org/freedesktop/UPower_0011e31a] ;= "/org/freedesktop/UPower" XOR ESI,ESI MOV R12,RAX LEA RDX,[.rodata:s_org.freedesktop.UPower_0011e332] ;= "org.freedesktop.UPower" ADD RBX,RAX MOV qword ptr [RAX + 0x18],RBX CALL .plt:up_exported_daemon_proxy_new_for_bus_sync ;undefined up_exported_daemon_proxy_n... MOV qword ptr [RBX],RAX MOV RAX,qword ptr [R12 + 0x18] MOV RDI,qword ptr [RAX] XOR EAX,EAX TEST RDI,RDI JZ LAB_0010d17f XOR R9D,R9D XOR R8D,R8D LEA RDX,[up_device_added_cb] MOV RCX,R12 LEA RSI,[.rodata:s_device-added_0011e2fe] ;= "device-added" CALL .plt:::g_signal_connect_data ;undefined g_signal_connect_data() MOV RAX,qword ptr [R12 + 0x18] XOR R9D,R9D XOR R8D,R8D MOV RCX,R12 LEA RDX,[up_device_removed_cb] LEA RSI,[.rodata:s_device-removed_0011e30b] ;= "device-removed" MOV RDI,qword ptr [RAX] CALL .plt:::g_signal_connect_data ;undefined g_signal_connect_data() MOV RAX,qword ptr [R12 + 0x18] XOR R9D,R9D XOR R8D,R8D MOV RCX,R12 LEA RDX,[up_client_notify_cb] LEA RSI,[.rodata:s_notify_0011e349] ;= "notify" MOV RDI,qword ptr [RAX] CALL .plt:::g_signal_connect_data ;undefined g_signal_connect_data() MOV EAX,0x1 LAB_0010d17f: ADD RSP,0x8 POP RBX POP RBP POP R12 POP R13 RET ?? 66h f Actual src: static gboolean up_client_initable_init (GInitable *initable, GCancellable *cancellable, GError **error) { UpClient *client = UP_CLIENT (initable); client->priv = up_client_get_instance_private (client); /* connect to main interface */ client->priv->proxy = up_exported_daemon_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_NONE, "org.freedesktop.UPower", "/org/freedesktop/UPower", cancellable, error); if (client->priv->proxy == NULL) return FALSE; /* all callbacks */ g_signal_connect (client->priv->proxy, "device-added", G_CALLBACK (up_device_added_cb), client); g_signal_connect (client->priv->proxy, "device-removed", G_CALLBACK (up_device_removed_cb), client); g_signal_connect (client->priv->proxy, "notify", G_CALLBACK (up_client_notify_cb), client); return TRUE; } Predicted src: static void on_client_proxy_init (GObject *object, GAsyncResult *res, gpointer user_data) { GProxy *proxy = user_data; GProxyPrivate *priv = G_DBUS_PRIVATE (user_data); g_assert (priv->client!= NULL); priv->client = g_signal_connect (priv->client, "notify", G_CALLBACK (on_client_proxy_cb), res, NULL); g_signal_connect (priv->client, "notify", G_CALLBACK (on_client_proxy_cb), res, NULL); g_signal_connect (priv->client, "notify", G_CALLBACK (on_client_proxy_cb), res, NULL); } ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined _wrap_event_class_create_with_id() ;local_20 undefined8 -20 ;local_30 undefined8 -30 ;local_38 undefined8 -38 ;local_40 undefined8 -40 ;local_48 undefined8 -48 PUSH R12 MOV RDI,RSI MOV ECX,0x2 MOV EDX,0x2 PUSH RBP LEA RSI,[.rodata:s_event_class_create_with_id_0018964f] ;= "event_class_create_with_id" XOR R12D,R12D SUB RSP,0x38 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + local_20+0x48],RAX XOR EAX,EAX LEA R8=>local_38,[RSP + 0x10] MOV qword ptr [RSP]=>local_48,0x0 CALL SWIG_Python_UnpackTuple ;undefined SWIG_Python_UnpackTuple() TEST RAX,RAX JZ LAB_00147beb MOV RDI,qword ptr [RSP + local_38+0x48] MOV RDX,qword ptr [.bss:swig_types[1072]] MOV RSI,RSP CALL SWIG_Python_ConvertPtrAndOwn.constprop.0 ;undefined SWIG_Python_ConvertPtrAndO... MOV EDI,EAX TEST EAX,EAX JS LAB_00147c38 MOV RDI,qword ptr [RSP + local_30+0x48] LEA RSI=>local_40,[RSP + 0x8] MOV RBP,qword ptr [RSP]=>local_48 CALL SWIG_AsVal_unsigned_SS_long_SS_long ;undefined SWIG_AsVal_unsigned_SS_lon... MOV EDI,EAX TEST EAX,EAX JS LAB_00147c10 MOV RSI=>local_40,qword ptr [RSP + 0x8] MOV RDI,RBP CALL .plt:::bt_event_class_create_with_id ;undefined bt_event_class_create_with... MOV RSI,qword ptr [.bss:swig_types[256]] MOV RDI,RAX CALL SWIG_Python_NewPointerObj.constprop.0 ;undefined SWIG_Python_NewPointerObj.... MOV R12,RAX LAB_00147beb: MOV RAX,qword ptr [RSP + local_20+0x48] SUB RAX,qword ptr FS:[0x28] JNZ LAB_00147c59 ADD RSP,0x38 MOV RAX,R12 POP RBP POP R12 RET ?? 66h f ?? 2Eh . ?? 0Fh ?? 1Fh ?? 84h ?? 00h ?? 00h ?? 00h ?? 00h ?? 00h LAB_00147c10: CMP EAX,-0x1 MOV EAX,0xfffffffb LEA RSI,[.rodata:s_in_method_'event_class_create_wi_001749a8] ;= "in method 'event_class_create_wit... CMOVZ EDI,EAX CALL SWIG_Python_ErrorType ;undefined SWIG_Python_ErrorType() MOV RDI,RAX CALL .plt:PyErr_SetString ;undefined PyErr_SetString() JMP LAB_00147beb ?? 0Fh ?? 1Fh ?? 80h ?? 00h ?? 00h ?? 00h ?? 00h LAB_00147c38: CMP EAX,-0x1 MOV EAX,0xfffffffb LEA RSI,[.rodata:s_in_method_'event_class_create_wi_00174958] ;= "in method 'event_class_create_wit... CMOVZ EDI,EAX CALL SWIG_Python_ErrorType ;undefined SWIG_Python_ErrorType() MOV RDI,RAX CALL .plt:PyErr_SetString ;undefined PyErr_SetString() JMP LAB_00147beb LAB_00147c59: CALL .plt:::__stack_chk_fail ;undefined __stack_chk_fail() NOP Actual src: SWIGINTERN PyObject *_wrap_event_class_create_with_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; bt_stream_class *arg1 = (bt_stream_class *) 0 ; uint64_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned long long val2 ; int ecode2 = 0 ; PyObject *swig_obj[2] ; bt_event_class *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "event_class_create_with_id", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_bt_stream_class, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_class_create_with_id" "', argument " "1"" of type '" "bt_stream_class *""'"); } arg1 = (bt_stream_class *)(argp1); ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "event_class_create_with_id" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = (uint64_t)(val2); result = (bt_event_class *)bt_event_class_create_with_id(arg1,arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_bt_event_class, 0 | 0 ); return resultobj; fail: return NULL; } Predicted src: SWIGINTERN PyObject *_wrap_class_class_create_class_class(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; bt_class_class *arg1 = (bt_class_class *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; int result; if (!args) SWIG_fail; swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_bt_class_class, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "class_class_create_class_class" "', argument " "1"" of type '" "bt_class_class *""'"); } arg1 = (bt_class_class *)(argp1); result = (int)bt_class_class_create_class_class((struct bt_class const *)arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_bt_class_class, 0 | 0 ); return resultobj; fail: return NULL; } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined gp_arrow_button_constructed() PUSH RBP MOV RBP,RDI MOV RDI,qword ptr [.bss:gp_arrow_button_parent_class] ;=?? MOV ESI,0x50 CALL .plt:::g_type_check_class_cast ;undefined g_type_check_class_cast() MOV RDI,RBP CALL qword ptr [RAX + 0x48] CALL .plt:::gtk_widget_get_type ;undefined gtk_widget_get_type() MOV RDI,RBP MOV RSI,RAX CALL .plt:::g_type_check_instance_cast ;undefined g_type_check_instance_cast() MOV RDI,RAX CALL .plt:::gtk_widget_get_accessible ;undefined gtk_widget_get_accessible() LEA RSI,[.rodata:s_Hide_Panel_00138771] ;= "Hide Panel" XOR EDI,EDI MOV EDX,0x5 MOV RBP,RAX CALL .plt:::dcgettext ;undefined dcgettext() MOV RDI,RBP POP RBP MOV RSI,RAX JMP .plt:::atk_object_set_name ;undefined atk_object_set_name() ?? 66h f Actual src: static void gp_arrow_button_constructed (GObject *object) { GtkWidget *widget; AtkObject *atk; G_OBJECT_CLASS (gp_arrow_button_parent_class)->constructed (object); widget = GTK_WIDGET (object); atk = gtk_widget_get_accessible (widget); atk_object_set_name (atk, _("Hide Panel")); } Predicted src: static void gtk_button_button_dispose (GObject *object) { GtkWidget *widget; widget = GTK_WIDGET_CLASS (parent_class)->dispose (object); GTK_WIDGET_CLASS (parent_class)->dispose (object); } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined _deliver_in_sess() PUSH RBP MOV RBP,RDX PUSH RBX MOV RBX,RSI SUB RSP,0x8 MOV R8,qword ptr [RDX + 0x30] MOV RDI,qword ptr [RSI + 0x10] TEST R8,R8 JZ LAB_001011ea MOV RSI,RDI MOV RDI,R8 CALL .plt:jid_compare_user ;undefined jid_compare_user() TEST EAX,EAX JZ LAB_00101238 LAB_001011d8: MOV RDI,qword ptr [RBP + 0x30] TEST RDI,RDI JZ LAB_001011e6 CALL .plt:jid_free ;undefined jid_free() LAB_001011e6: MOV RDI,qword ptr [RBX + 0x10] LAB_001011ea: CALL .plt:jid_dup ;undefined jid_dup() MOV qword ptr [RBP + 0x30],RAX MOV RDI,RAX CALL .plt:jid_full ;undefined jid_full() MOV RDI,qword ptr [RBP + 0x40] XOR R9D,R9D LEA RCX,[.rodata:DAT_00102000] ;= 66h f MOV R8,RAX MOV EDX,0xffffffff MOV ESI,0x1 CALL .plt:nad_set_attr ;undefined nad_set_attr() LAB_0010121b: CMP qword ptr [RBP + 0x28],0x0 JZ LAB_00101258 LAB_00101222: MOV RDI,RBP CALL .plt:pkt_router ;undefined pkt_router() XOR EAX,EAX LAB_0010122c: ADD RSP,0x8 POP RBX POP RBP RET ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_00101238: TEST byte ptr [RBP + 0x24],0x60 JNZ LAB_0010121b MOV RSI,qword ptr [RBX + 0x10] MOV RDI,qword ptr [RBP + 0x30] CALL .plt:jid_compare_full ;undefined jid_compare_full() TEST EAX,EAX JNZ LAB_001011d8 JMP LAB_0010121b ?? 0Fh ?? 1Fh ?? 80h ?? 00h ?? 00h ?? 00h ?? 00h LAB_00101258: MOV EDX,dword ptr [RBP + 0x24] CMP EDX,0x82 JZ LAB_001012b0 AND EDX,0x80 MOV EAX,0xffffff9a JNZ LAB_0010122c MOV RDI,qword ptr [RBX + 0x10] CALL .plt:jid_dup ;undefined jid_dup() MOV qword ptr [RBP + 0x28],RAX MOV RDI,RAX CALL .plt:jid_full ;undefined jid_full() MOV RDI,qword ptr [RBP + 0x40] XOR R9D,R9D LEA RCX,[.rodata:DAT_00102005] ;= 74h t MOV R8,RAX MOV EDX,0xffffffff MOV ESI,0x1 CALL .plt:nad_set_attr ;undefined nad_set_attr() JMP LAB_00101222 ?? 66h f ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_001012b0: MOV RDI,RBP CALL .plt:pkt_free ;undefined pkt_free() XOR EAX,EAX JMP LAB_0010122c ?? 90h Actual src: static mod_ret_t _deliver_in_sess(mod_instance_t mi, sess_t sess, pkt_t pkt) { /* ensure from is set correctly if not already by client */ if(pkt->from == NULL || jid_compare_user(pkt->from, sess->jid)!= 0 || (!(pkt->type & pkt_PRESENCE) &&!(pkt->type & pkt_S10N) && jid_compare_full(pkt->from, sess->jid)!= 0)) { if(pkt->from!= NULL) jid_free(pkt->from); pkt->from = jid_dup(sess->jid); nad_set_attr(pkt->nad, 1, -1, "from", jid_full(pkt->from), 0); } /* no to address means its to us */ if(pkt->to == NULL) { /* drop iq-result packets */ /* user client is confirming all iq-set, but we usually do not track these * confirmations and we need to drop it here, not loop back to client */ if(pkt->type == pkt_IQ_RESULT) { pkt_free(pkt); return mod_HANDLED; } /* iq packets without to should have been already handled by modules */ if(pkt->type & pkt_IQ) { return -stanza_err_FEATURE_NOT_IMPLEMENTED; } /* supplant user jid as 'to' */ pkt->to = jid_dup(sess->jid); nad_set_attr(pkt->nad, 1, -1, "to", jid_full(pkt->to), 0); } /* let it go on the wire */ pkt_router(pkt); return mod_HANDLED; } Predicted src: static int _set_free(void *arg, void *arg) { struct _user_data *user_data = arg; struct _user_data *user_data = arg; struct _user_data *user_data = user_data; struct _user_data *user_data = user_data->user_data; struct _user_data *user_data = user_data->user_data; struct _user_data *user_data = user_data->user_data; struct _user_data *data = user_data->user_data; struct _user_data *user_data = user_data->user_data; struct _user_data *user_data = user_data->user_data; if (user_data->user_data) { _free(user_data->user_data); data->user_data = user_data->user_data; data->user_data = user_data->user_data; } else { data->user_data = user_data->user_data; data->user_data = user_data->user_data; data->user_data = user_data->user_data; } else { data->user_data = user_data->user_data; data->user_data = user_data->user_data; data->user_data = user_data->user_data; } return 0; }