============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined gf_dm_sess_get_stats(undefined param_1, undefined param_2, undefined param_3, undefined param_4, undefined param_5, undefined param_6, undefined8 param_7) ;param_1 undefined DIL ;param_2 undefined SIL ;param_3 undefined DL ;param_4 undefined CL ;param_5 undefined R8B ;param_6 undefined R9B ;param_7 undefined8 8 MOV RAX,param_1 MOV param_1,qword ptr [RSP + param_7] TEST RAX,RAX JZ LAB_001c3669 TEST param_2,param_2 JZ LAB_001c35f9 MOV R10,qword ptr [RAX + 0x38] MOV qword ptr [param_2],R10 LAB_001c35f9: TEST param_3,param_3 JZ LAB_001c3605 MOV param_2,qword ptr [RAX + 0x58] MOV qword ptr [param_3],param_2 LAB_001c3605: TEST param_4,param_4 JZ LAB_001c3622 MOV param_3,dword ptr [RAX + 0x109c] MOV param_2,0x0 CMP param_3,0x40000000 CMOVZ param_3,param_2 MOV qword ptr [param_4],param_3 LAB_001c3622: TEST param_5,param_5 JZ LAB_001c3630 MOV param_4,dword ptr [RAX + 0x10a0] MOV qword ptr [param_5],param_4 LAB_001c3630: TEST param_6,param_6 JZ LAB_001c363e MOV param_3,dword ptr [RAX + 0x10d8] MOV dword ptr [param_6],param_3 LAB_001c363e: TEST param_1,param_1 JZ LAB_001c364b MOV param_3,dword ptr [RAX + 0x1094] MOV dword ptr [param_1],param_3 LAB_001c364b: MOV param_3,dword ptr [RAX + 0x1094] MOV EAX,0x1 CMP param_3,0xa JZ LAB_001c366e XOR EAX,EAX CMP param_3,0xb MOV param_3,0xfffffff3 CMOVZ EAX,param_3 RET LAB_001c3669: MOV EAX,0xffffffff LAB_001c366e: RET ?? 90h Actual src: GF_EXPORT GF_Err gf_dm_sess_get_stats(GF_DownloadSession * sess, const char **server, const char **path, u64 *total_size, u64 *bytes_done, u32 *bytes_per_sec, GF_NetIOStatus *net_status) { if (!sess) return GF_BAD_PARAM; if (server) *server = sess->server_name; if (path) *path = sess->remote_path; if (total_size) { if (sess->total_size==SIZE_IN_STREAM) *total_size = 0; else *total_size = sess->total_size; } if (bytes_done) *bytes_done = sess->bytes_done; if (bytes_per_sec) *bytes_per_sec = sess->bytes_per_sec; if (net_status) *net_status = sess->status; if (sess->status == GF_NETIO_DISCONNECTED) return GF_EOS; else if (sess->status == GF_NETIO_STATE_ERROR) return GF_SERVICE_ERROR; return GF_OK; } Predicted src: GF_EXPORT GF_Err gf_stats_get_stats_stats(GF_Err gf_stats_stats_t *stats, u32 *stats, u32 *size, u32 *size, u32 *size, u32 *size) { if (!stats ||!stats ||!size) return GF_BAD_PARAM; if (!stats ||!size) return GF_BAD_PARAM; if (!stats->stats ||!size) return GF_BAD_PARAM; if (size) return GF_BAD_PARAM; if (size) *size = size; if (size) *size = size; if (size) *size = size; if (size) *size = size; if (size) *size = size; if (size) *size = size; if (size) *size = size; return GF_OK; } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined gwy_nlfit_preset_get_formula() PUSH RBX TEST RDI,RDI JZ LAB_001293a8 MOV RBX,RDI CALL .plt:gwy_nlfit_preset_get_type ;undefined gwy_nlfit_preset_get_type() MOV RSI,RAX MOV RAX,qword ptr [RBX] TEST RAX,RAX JZ LAB_0012938e CMP qword ptr [RAX],RSI JZ LAB_0012939a LAB_0012938e: MOV RDI,RBX CALL .plt:::g_type_check_instance_is_a ;undefined g_type_check_instance_is_a() TEST EAX,EAX JZ LAB_001293a8 LAB_0012939a: MOV RAX,qword ptr [RBX + 0x50] POP RBX MOV RAX,qword ptr [RAX + 0x8] RET ?? 0Fh ?? 1Fh ?? 40h @ ?? 00h LAB_001293a8: LEA RDX,[.rodata:s_GWY_IS_NLFIT_PRESET(preset)_0014036d] ;= "GWY_IS_NLFIT_PRESET(preset)" LEA RSI,[.rodata:__func__.7] ;= "gwy_nlfit_preset_get_formula" LEA RDI,[.rodata:s_Gwyddion_0013d038] ;= "Gwyddion" CALL .plt:::g_return_if_fail_warning ;undefined g_return_if_fail_warning() LEA RAX,[.rodata:s__0013e07a+11] ;= "" POP RBX RET ?? 0Fh Actual src: const gchar* gwy_nlfit_preset_get_formula(GwyNLFitPreset* preset) { g_return_val_if_fail(GWY_IS_NLFIT_PRESET(preset), ""); /* FIXME: builtin */ return preset->builtin->formula; } Predicted src: const gchar* gwy_data_get_n_n(GwyData *data) { g_return_val_if_fail(GWY_IS_DATA(data), NULL); return data->n_n; } ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined CompositorNodeBlur_use_bokeh_get() MOV RAX,qword ptr [RDI + 0x10] MOV RAX,qword ptr [RAX + 0xf0] MOVZX EAX,byte ptr [RAX + 0x1e] AND EAX,0x1 RET ?? 66h f Actual src: bool CompositorNodeBlur_use_bokeh_get(PointerRNA *ptr) { NodeBlurData *data = (NodeBlurData *)(((bNode *)ptr->data)->storage); return (((data->bokeh) & 1)!= 0); } Predicted src: bool Node_use_node_use_get(PointerRNA *ptr) { Node *data = (Node *)(ptr->data); return (((data->flag) & 1)!= 0); } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined parser_isexpr() ;local_10 undefined8 -10 ;local_14 undefined4 -14 ;local_20 undefined8 -20 ;local_28 undefined8 -28 ;local_30 undefined8 -30 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + local_20+0x8],RDI MOV qword ptr [RBP + local_28+0x8],RSI MOV qword ptr [RBP + local_30+0x8],RDX MOV qword ptr [RBP + local_10+0x8],0x0 MOV RAX,qword ptr [RBP + local_20+0x8] TEST RAX,RAX JNZ LAB_00102ebc LEA RDX=>local_20,[RBP + -0x18] MOV RSI,qword ptr [RBP + local_30+0x8] MOV RAX,qword ptr [RBP + local_28+0x8] MOV R9,RDX LEA R8,[.data:PyST_Type] LEA RDX,[.data:keywords.4] MOV RCX=>.data:keywords.4,RDX LEA RDX,[.rodata:s_O!:isexpr_0010d2cc] ;= "O!:isexpr" MOV RDI,RAX MOV EAX,0x0 CALL .plt:PyArg_ParseTupleAndKeywords ;undefined PyArg_ParseTupleAndKeywords() MOV dword ptr [RBP + local_14+0x8],EAX JMP LAB_00102ee5 LAB_00102ebc: MOV RSI,qword ptr [RBP + local_30+0x8] MOV RAX,qword ptr [RBP + local_28+0x8] LEA RDX,[.data:keywords.4[8]] MOV RCX=>.data:keywords.4[8],RDX LEA RDX,[.rodata:s_:isexpr_0010d2d6] ;= ":isexpr" MOV RDI,RAX MOV EAX,0x0 CALL .plt:PyArg_ParseTupleAndKeywords ;undefined PyArg_ParseTupleAndKeywords() MOV dword ptr [RBP + local_14+0x8],EAX LAB_00102ee5: CMP dword ptr [RBP + local_14+0x8],0x0 JZ LAB_00102f37 MOV RAX,qword ptr [RBP + local_20+0x8] MOV EAX,dword ptr [RAX + 0x28] CMP EAX,0x1 JNZ LAB_00102f00 MOV RAX,qword ptr [->_Py_TrueStruct] ;= 00112170 JMP LAB_00102f07 LAB_00102f00: MOV RAX,qword ptr [->_Py_ZeroStruct] ;= 00112020 LAB_00102f07: ; FWD[3,0]: Stack[-0x10],00112020,00112170 MOV qword ptr [RBP + local_10+0x8],RAX=>EXTERNAL:_Py_TrueStruct ;=?? MOV RAX,qword ptr [->_Py_RefTotal] ;= 00112178 MOV RAX=>EXTERNAL:_Py_RefTotal,qword ptr [RAX] ;=?? LEA RDX,[RAX + 0x1] MOV RAX,qword ptr [->_Py_RefTotal] ;= 00112178 MOV qword ptr [RAX]=>EXTERNAL:_Py_RefTotal,RDX ;=?? MOV RAX,qword ptr [RBP + local_10+0x8] ; FWD[2,0]: 00112030,00112180 MOV RAX,qword ptr [RAX + 0x10]=>EXTERNAL:PyDict_New ;=?? LEA RDX,[RAX + 0x1] MOV RAX,qword ptr [RBP + local_10+0x8] ; FWD[2,0]: 00112030,00112180 MOV qword ptr [RAX + 0x10]=>EXTERNAL:PyDict_New,RDX ;=?? LAB_00102f37: ; FWD[3,0]: Stack[-0x10],00112020,00112170 MOV RAX=>EXTERNAL:_Py_TrueStruct,qword ptr [RBP + local_10+0x8] ;=?? LEAVE RET ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined parser_issuite() ;local_10 undefined8 -10 ;local_14 undefined4 -14 ;local_20 undefined8 -20 ;local_28 undefined8 -28 ;local_30 undefined8 -30 PUSH RBP Actual src: static PyObject* parser_isexpr(PyST_Object *self, PyObject *args, PyObject *kw) { PyObject* res = 0; int ok; static char *keywords[] = {"ast", NULL}; if (self == NULL) ok = PyArg_ParseTupleAndKeywords(args, kw, "O!:isexpr", keywords, &PyST_Type, &self); else ok = PyArg_ParseTupleAndKeywords(args, kw, ":isexpr", &keywords[1]); if (ok) { /* Check to see if the ST represents an expression or not. */ res = (self->st_type == PyST_EXPR)? Py_True : Py_False; Py_INCREF(res); } return (res); } Predicted src: static PyObject * py_is_Type(PyObject *self, PyObject *args, PyObject *kwargs) { static char *name[] = {"name", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!", &Py_Type, &Py_Type, &name)) { return NULL; } if (Py_Check(name)) { PyErr_SetString(PyExc_TypeError, "is_Type"); return NULL; } Py_INCREF(Py_None); return Py_None; } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined Ligature_find_N() LEA EAX,[RDI + -0x132] CMP EAX,0x11044 JA LAB_001ce84d PUSH RBX MOV EBX,EDI CMP EDI,0xffff JBE LAB_001ce7f0 CMP EDI,0x10f26 JBE LAB_001ce7cc MOV ECX,0x3 XOR ESI,ESI LEA RDI,[.rodata:ligature32] NOP word ptr [RAX + RAX*0x1] LAB_001ce7a8: CMP RCX,RSI JBE LAB_001ce7cc LAB_001ce7ad: LEA RDX,[RCX + RSI*0x1] SHR RDX,1 LEA RAX,[RDX*0x4] ; FWD[2,0]: 0045e44c,0045e450 CMP dword ptr [RDI + RDX*0x4]=>.rodata:ligature32[4],EBX JA LAB_001ce7d8 JZ LAB_001ce7e0 LEA RSI,[RDX + 0x1] CMP RCX,RSI JA LAB_001ce7ad LAB_001ce7cc: MOV EAX,0xffffffff POP RBX RET ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_001ce7d8: MOV RCX,RDX JMP LAB_001ce7a8 ?? 0Fh ?? 1Fh ?? 00h LAB_001ce7e0: SAR RAX,0x2 POP RBX ADD EAX,0x1ff RET ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_001ce7f0: CALL .plt:ffUnicodeUtype ;undefined ffUnicodeUtype() TEST EAX,0x20000000 JZ LAB_001ce7cc MOV R8D,EBX MOV ECX,0x1ff XOR ESI,ESI LEA RDI,[.rodata:ligature16] CMP EBX,0xfefc JA LAB_001ce7cc NOP dword ptr [RAX] LAB_001ce818: CMP RCX,RSI JBE LAB_001ce7cc LAB_001ce81d: LEA RAX,[RCX + RSI*0x1] MOV RDX,RAX AND RAX,-0x2 SHR RDX,1 ; FWD[2,0]: 0045e65e,0045e75e CMP R8W,word ptr [RDI + RDX*0x2]=>.rodata:ligature16[510] JC LAB_001ce840 JZ LAB_001ce848 LEA RSI,[RDX + 0x1] CMP RCX,RSI JA LAB_001ce81d JMP LAB_001ce7cc ?? 90h LAB_001ce840: MOV RCX,RDX JMP LAB_001ce818 ?? 0Fh ?? 1Fh ?? 00h LAB_001ce848: SAR RAX,1 POP RBX RET LAB_001ce84d: MOV EAX,0xffffffff RET ?? 66h f Actual src: int Ligature_find_N(uint32 uCode) { uint16 uCode16, *p16; uint32 *p32; int n=-1; if ( uCode < FF_ligature16FIRST || uCode > FF_ligature32LAST || \ ((uCode < FF_UTYPE_MAXC) && (isligorfrac(uCode)==0)) ) return( -1 ); if ( uCode <= FF_ligature16LAST ) { uCode16 = uCode; p16 = (uint16 *)(bsearch(&uCode16, ligature16, FF_ligatureTOTAL16, \ sizeof(uint16), compare_codepoints16)); if ( p16 ) n = p16 - ligature16; } else if ( uCode >= FF_ligature32FIRST ) { p32 = (uint32 *)(bsearch(&uCode, ligature32, FF_ligatureTOTAL32, \ sizeof(uint32), compare_codepoints32)); if ( p32 ) n = p32 - ligature32 + FF_ligatureTOTAL16; } return( n ); } Predicted src: int find_bits(uint32_t n, uint32_t n) { uint32_t i; for (i = 0; i < n; i++) { if (n < n) return -1; } for (i = 0; i < n; i++) { if (n < n) return i; } return -1; }