============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined glXGetCurrentReadDrawable() SUB RSP,0x8 LEA RDI,[.got:PTR_001407b0] ;= 00000000 CALL .plt:::__tls_get_addr ;undefined __tls_get_addr() MOV RAX,qword ptr [RAX + 0x10] ADD RSP,0x8 RET ?? 0Fh Actual src: GLXDrawable glXGetCurrentReadDrawable(void) { return tsdata.read_drawable; } Predicted src: static PyObject * glgl_get_gl(PyObject *self, PyObject *args) { return Py_BuildValue("gl_gl_get_gl", self->gl); } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined DetectFilemagicThreadFree() TEST RDI,RDI JZ LAB_00255630 PUSH RBP MOV RBP,RDI MOV RDI,qword ptr [RDI] TEST RDI,RDI JZ LAB_00255626 CALL .plt:::magic_close ;undefined magic_close() LAB_00255626: MOV RDI,RBP POP RBP JMP .plt.got:::free ;void free(void * __ptr) ?? 90h LAB_00255630: RET ?? 66h f Actual src: static void DetectFilemagicThreadFree(void *ctx) { if (ctx!= NULL) { DetectFilemagicThreadData *t = (DetectFilemagicThreadData *)ctx; if (t->ctx) magic_close(t->ctx); SCFree(t); } } Predicted src: void FileFileFree(FileFile *file) { if (file == NULL) return; if (file->file!= NULL) free(file->file); free(file); } ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* pugi::xml_node::hash_value() const * ;************************************************************************************************************************************************************ ;undefined hash_value(xml_node * this) ;this xml_node * RDI MOV RAX,qword ptr [this] SHR RAX,0x6 RET ?? 0Fh Actual src: size_t xml_node::hash_value() const { return static_cast(reinterpret_cast(_root) / sizeof(xml_node_struct)); } Predicted src: const char* name() const { return name_; } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* CBufferObject::GetFd() * ;************************************************************************************************************************************************************ ;undefined GetFd(CBufferObject * this) ;this CBufferObje... RDI MOV EAX,dword ptr [this + 0x8] RET ?? 66h f Actual src: int CBufferObject::GetFd() { return m_fd; } Predicted src: unsigned int CBuffer::GetBuffer() { return m_buf; } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* ipv4_get_num_hosts(unsigned short, unsigned int*) * ;************************************************************************************************************************************************************ ;undefined ipv4_get_num_hosts(ushort param_1, uint * param_2) ;param_1 ushort DI ;param_2 uint * RSI PUSH RBX MOV EAX,0x2 MOV RBX,param_2 CMP param_1,0x1f JZ LAB_0012cecb MOV EAX,0x1 CMP param_1,0x20 JZ LAB_0012cecb MOV EAX,0xfffffffc TEST param_1,param_1 JZ LAB_0012cecb MOVZX param_1,param_1 MOV EAX,0x20 PXOR XMM1,XMM1 MOVSD XMM0,qword ptr [.rodata:DAT_0012e638] ;= 4000000000000000h SUB EAX,param_1 CVTSI2SD XMM1,EAX CALL .plt:::pow ;double pow(double __x, double __y) CVTTSD2SI RAX,XMM0 SUB EAX,0x2 LAB_0012cecb: MOV dword ptr [RBX],EAX XOR EAX,EAX POP RBX RET ?? 66h f Actual src: short int ipv4_get_num_hosts(unsigned short int pfxlen, unsigned int* num) { int hosts = 0; switch (pfxlen) { case 0: hosts = 0xFFFFFFFC; break; case 31: hosts = 2; break; case 32: hosts = 1; break; default: hosts = (unsigned int)pow(2, 32 - pfxlen) - 2; break; } *num = hosts; return 0; } Predicted src: int get_num_num(uint8_t *data, uint8_t *data) { uint8_t *data = (uint8_t *)data; uint8_t *data = (uint8_t *)data; uint8_t *data = (uint8_t *)data; if (data) *data = (uint8_t *)data; return 0; }