============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined CheckForUnclosedCatches() PUSH R12 XOR R12D,R12D PUSH RBP PUSH RBX MOV RAX,qword ptr [RDI + 0x80] CMP dword ptr [RAX + 0x48],0x1 JA LAB_0013d6f0 LAB_0013d6e4: MOV EAX,R12D POP RBX POP RBP POP R12 RET ?? 0Fh ?? 1Fh ?? 40h @ ?? 00h LAB_0013d6f0: MOV RBX,RDI MOV R12D,0x1 TEST byte ptr [RDI + 0x96],0x4 JZ LAB_0013d6e4 MOV RAX,qword ptr [RDI] MOV ESI,0xffffffff LEA RDI,[.rodata:s_catch_still_active_on_exit_from_a_0026f308] ;= "catch still active on exit from a... MOV RBP,qword ptr [RAX] CALL .plt:Tcl_NewStringObj ;undefined Tcl_NewStringObj() MOV RSI,RAX MOV RDI,RBP CALL .plt:Tcl_SetObjResult ;undefined Tcl_SetObjResult() MOV RAX,qword ptr [RBX + 0x80] MOV RDI,RBP MOV RAX,qword ptr [RAX + 0x50] MOV ESI,dword ptr [RAX + 0x8] CALL .plt:Tcl_SetErrorLine ;undefined Tcl_SetErrorLine() MOV RDI,RBP XOR EAX,EAX XOR R8D,R8D LEA RCX,[.rodata:s_UNCLOSEDCATCH_0026ef21] ;= "UNCLOSEDCATCH" LEA RDX,[.rodata:s_ASSEM_0026edd1] ;= "ASSEM" LEA RSI,[.rodata:DAT_0026edd7] ;= 54h T CALL .plt:Tcl_SetErrorCode ;undefined Tcl_SetErrorCode(undefined... MOV EAX,R12D POP RBX POP RBP POP R12 RET ?? 66h f Actual src: static int CheckForUnclosedCatches( AssemblyEnv* assemEnvPtr) /* Assembly environment */ { CompileEnv* envPtr = assemEnvPtr->envPtr; /* Compilation environment */ Tcl_Interp* interp = (Tcl_Interp*) envPtr->iPtr; /* Tcl interpreter */ if (assemEnvPtr->curr_bb->catchState >= BBCS_INCATCH) { if (assemEnvPtr->flags & TCL_EVAL_DIRECT) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "catch still active on exit from assembly code", -1)); Tcl_SetErrorLine(interp, assemEnvPtr->curr_bb->enclosingCatch->startLine); Tcl_SetErrorCode(interp, "TCL", "ASSEM", "UNCLOSEDCATCH", NULL); } return TCL_ERROR; } return TCL_OK; } Predicted src: static int Tcl_Command(Tcl_Interp *interp, int argc, Tcl_Obj *argv) { Tcl_Obj *interp = (Tcl_Obj *)interp; Tcl_Obj *interp = (Tcl_Obj *)interp; Tcl_Obj *interp = (Tcl_Obj *)interp->interp; Tcl_Obj *interp; if (interp == TCL_OK) { Tcl_Tcl_Obj(interp, "Tcl_Command", "Tcl_Command", "Tcl_Command", -1, "Tcl_Command", -1); return TCL_OK; } Tcl_ObjObj(interp,interp, "Tcl_Command", -1); return TCL_OK; } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined gimp_draw_tool_add_sample_point() PUSH R14 PUSH R13 PUSH R12 PUSH RBP SUB RSP,0x8 TEST RDI,RDI JZ LAB_00252220 MOV RBP,RDI MOV R12D,ESI MOV R13D,EDX MOV R14D,ECX CALL gimp_draw_tool_get_type ;undefined gimp_draw_tool_get_type() MOV RSI,RAX MOV RAX,qword ptr [RBP] TEST RAX,RAX JZ LAB_002521c6 CMP qword ptr [RAX],RSI JZ LAB_002521d2 LAB_002521c6: MOV RDI,RBP CALL .plt:::g_type_check_instance_is_a ;undefined g_type_check_instance_is_a() TEST EAX,EAX JZ LAB_00252220 LAB_002521d2: MOV RDI,qword ptr [RBP + 0x178] CALL gimp_display_get_shell ;undefined gimp_display_get_shell() MOV ECX,R14D MOV EDX,R13D MOV ESI,R12D MOV R8D,0x1 MOV RDI,RAX CALL gimp_canvas_sample_point_new ;undefined gimp_canvas_sample_point_n... MOV RDI,RBP MOV R12,RAX MOV RSI,RAX CALL gimp_draw_tool_add_item ;undefined gimp_draw_tool_add_item() MOV RDI,R12 CALL .plt.got:::g_object_unref ;undefined g_object_unref() ADD RSP,0x8 MOV RAX,R12 POP RBP POP R12 POP R13 POP R14 RET ?? 66h f ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_00252220: LEA RDX,[.rodata:s_GIMP_IS_DRAW_TOOL_(draw_tool)_00674a44] ;= "GIMP_IS_DRAW_TOOL (draw_tool)" LEA RSI,[.rodata:__func__.10] ;= "gimp_draw_tool_add_sample_point" XOR R12D,R12D LEA RDI,[.rodata:s_Gimp-Tools_0064f9c7] ;= "Gimp-Tools" CALL .plt:::g_return_if_fail_warning ;undefined g_return_if_fail_warning() ADD RSP,0x8 MOV RAX,R12 POP RBP POP R12 POP R13 POP R14 RET ?? 0Fh Actual src: GimpCanvasItem * gimp_draw_tool_add_sample_point (GimpDrawTool *draw_tool, gint x, gint y, gint index) { GimpCanvasItem *item; g_return_val_if_fail (GIMP_IS_DRAW_TOOL (draw_tool), NULL); item = gimp_canvas_sample_point_new (gimp_display_get_shell (draw_tool->display), x, y, index, TRUE); gimp_draw_tool_add_item (draw_tool, item); g_object_unref (item); return item; } Predicted src: static gboolean gimp_tool_tool_add_item (GimpTool *tool, GimpTool *tool) { GimpTool *tool = GIMP_TOOL_ITEM (tool); g_return_val_if_fail (GIMP_IS_TOOL_ITEM (tool), FALSE); gimp_tool_add_item (tool->tool, GIMP_TOOL_ITEM (tool), GIMP_TOOL_ITEM (tool)); return TRUE; } ============================== Sample 3 ============================== 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 PyObject * _cffi_f_f_f_f_f_f_array(PyObject *self, PyObject *arg0) { PyObject *arg1; struct _cffi_s *arg2; PyObject *arg3; struct _cffi_obj *arg3; const char *arg3; if (!PyArg_ParseTuple(args, kwargs, (char *)0, (char *)0, (char **)&obj0, &arg1, &arg2)) return NULL; Py_BEGIN_ALLOW_THREADS _cffi_restore_errno(); { result = _cffi_errno_errno(); } _cffi_restore_errno(); Py_END_ALLOW_THREADS (void)self; /* unused */ Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); return Py_None; } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined xdp_camera_proxy_get_is_camera_present() PUSH R12 XOR R12D,R12D PUSH RBP MOV RBP,RDI SUB RSP,0x8 CALL xdp_camera_proxy_get_type ;undefined xdp_camera_proxy_get_type() MOV RDI,RBP MOV RSI,RAX CALL .plt:::g_type_check_instance_cast ;undefined g_type_check_instance_cast() MOV RBP,RAX CALL .plt:::g_dbus_proxy_get_type ;undefined g_dbus_proxy_get_type() MOV RDI,RBP MOV RSI,RAX CALL .plt:::g_type_check_instance_cast ;undefined g_type_check_instance_cast() LEA RSI,[.rodata:s_IsCameraPresent_001a19d0] ;= "IsCameraPresent" MOV RDI,RAX CALL .plt:::g_dbus_proxy_get_cached_property ;undefined g_dbus_proxy_get_cached_pr... TEST RAX,RAX JZ LAB_0014af3a MOV RBP,RAX MOV RDI,RAX CALL .plt:::g_variant_get_boolean ;undefined g_variant_get_boolean() MOV RDI,RBP MOV R12D,EAX CALL .plt.got:::g_variant_unref ;undefined g_variant_unref() LAB_0014af3a: ADD RSP,0x8 MOV EAX,R12D POP RBP POP R12 RET ?? 66h f Actual src: static gboolean xdp_camera_proxy_get_is_camera_present (XdpCamera *object) { XdpCameraProxy *proxy = XDP_CAMERA_PROXY (object); GVariant *variant; gboolean value = 0; variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "IsCameraPresent"); if (variant!= NULL) { value = g_variant_get_boolean (variant); g_variant_unref (variant); } return value; } Predicted src: static gboolean udisks_exported_player_proxy_get_is_property (GObject *object) { GVariant *variant; gboolean value = 0; variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "is-property"); if (variant!= NULL) { value = g_variant_get_boolean (G_DBUS_PROXY (proxy), "is-property"); g_variant_unref (variant); } return value; } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined _champVLAFree() MOV R8,RDI MOV ECX,0x2 LEA RDI,[RDX + -0x10] MOV EDX,ESI MOV RSI,R8 JMP OSMemoryFree ;undefined OSMemoryFree() ?? 66h f Actual src: void _champVLAFree(const char *file,int line,void *ptr) #endif { VLARec *vla; vla = &(((VLARec*)ptr)[-1]); #ifndef _os_memory_debug_on os_free(vla); #else OSMemoryFree(vla,file,line,_OSMemoryVLA); #endif } Predicted src: void FreeFree(void *ptr, size_t size, size_t size) { FreeFree(ptr, size, size); }