============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined norm0() MOVSD XMM0,qword ptr [.rodata:DAT_00102008] DIVSD XMM0,qword ptr [RDI] MOVSD qword ptr [RSI],XMM0 TEST EDX,EDX JLE LAB_001013a6 MOVSXD RDX,EDX JMP LAB_00101394 ?? 0Fh ?? 1Fh ?? 80h ?? 00h ?? 00h ?? 00h ?? 00h LAB_00101390: MOVSD XMM0,qword ptr [RSI] LAB_00101394: MULSD XMM0,qword ptr [RDI + RDX*0x8] MOVSD qword ptr [RSI + RDX*0x8],XMM0 SUB RDX,0x1 TEST EDX,EDX JG LAB_00101390 LAB_001013a6: RET ?? 66h f Actual src: void norm0(double *x, double *y, int m) { y[0] = 1 / x[0]; for (; m >= 1; m--) y[m] = x[m] * y[0]; return; } Predicted src: void set_value(const char *name, const char *name) { int i; int i; for (i = 0; i < n; i++) { for (i = 0; i < n; i++) { for (i = 0; i < n; i++) { } } } } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined gimp_brush_core_get_brush_mask() ;local_20 undefined8 -20 PUSH R12 MOVAPD XMM2,XMM0 PXOR XMM0,XMM0 PUSH RBP PUSH RBX SUB RSP,0x10 COMISD XMM0,XMM2 MOVSD qword ptr [RSP + local_20+0x28],XMM2 JNC LAB_005cab5e MOV R12,RSI MOV RSI,qword ptr [RDI + 0x1e8] MOV RBP,RDI MOV EBX,EDX CALL gimp_brush_core_transform_mask ;undefined gimp_brush_core_transform_... MOV RSI,RAX TEST RAX,RAX JZ LAB_005cab5e CMP EBX,0x1 JZ LAB_005cabb0 CMP EBX,0x2 MOVSD XMM2,qword ptr [RSP + local_20+0x28] JZ LAB_005cab90 TEST EBX,EBX JZ LAB_005cab70 LEA R9,[.rodata:__func__.2] ;= "gimp_brush_core_get_brush_mask" MOV R8D,0x45d XOR EAX,EAX MOV ESI,0x8 LEA RCX,[.rodata:s_gimpbrushcore.c_0071780d] ;= "gimpbrushcore.c" LEA RDX,[.rodata:s_file_%s:_line_%d_(%s):_should_no_006531f0] ;= "file %s: line %d (%s): should not... LEA RDI,[.rodata:s_Gimp-Paint_0064f994] ;= "Gimp-Paint" CALL .plt:::g_log ;undefined g_log() LAB_005cab5e: ADD RSP,0x10 XOR EAX,EAX POP RBX POP RBP POP R12 RET ?? 0Fh ?? 1Fh ?? 80h ?? 00h ?? 00h ?? 00h ?? 00h LAB_005cab70: MOVSD XMM1,qword ptr [R12 + 0x8] MOVSD XMM0,qword ptr [R12] MOV RDI,RBP ADD RSP,0x10 POP RBX POP RBP POP R12 JMP gimp_brush_core_solidify_mask ;undefined gimp_brush_core_solidify_m... ?? 0Fh ?? 1Fh ?? 00h LAB_005cab90: MOVSD XMM1,qword ptr [R12 + 0x8] MOVSD XMM0,qword ptr [R12] MOV RDI,RBP ADD RSP,0x10 POP RBX POP RBP POP R12 JMP gimp_brush_core_pressurize_mask ;undefined gimp_brush_core_pressurize... ?? 0Fh ?? 1Fh ?? 00h LAB_005cabb0: MOVSD XMM1,qword ptr [R12 + 0x8] MOVSD XMM0,qword ptr [R12] MOV RDI,RBP ADD RSP,0x10 POP RBX POP RBP POP R12 JMP gimp_brush_core_subsample_mask ;undefined gimp_brush_core_subsample_... ?? 0Fh Actual src: const GimpTempBuf * gimp_brush_core_get_brush_mask (GimpBrushCore *core, const GimpCoords *coords, GimpBrushApplicationMode brush_hardness, gdouble dynamic_force) { const GimpTempBuf *mask; if (dynamic_force <= 0.0) return NULL; mask = gimp_brush_core_transform_mask (core, core->brush); if (! mask) return NULL; switch (brush_hardness) { case GIMP_BRUSH_SOFT: return gimp_brush_core_subsample_mask (core, mask, coords->x, coords->y); break; case GIMP_BRUSH_HARD: return gimp_brush_core_solidify_mask (core, mask, coords->x, coords->y); break; case GIMP_BRUSH_PRESSURE: return gimp_brush_core_pressurize_mask (core, mask, coords->x, coords->y, dynamic_force); break; } g_return_val_if_reached (NULL); } Predicted src: static void _cb (const char *name, const gchar *name) { const gchar *name = NULL; if (name == NULL) { if (name == NULL) { { if (name == NULL) { return; } if (name == NULL) { { { { { { if (name == NULL) { { { { { { { { { { } if (name == NULL) { { { { { { { { } { { { } { { { } { } { } } } } { g_free (name); } } } } } } } } } ============================== 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: void on(const char *name, const char *name, const char *name) { char *name = NULL; char *name = NULL; char *name = NULL; char *name = NULL; char *name = NULL; char *name = NULL; char *name = NULL; char *name = NULL; char *name = NULL; char *name = NULL; char *name = NULL; char *name = NULL; char *name = NULL; char *name = NULL; char *name = NULL; char *name = NULL; char *name = NULL; char *name = NULL; char *name = NULL; char *name = NULL; char *name = NULL; char *name; char *name = NULL; char *name = NULL; char *name; char *name = NULL; char *name = NULL; char *name; char *name = NULL; char *name; char *name = NULL; char *name = *name; char *name = *name; char *name; char *name = *name; char *name; char *name; char *name = *name; char *name; char *name = *name; char *name; char *name; char *name; char *name = *name; char *name; char *name; char *name; char *name = *name; char *name; char *name = *name; char *name; char *name; char *name; char *name; char *name = *name; char *name; char *name; char *name; char *name = *name; char *name; } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined TSUserArgGet() PUSH RBX MOV EBX,ESI TEST RDI,RDI JZ LAB_00216ab0 MOV RCX,-0x2 LEA RDX,[.data.rel.ro:PluginUserArgsMixin::typeinfo] ;= 007686b0 LEA RSI,[.data.rel.ro:Continuation::typeinfo] ;= 00768430 CALL .plt:::__dynamic_cast ;undefined __dynamic_cast() MOV RDI,RAX TEST RAX,RAX JZ LAB_00216ae6 MOV RAX,qword ptr [RAX] MOVSXD RSI,EBX POP RBX MOV RAX,qword ptr [RAX + 0x10] JMP RAX ?? 66h f ?? 0Fh ?? 1Fh ?? 84h ?? 00h ?? 00h ?? 00h ?? 00h ?? 00h LAB_00216ab0: MOVSXD RSI,ESI CMP RSI,0x7f JBE LAB_00216ad8 MOV EDX,0x38 LEA RSI,[.rodata:s_../include/tscore/PluginUserArgs_005153a0+16] ;= "../include/tscore/PluginUserArgs.h" LEA RDI,[.rodata:s_ix_<_user_args.size()_005153d3] ;= "ix < user_args.size()" CALL .plt:::_ink_assert ;undefined _ink_assert() NOP dword ptr [RAX] LAB_00216ad8: LEA RAX,[.bss:global_user_args] POP RBX MOV RAX,qword ptr [RAX + RSI*offset.bss:global_user_args[8] &0xff + 0x8] RET LAB_00216ae6: MOV EDX,0x190e LEA RSI,[.rodata:s_traffic_server/InkAPI.cc_005153e9] ;= "traffic_server/InkAPI.cc" LEA RDI,[.rodata:s_user_args_005154ef] ;= "user_args" CALL .plt:::_ink_assert ;undefined _ink_assert() NOP Actual src: void * TSUserArgGet(void *data, int arg_idx) { if (nullptr!= data) { PluginUserArgsMixin *user_args = dynamic_cast(static_cast(data)); sdk_assert(user_args); return user_args->get_user_arg(arg_idx); } else { return global_user_args.get_user_arg(arg_idx); } } Predicted src: static void C_ccall f(C_word c,C_word *av){ C_word tmp; C_word t0=av[0]; C_word t1=av[1]; C_word t1=av[1]; C_word t2; C_word *a; C_word *a; C_word *a; C_word *a; C_word *a; if(C_demand(C_demand(C_demand(C_demand(c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c); t2=C_word*)t2=C_word*)t0)[2]=t2; C_word*)t0)[2]=t0)[2; C_word*)t0)[2; C_word*)t1]=t2; C_word*)t2; C_word*)t2; if(C_word) { av2=C_word*)t2=C_word*)t0)[2=C_word*)t0)[2=C_word*)t0)[2]=t0)[2; } else { av2=C_word*)t2=C_word*)t2=C_word*)t2=C_word*)t0)[2; } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined _proxy__wrap_new_hamlib_port_post_write_date() PUSH RBP MOV ESI,0x1 MOV RBP,RDI CALL .plt:lua_type ;undefined lua_type() CMP EAX,0x5 JNZ LAB_001243a6 XOR EDX,EDX LEA RSI,[_wrap_new_hamlib_port_post_write_date] MOV RDI,RBP CALL .plt:lua_pushcclosure ;undefined lua_pushcclosure() MOV ESI,0xffffffff MOV RDI,RBP CALL .plt:lua_type ;undefined lua_type() TEST EAX,EAX JZ LAB_001243c5 MOV ESI,0x1 MOV RDI,RBP CALL .plt:lua_replace ;undefined lua_replace() MOV RDI,RBP CALL .plt:lua_gettop ;undefined lua_gettop() MOV RDI,RBP XOR R8D,R8D XOR ECX,ECX LEA ESI,[RAX + -0x1] MOV EDX,0x1 CALL .plt:lua_callk ;undefined lua_callk() MOV EAX,0x1 POP RBP RET LAB_001243a6: LEA RCX,[.rodata:__PRETTY_FUNCTION__.54] ;= "_proxy__wrap_new_hamlib_port_post... MOV EDX,0x5576 LEA RSI,[.rodata:s_hamliblua_wrap.c_001d2000] ;= "hamliblua_wrap.c" LEA RDI,[.rodata:s_lua_istable(L,1)_001d2096] ;= "lua_istable(L,1)" CALL .plt:::__assert_fail ;void __assert_fail(char * __assertio... LAB_001243c5: LEA RCX,[.rodata:__PRETTY_FUNCTION__.54] ;= "_proxy__wrap_new_hamlib_port_post... MOV EDX,0x5578 LEA RSI,[.rodata:s_hamliblua_wrap.c_001d2000] ;= "hamliblua_wrap.c" LEA RDI,[.rodata:s_!lua_isnil(L,-1)_001d20a7] ;= "!lua_isnil(L,-1)" CALL .plt:::__assert_fail ;void __assert_fail(char * __assertio... NOP dword ptr CS:[RAX + RAX*0x1] Actual src: static int _proxy__wrap_new_hamlib_port_post_write_date(lua_State *L) { assert(lua_istable(L,1)); lua_pushcfunction(L,_wrap_new_hamlib_port_post_write_date); assert(!lua_isnil(L,-1)); lua_replace(L,1); /* replace our table with real constructor */ lua_call(L,lua_gettop(L)-1,1); return 1; } Predicted src: static PyObject *py_new(PyObject *self, PyObject *args, PyObject *args, PyObject *args) { PyObject *py_obj; if (!args) { return NULL; } if (!args) { return NULL; } else { return NULL; } return NULL; } return NULL; }