============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined test_cancel_transfer() ;local_10 undefined8 -10 ;local_14 undefined1 -14 ;local_20 undefined8 -20 ;local_58 undefined1[10] -58 PUSH RBX XOR ESI,ESI MOV RBX,RDI XOR ECX,ECX XOR EDX,EDX SUB RSP,0x20 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + local_10+0x28],RAX XOR EAX,EAX CALL create_file_transfer_channel ;undefined create_file_transfer_chann... MOV RDI,qword ptr [RBX + 0x38] LEA RSI=>local_14,[RSP + 0x14] CALL .plt:::tp_file_transfer_channel_get_state ;undefined tp_file_transfer_channel_g... CMP EAX,0x1 JZ LAB_0010780a SUB RSP,0x8 MOV EAX,EAX LEA R9,[.rodata:DAT_0010e177] ;= 3Dh = XOR EDI,EDI PUSH 0x69 LEA R8,[.rodata:s_tp_file_transfer_channel_get_sta_0010e220] ;= "tp_file_transfer_channel_get_stat... MOV RDX,-0x8000000000000000 LEA RCX,[.rodata:__func__.12] ;= "test_cancel_transfer" PUSH 0x3fff LEA RSI,[.rodata:s_file-transfer-channel.c_0010e02e] ;= "file-transfer-channel.c" PUSH RDX MOV EDX,0x1f1 MOV qword ptr [RSP + local_20+0x48],RAX FILD qword ptr [RSP + local_20+0x48] SUB RSP,0x10 FSTP tword ptr [RSP]=>local_58 CALL .plt:::g_assertion_message_cmpnum ;undefined g_assertion_message_cmpnum() ADD RSP,0x30 LAB_0010780a: MOV RAX,qword ptr [RSP + local_10+0x28] SUB RAX,qword ptr FS:[0x28] JNZ LAB_00107820 ADD RSP,0x20 POP RBX RET LAB_00107820: CALL .plt:::__stack_chk_fail ;undefined __stack_chk_fail() NOP dword ptr CS:[RAX + RAX*0x1] Actual src: static void test_cancel_transfer (Test *test, gconstpointer data G_GNUC_UNUSED) { TpFileTransferStateChangeReason reason; create_file_transfer_channel (test, FALSE, TP_SOCKET_ADDRESS_TYPE_UNIX, TP_SOCKET_ACCESS_CONTROL_LOCALHOST); g_assert_cmpuint (tp_file_transfer_channel_get_state (test->channel, &reason), ==, TP_FILE_TRANSFER_STATE_PENDING); } Predicted src: static void test_channel_test_channel_test_channel_test_state (gpointer user_data) { g_assert_not_reached (); g_assert_reached (); g_assert_reached (); } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined bio_close() PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x8 CMP byte ptr [RDI + 0x24],0x1 JZ LAB_0010c0e0 LAB_0010c0af: CMP byte ptr [RBP + 0x25],0x0 MOV EDI,dword ptr [RBP + 0x28] JNZ LAB_0010c0d8 CALL .plt:::close ;int close(int __fd) LAB_0010c0bd: MOV RDI,qword ptr [RBP] CALL .plt.got:::free ;void free(void * __ptr) ADD RSP,0x8 MOV RDI,RBP POP RBX POP RBP JMP .plt.got:::free ;void free(void * __ptr) ?? 0Fh ?? 1Fh ?? 40h @ ?? 00h LAB_0010c0d8: CALL tcpclose ;undefined tcpclose() JMP LAB_0010c0bd ?? 90h LAB_0010c0e0: CMP byte ptr [RDI + 0x26],0x0 JNZ LAB_0010c0af MOV EBX,dword ptr [RDI + 0xc] TEST EBX,EBX JZ LAB_0010c0af CMP byte ptr [RBP + 0x25],0x0 MOV EDI,dword ptr [RDI + 0x28] MOV RSI,qword ptr [RBP] JZ LAB_0010c120 MOV ECX,dword ptr [RBP + 0x14] MOV EDX,EBX CALL tcptowrite ;undefined tcptowrite() LAB_0010c104: CMP EBX,EAX JLE LAB_0010c110 MOV byte ptr [RBP + 0x26],0x1 TEST EAX,EAX JS LAB_0010c116 LAB_0010c110: CDQE ADD qword ptr [RBP + 0x18],RAX LAB_0010c116: MOV dword ptr [RBP + 0xc],0x0 JMP LAB_0010c0af ?? 90h LAB_0010c120: MOV EDX,EBX CALL .plt:::write ;ssize_t write(int __fd, void * __buf... JMP LAB_0010c104 ?? 0Fh Actual src: void bio_close(bio *b) { if (b->direction==BIO_WRITE) { bio_flush(b); } if (b->type==0) { close(b->fd); } else { tcpclose(b->fd); } free(b->buff); free(b); } Predicted src: static void write_close(void *data) { struct close *p = data; if (p->fd >= 0) close(p->fd); if (p->fd >= 0) close(p->fd); if (p->fd >= 0) close(p->fd); if (p->fd >= 0) close(p->fd); if (p->fd >= 0) close(p->fd); if (p->fd >= 0) close(p->fd); if (p->fd >= 0) close(p->fd); } ============================== 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_array_size(PyObject *self, PyObject *arg0) { struct _cffi_f_array_size *arg1 = (struct _cffi_f_array_size *)self; PyObject *arg2; size_t result; (void)self; (void)self; if (!PyArg_ParseTuple(args, (char *)"i:f_array_size", &arg1, &result)) return NULL; Py_BEGIN_ALLOW_THREADS _cffi_restore_errno(); { result = _cffi_errno(); } _cffi_save_errno(); Py_END_ALLOW_THREADS (void)self; /* unused */ Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); Py_INCREF(Py_None); return Py_None; } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* ResourceManager::downloadLicenseFinished() * ;************************************************************************************************************************************************************ ;undefined downloadLicenseFinished(ResourceManager * this) ;this ResourceMan... RDI LEA RAX,[.bss:ScQApp] ;=?? MOV RDX,this LEA RCX,[.rodata:s_1downloadLicenseFinished()_00f70b32] ;= "1downloadLicenseFinished()" LEA RSI,[.rodata:s_2finished()_00f3e05a] ;= "2finished()" MOV RAX=>.bss:ScQApp,qword ptr [RAX] ;=?? MOV this,qword ptr [RAX + 0x68] JMP .plt:::QObject::disconnect ;undefined disconnect(QObject * param... ?? 66h f Actual src: void ResourceManager::downloadLicenseFinished() { disconnect(ScQApp->dlManager(), SIGNAL(finished()), this, SLOT(downloadLicenseFinished())); } Predicted src: void QmlManager::disconnect() { d->disconnect(); } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* strcasestr_len(char const*, int, char const*) * ;************************************************************************************************************************************************************ ;undefined strcasestr_len(char * param_1, int param_2, char * param_3) ;param_1 char * RDI ;param_2 int ESI ;param_3 char * RDX PUSH R15 PUSH R14 MOV R14,param_1 MOV param_1,param_3 PUSH R13 MOV R13,param_3 PUSH R12 PUSH RBP MOVSXD RBP,param_2 PUSH RBX SUB RSP,0x8 CALL .plt:::strlen ;size_t strlen(char * __s) CMP RBP,RAX JL LAB_00135e08 MOV R15,RAX SUB RBP,RAX JS LAB_00135e08 XOR EBX,EBX JMP LAB_00135dd9 LAB_00135dd0: ADD RBX,0x1 CMP RBP,RBX JL LAB_00135e08 LAB_00135dd9: LEA R12,[R14 + RBX*0x1] MOV param_3,R15 MOV param_1,R13 MOV param_2,R12 CALL .plt:::g_ascii_strncasecmp ;undefined g_ascii_strncasecmp() TEST EAX,EAX JNZ LAB_00135dd0 LAB_00135def: ADD RSP,0x8 MOV RAX,R12 POP RBX POP RBP POP R12 POP R13 POP R14 POP R15 RET ?? 0Fh ?? 1Fh ?? 80h ?? 00h ?? 00h ?? 00h ?? 00h LAB_00135e08: XOR R12D,R12D JMP LAB_00135def ?? 0Fh Actual src: char *strcasestr_len(const char *haystack, int haystack_len, const char *needle) { gssize needle_len = (gssize)strlen(needle); int i; if (needle_len > haystack_len) return NULL; i = 0; while (i <= haystack_len - needle_len) { if (g_ascii_strncasecmp(needle, haystack + i, needle_len) == 0) return (char *)haystack + i; i++; } return NULL; } Predicted src: char * g_utf8_len(const char *s, int len) { char *s; char *s; s = g_utf8_len(s, len); if (!s) return NULL; s = g_utf8_len(s, len); if (!s) return NULL; return s; }