============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined fd_write() PUSH R13 MOV R13,RCX PUSH R12 MOV R12,RDX XOR EDX,EDX PUSH RBP MOV EBP,EDI PUSH RBX MOV RBX,RSI SUB RSP,0x8 CALL .plt:::lseek ;__off_t lseek(int __fd, __off_t __of... CMP RAX,RBX JNZ LAB_00139860 ADD RSP,0x8 MOV RDX,R13 MOV RSI,R12 MOV EDI,EBP POP RBX POP RBP POP R12 POP R13 JMP .plt:::write ;ssize_t write(int __fd, void * __buf... ?? 0Fh ?? 1Fh ?? 84h ?? 00h ?? 00h ?? 00h ?? 00h ?? 00h LAB_00139860: ADD RSP,0x8 MOV RAX,-0x1 POP RBX POP RBP POP R12 POP R13 RET ?? 66h f Actual src: ssize_t fd_write(int fd, off_t offset, const void *src, size_t size) { if (lseek(fd, offset, SEEK_SET)!= offset) return -1; return write(fd, src, size); } Predicted src: static void write_write(int fd, const char *buf, size_t len, void *buf, size_t len) { int fd; fd = write(fd, buf, len); if (fd < 0) return; fd = write(fd, buf, len); if (fd < 0) return; write(fd, buf, len); } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* TitanLoggerApi::TitanLogEvent_sourceInfo__list_template::list_item(unsigned int) * ;************************************************************************************************************************************************************ ;undefined list_item(TitanLogEvent_sourceInfo__list_template * this, uint param_1) ;this TitanLogEve... RDI ;param_1 uint ESI SUB RSP,0x8 MOV EAX,dword ptr [this] LEA EDX,[RAX + -0x4] CMP EDX,0x1 JBE LAB_001cda43 CMP EAX,0xb JNZ LAB_001cda62 LAB_001cda43: CMP dword ptr [this + 0x28],param_1 JBE LAB_001cda70 MOV param_1,param_1 MOV RDX,qword ptr [this + 0x30] ADD RSP,0x8 LEA RAX,[param_1*0x8] SUB RAX,param_1 LEA RAX,[RDX + RAX*0x8] RET LAB_001cda62: LEA this,[.rodata:s_Internal_error:_Accessing_a_list_004d47a0] ;= "Internal error: Accessing a list... XOR EAX,EAX CALL TTCN_error ;undefined TTCN_error(char * param_1,... LAB_001cda70: LEA this,[.rodata:s_Internal_error:_Index_overflow_i_004d4818] ;= "Internal error: Index overflow in... XOR EAX,EAX CALL TTCN_error ;undefined TTCN_error(char * param_1,... NOP Actual src: TitanLogEvent_sourceInfo__list_template& TitanLogEvent_sourceInfo__list_template::list_item(unsigned int list_index) { if (template_selection!= VALUE_LIST && template_selection!= COMPLEMENTED_LIST && template_selection!= CONJUNCTION_MATCH) TTCN_error("Internal error: Accessing a list element of a non-list template of type @TitanLoggerApi.TitanLogEvent.sourceInfo_list."); if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of type @TitanLoggerApi.TitanLogEvent.sourceInfo_list."); return value_list.list_value[list_index]; } Predicted src: booleanEvent_template::list_item_list() const { if (template_selection!= SPECIFIC_VALUE) TTCN_error("Accessing a non-specific template of enumerated type @TitanLoggerApi.choice."); if (template_selection!= SPECIFIC_VALUE) TTCN_error("Accessing a non-list of type @TitanLoggerApi.choice."); if (template_selection!= SPECIFIC_VALUE) TTCN_error("Accessing a non-specific template of type @TitanLoggerApi.choice."); return TRUE; } ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* Gui::Dragable::isValidDragPosition(QPoint const&) const * ;************************************************************************************************************************************************************ ;undefined isValidDragPosition(QPoint * param_1) ;param_1 QPoint * RDI MOV EAX,0x1 RET ?? 66h f Actual src: bool Dragable::isValidDragPosition(const QPoint& p) const { Q_UNUSED(p) return true; } Predicted src: bool KoShapeShape::text(const QModelIndex &index) const { return true; } ============================== Sample 4 ============================== 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: int32_t num_get_num_num_num(const int8_t *a, int32_t *b) { int32_t *b = (int32_t *)a; int32_t *b = (int32_t *)b; int32_t *b = (int32_t *)b; *b = (int32_t *)b; return 0; } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined enic_vf_link_update() PUSH RBP LEA RCX,[.rodata:__func__.7] ;= "enic_vf_link_update" PUSH RBX LEA RDX,[.rodata:s_%s_>>_0011fc20] ;= "%s >>\n" MOV RBX,RDI MOV EDI,0x8 PUSH RAX LEA RAX,[.bss:enic_pmd_logtype] ;=?? MOV ESI,dword ptr [RAX]=>.bss:enic_pmd_logtype ;=?? XOR EAX,EAX CALL .plt:::rte_log ;undefined rte_log() MOV RAX,qword ptr [RBX + 0x38] MOV RAX,qword ptr [RAX + 0x60] MOV RBP,qword ptr [RAX + 0x6b8] MOV RDI,qword ptr [RBP + 0x88] CALL enic_link_update ;undefined enic_link_update() MOV RAX,qword ptr [RBP + 0x88] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x68] MOV RDX,qword ptr [RBX + 0x38] XCHG qword ptr [RDX + 0x68],RAX XOR EAX,EAX POP RDX POP RBX POP RBP RET ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined enic_vf_representor_init() ;local_40 undefined8 -40 PUSH R15 Actual src: static int enic_vf_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete __rte_unused) { struct enic_vf_representor *vf; struct rte_eth_link link; struct enic *pf; ENICPMD_FUNC_TRACE(); vf = eth_dev->data->dev_private; pf = vf->pf; /* * Link status and speed are same as PF. Update PF status and then * copy it to VF. */ enic_link_update(pf->rte_dev); rte_eth_linkstatus_get(pf->rte_dev, &link); rte_eth_linkstatus_set(eth_dev, &link); return 0; } Predicted src: static int link_link_link_link_link_link_update(struct rte_eth_eth_dev *dev) { struct rte_eth_dev *dev = dev->dev; struct rte_eth_dev *dev = dev->dev->dev; struct rte_eth_dev *dev = dev->dev->dev; dev->link_link = dev->link_link; dev->link_link = dev->link_link; dev->link_link = dev->link_link; return 0; }