============================== Sample 1 ============================== 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: const char * useruserGet(useruser_t *user, int flags) { assert(user!= NULL); assert(user->user_user!= NULL); return user->user_user->user_user; } ============================== Sample 2 ============================== 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: int Tcl_FreeLine( Tcl_Interp *interp) { Tcl_Obj *interp; Tcl_Obj *interp; Tcl_Obj *interp; if (interp == NULL) { return TCL_ERROR; } else { interp = (Tcl_Obj *)interp->data; Tcl_Free(interp); Tcl_Free(interp); return TCL_OK; } Tcl_FreeLine(interp); Tcl_FreeLine(interp); return TCL_OK; } ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined BKE_previewimg_cached_thumbnail_read() ;local_40 undefined8 -40 ;local_48 undefined8 -48 PUSH R15 MOV R15D,ECX PUSH R14 MOV R14D,EDX PUSH R13 MOV R13,RSI MOV RSI,RDI PUSH R12 PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x18 MOV RDI,qword ptr [.bss:gCachedPreviews] ;=?? MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + local_40+0x48],RAX XOR EAX,EAX MOV qword ptr [RSP]=>local_48,0x0 CALL BLI_ghash_lookup_p ;undefined BLI_ghash_lookup_p() MOV R12,qword ptr [RSP]=>local_48 MOV RBX,RAX TEST RAX,RAX JZ LAB_011aabe4 MOV R12,qword ptr [RAX] MOV qword ptr [RSP]=>local_48,R12 LAB_011aabe4: TEST R12,R12 JZ LAB_011aac60 TEST R15B,R15B JNZ LAB_011aac18 LAB_011aabee: MOV RAX,qword ptr [RSP + local_40+0x48] SUB RAX,qword ptr FS:[0x28] JNZ LAB_011aacb7 ADD RSP,0x18 MOV RAX,R12 POP RBX POP RBP POP R12 POP R13 POP R14 POP R15 RET ?? 0Fh ?? 1Fh ?? 40h @ ?? 00h LAB_011aac18: MOVZX EAX,byte ptr [R12 + 0x40] CMP EAX,R14D JNZ LAB_011aac40 LEA RDI,[R12 + 0x41] MOV RSI,R13 CALL .plt:::strcmp ;int strcmp(char * __s1, char * __s2) TEST EAX,EAX JNZ LAB_011aac40 MOV RDI,R12 CALL BKE_previewimg_clear ;undefined BKE_previewimg_clear() JMP LAB_011aac48 ?? 66h f ?? 90h LAB_011aac40: MOV RDI,RSP CALL BKE_previewimg_free ;undefined BKE_previewimg_free() LAB_011aac48: MOV R12,qword ptr [RSP]=>local_48 TEST R12,R12 JZ LAB_011aac60 TEST RBX,RBX JZ LAB_011aac94 LAB_011aac56: MOV qword ptr [RBX],R12 MOV R12,qword ptr [RSP]=>local_48 JMP LAB_011aabee ?? 90h LAB_011aac60: MOV RDI,R13 CALL .plt:::strlen ;size_t strlen(char * __s) LEA RDI,[RAX + 0x2] MOV R15,RAX CALL previewimg_create_ex ;undefined previewimg_create_ex(ulong... LEA RDX,[R15 + 0x1] MOV RSI,R13 MOV byte ptr [RAX + 0x40],R14B MOV R12,RAX LEA RDI,[RAX + 0x41] CALL .plt:::memcpy ;void * memcpy(void * __dest, void *... MOV qword ptr [RSP]=>local_48,R12 TEST RBX,RBX JNZ LAB_011aac56 LAB_011aac94: MOV RDI,RBP CALL BLI_strdup ;undefined BLI_strdup() MOV RDI,qword ptr [.bss:gCachedPreviews] ;=?? MOV RDX,R12 MOV RSI,RAX CALL BLI_ghash_insert ;undefined BLI_ghash_insert() MOV R12,qword ptr [RSP]=>local_48 JMP LAB_011aabee LAB_011aacb7: CALL .plt:::__stack_chk_fail ;undefined __stack_chk_fail() ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined FUN_011aacbc() NOP dword ptr [RAX] Actual src: PreviewImage *BKE_previewimg_cached_thumbnail_read(const char *name, const char *path, const int source, bool force_update) { BLI_assert(BLI_thread_is_main()); PreviewImage *prv = nullptr; void **prv_p; prv_p = BLI_ghash_lookup_p(gCachedPreviews, name); if (prv_p) { prv = *(PreviewImage **)prv_p; BLI_assert(prv); } if (prv && force_update) { const char *prv_deferred_data = (char *)PRV_DEFERRED_DATA(prv); if (((int)prv_deferred_data[0] == source) && STREQ(&prv_deferred_data[1], path)) { /* If same path, no need to re-allocate preview, just clear it up. */ BKE_previewimg_clear(prv); } else { BKE_previewimg_free(&prv); } } if (!prv) { prv = previewimg_deferred_create(path, source); force_update = true; } if (force_update) { if (prv_p) { *prv_p = prv; } else { BLI_ghash_insert(gCachedPreviews, BLI_strdup(name), prv); } } return prv; } Predicted src: void BKE_copy_func(const char *name, const char *name, const char *name) { const char *s; const char *s; if (name == NULL) { return; } if (name == NULL) { return; } if (name[0] == '\0') { name[0] = BLI_strdup(name); name[1] = BLI_strdup(name); name[2] = BLI_strdup(name); } else { name[3] = BLI_strdup(name); name[4] = BLI_strdup(name); name[5] = BLI_strdup(name); name[5] = BLI_strdup(name); } if (s == NULL) { name[5] = BLI_strdup(name); } else { name[5] = BLI_strdup(name); } } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined bufferevent_remove_from_rate_limit_group_internal_() PUSH R12 PUSH RBP MOV EBP,ESI PUSH RBX MOV RSI,qword ptr [RDI + 0x1d0] MOV RBX,RDI TEST RSI,RSI JZ LAB_00115f21 MOV RAX,qword ptr [->evthread_lock_fns_] ;= 00135120 XOR EDI,EDI CALL qword ptr [RAX + 0x18]=>.bss:evthread_lock_fns_[24] LAB_00115f21: MOV RAX,qword ptr [RBX + 0x1e8] TEST RAX,RAX JZ LAB_00115fac MOV R12,qword ptr [RAX + 0x10] TEST R12,R12 JZ LAB_00115fac MOV RSI,qword ptr [R12 + 0x110] TEST RSI,RSI JZ LAB_00115f56 MOV RAX,qword ptr [->evthread_lock_fns_] ;= 00135120 XOR EDI,EDI CALL qword ptr [RAX + 0x18]=>.bss:evthread_lock_fns_[24] MOV RAX,qword ptr [RBX + 0x1e8] LAB_00115f56: MOV qword ptr [RAX + 0x10],0x0 SUB dword ptr [R12 + 0x70],0x1 MOV RAX,qword ptr [RBX + 0x1e8] MOV RDX,qword ptr [RAX] TEST RDX,RDX JZ LAB_00115f8c MOV RDX,qword ptr [RDX + 0x1e8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RDX + 0x8],RAX MOV RAX,qword ptr [RBX + 0x1e8] MOV RDX,qword ptr [RAX] LAB_00115f8c: MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RAX],RDX MOV RSI,qword ptr [R12 + 0x110] TEST RSI,RSI JZ LAB_00115fac MOV RAX,qword ptr [->evthread_lock_fns_] ;= 00135120 XOR EDI,EDI CALL qword ptr [RAX + 0x20]=>.bss:evthread_lock_fns_[32] LAB_00115fac: TEST EBP,EBP JNZ LAB_00115fd0 LAB_00115fb0: MOV RSI,qword ptr [RBX + 0x1d0] TEST RSI,RSI JZ LAB_00115fc8 MOV RAX,qword ptr [->evthread_lock_fns_] ;= 00135120 XOR EDI,EDI CALL qword ptr [RAX + 0x20]=>.bss:evthread_lock_fns_[32] LAB_00115fc8: POP RBX XOR EAX,EAX POP RBP POP R12 RET ?? 90h LAB_00115fd0: MOV RDI,RBX MOV ESI,0x4 CALL .plt:bufferevent_unsuspend_read_ ;undefined bufferevent_unsuspend_read_() MOV ESI,0x4 MOV RDI,RBX CALL .plt:bufferevent_unsuspend_write_ ;undefined bufferevent_unsuspend_writ... JMP LAB_00115fb0 ?? 0Fh Actual src: int bufferevent_remove_from_rate_limit_group_internal_(struct bufferevent *bev, int unsuspend) { struct bufferevent_private *bevp = BEV_UPCAST(bev); BEV_LOCK(bev); if (bevp->rate_limiting && bevp->rate_limiting->group) { struct bufferevent_rate_limit_group *g = bevp->rate_limiting->group; LOCK_GROUP(g); bevp->rate_limiting->group = NULL; --g->n_members; LIST_REMOVE(bevp, rate_limiting->next_in_group); UNLOCK_GROUP(g); } if (unsuspend) { bufferevent_unsuspend_read_(bev, BEV_SUSPEND_BW_GROUP); bufferevent_unsuspend_write_(bev, BEV_SUSPEND_BW_GROUP); } BEV_UNLOCK(bev); return 0; } Predicted src: static int lock_remove_read_group_lock(struct rte_eth_dev *dev, struct rte_eth_group *group) { struct rte_eth_group *group; struct rte_eth_group *group; group = dev->group; if (group == NULL) { return -1; } group = dev->group; if (group == NULL) { return -1; } group->read_group = group->read_group; group->read_group = group->read_group; group->read_group = group->read_group; group->read_group = group->read_group; group->read_group = group->read_group; group->read_group = group->read_group; group->read_group = group->read_group; group->read_group = group->read_group; group->read_group = group->read_group; return 0; } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined _wrap_plfit_continuous_options_t___str__() ;local_10 undefined8 -10 ;local_18 undefined8 -18 PUSH RBP SUB RSP,0x10 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + local_10+0x18],RAX XOR EAX,EAX MOV qword ptr [RSP]=>local_18,0x0 TEST RSI,RSI JZ LAB_0010a4b8 MOV RDX,qword ptr [.bss:swig_types] ;=?? MOV RDI,RSI XOR ECX,ECX MOV RSI,RSP CALL SWIG_Python_ConvertPtrAndOwn.constprop.0 ;undefined SWIG_Python_ConvertPtrAndO... MOV EDI,EAX TEST EAX,EAX JS LAB_0010a490 MOV RAX,qword ptr [RSP]=>local_18 SUB RSP,0x8 LEA RBP,[.bss:temp.17] ;=?? LEA RCX,[.rodata:s_finite_size_correction_=_%d,_xmi_0010e910] ;= "finite_size_correction = %d, xmin... MOV EDX,0x200 MOV ESI,0x1 MOV RDI=>.bss:temp.17,RBP ;=?? MOVSD XMM0,qword ptr [RAX + 0x10] MOV R9D,dword ptr [RAX + 0x4] MOVZX R8D,word ptr [RAX] MOV EAX,dword ptr [RAX + 0x8] PUSH RAX MOV EAX,0x1 CALL .plt:::__sprintf_chk ;undefined __sprintf_chk() MOV RDI=>.bss:temp.17,RBP ;=?? CALL .plt:::strlen ;size_t strlen(char * __s) LEA RDX,[.rodata:s_surrogateescape_0010c24e] ;= "surrogateescape" MOV RDI=>.bss:temp.17,RBP ;=?? MOV RSI,RAX CALL .plt:::PyUnicode_DecodeUTF8 ;undefined PyUnicode_DecodeUTF8() POP RDX POP RCX LAB_0010a47a: MOV RDX,qword ptr [RSP + local_10+0x18] SUB RDX,qword ptr FS:[0x28] JNZ LAB_0010a4bc ADD RSP,0x10 POP RBP RET LAB_0010a490: CMP EAX,-0x1 MOV EAX,0xfffffffb LEA RSI,[.rodata:s_in_method_'plfit_continuous_opti_0010e8a0] ;= "in method 'plfit_continuous_optio... CMOVZ EDI,EAX CALL SWIG_Python_ErrorType ;undefined SWIG_Python_ErrorType() MOV RDI,RAX CALL .plt:::PyErr_SetString ;undefined PyErr_SetString() XOR EAX,EAX JMP LAB_0010a47a ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_0010a4b8: XOR EAX,EAX JMP LAB_0010a47a LAB_0010a4bc: CALL .plt:::__stack_chk_fail ;undefined __stack_chk_fail() NOP dword ptr CS:[RAX + RAX*0x1] Actual src: SWIGINTERN PyObject *_wrap_plfit_continuous_options_t___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; struct _plfit_continuous_options_t *arg1 = (struct _plfit_continuous_options_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; char *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p__plfit_continuous_options_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "plfit_continuous_options_t___str__" "', argument " "1"" of type '" "struct _plfit_continuous_options_t *""'"); } arg1 = (struct _plfit_continuous_options_t *)(argp1); result = (char *)_plfit_continuous_options_t___str__(arg1); resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } Predicted src: SWIGINTERN PyObject *_wrap_rig_str_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; struct rig_str *arg1 = (struct rig_str *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; char *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_rig_str, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rig_str_size" "', argument " "1"" of type '" "struct rig_str *""'"); } arg1 = (struct rig_str *)(argp1); result = (char *) ((arg1)->size); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_char, 0 | 0 ); return resultobj; fail: return NULL; }