============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* CL_CommandLine_Generic::next() * ;************************************************************************************************************************************************************ ;undefined next(CL_CommandLine_Generic * this) ;this CL_CommandL... RDI MOV RDX,qword ptr [this + 0x48] MOV RAX,qword ptr [this + 0x58] CMP RAX,RDX JZ LAB_0014f790 ADD RAX,0x28 CMP RDX,RAX MOV qword ptr [this + 0x58],RAX SETNZ AL RET ?? 0Fh ?? 1Fh ?? 40h @ ?? 00h LAB_0014f790: MOV RDX,qword ptr [this + 0x40] CMP RAX,RDX MOV qword ptr [this + 0x58],RDX SETNZ AL RET ?? 90h Actual src: bool CL_CommandLine_Generic::next() { if (current_option == parsed_options.end()) { (current_option = parsed_options.begin()); return current_option!= parsed_options.end(); } else { return (++current_option)!= parsed_options.end(); } } Predicted src: bool Command_Command::next_next() { if (m_next!= m_next) return m_next->next(); else return false; } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* SBMap::getLinearValue(unsigned int, unsigned int) * ;************************************************************************************************************************************************************ ;undefined getLinearValue(SBMap * this, uint param_1, uint param_2) ;this SBMap * RDI ;param_1 uint ESI ;param_2 uint EDX ;local_10 undefined8 -10 ;local_14 undefined4 -14 PUSH RBX MOV param_1,param_1 SUB RSP,0x10 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + local_10+0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [this + 0x68] MOV this,qword ptr [RAX + param_1*0x8] MOV R11D,dword ptr [this + 0x50] TEST R11D,R11D JNZ LAB_0022c318 MOV R8D,param_2 CMP param_2,dword ptr [this + 0x18] JNC LAB_0022c2f8 MOVZX EBX,byte ptr [this + 0x12] CMP BL,0x2 JA LAB_0022c2f8 LEA param_2=>local_14,[RSP + 0x4] MOV param_1,R8D CALL SBMapItem::getValue ;undefined getValue(SBMapItem * this,... MOV param_2,0x1 MOV ECX,EBX SHL param_2,CL CMP param_2,dword ptr [RSP + local_14+0x18] JZ LAB_0022c320 NOP dword ptr [RAX] LAB_0022c2f8: MOV RAX,qword ptr [RSP + local_10+0x18] SUB RAX,qword ptr FS:[0x28] JNZ LAB_0022c33d ADD RSP,0x10 MOV EAX,R11D POP RBX RET ?? 0Fh ?? 1Fh ?? 80h ?? 00h ?? 00h ?? 00h ?? 00h LAB_0022c318: XOR R11D,R11D JMP LAB_0022c2f8 ?? 0Fh ?? 1Fh ?? 00h LAB_0022c320: ADD param_2,RAX NOP dword ptr [RAX + RAX*0x1] LAB_0022c328: MOVZX ECX,byte ptr [RAX] SHL R11D,0x8 ADD RAX,0x1 ADD R11D,ECX CMP RAX,param_2 JNZ LAB_0022c328 JMP LAB_0022c2f8 LAB_0022c33d: CALL .plt:::__stack_chk_fail ;undefined __stack_chk_fail() NOP dword ptr CS:[RAX + RAX*0x1] Actual src: SS_UCS4 SBMap::getLinearValue (unsigned int _index, unsigned int position) { return maps[_index]->getLinearValue(position); } Predicted src: uint32_t Item::getMapValue(uint32_t index, uint32_t index) { uint32_t i; for (i = 0; i < index; i++) { if (index[i] == index) { return index[i]; } } return 0; } ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined emile_cipher_init() CMP byte ptr [.bss:_emile_cipher_inited],0x0 ;=?? MOV EAX,0x1 JZ LAB_00103710 RET ?? 90h LAB_00103710: SUB RSP,0x8 CALL _emile_cipher_init ;undefined _emile_cipher_init() TEST AL,AL JZ LAB_00103729 MOV byte ptr [.bss:_emile_cipher_inited],0x1 ;=?? MOV EAX,0x1 LAB_00103729: ADD RSP,0x8 RET ?? 66h f Actual src: Eina_Bool emile_cipher_init(void) { if (_emile_cipher_inited) return EINA_TRUE; if (!_emile_cipher_init()) return EINA_FALSE; _emile_cipher_inited = EINA_TRUE; return EINA_TRUE; } Predicted src: int _gcry_cipher_init(void) { if (_gcry_cipher_init()) return 1; _gcry_cipher_init(); return 0; } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined check_build() PUSH R12 MOV R12,RSI PUSH RBP MOV RBP,RDI MOV RDI,RSI PUSH RBX CALL .plt:::strlen ;size_t strlen(char * __s) MOV RDI,RBP MOV RBX,RAX CALL .plt:::lax_json_eof ;undefined lax_json_eof() TEST EAX,EAX JNZ LAB_0010136e CMP dword ptr [.bss:out_buf_index],EBX JNZ LAB_001013c6 MOVSXD RDX,EBX LEA RBX,[.bss:out_buf] MOV RDI,R12 MOV RSI=>.bss:out_buf,RBX CALL .plt:::memcmp ;int memcmp(void * __s1, void * __s2,... TEST EAX,EAX JNZ LAB_0010139c POP RBX MOV RDI,RBP POP RBP POP R12 JMP .plt:LAB_00101070 LAB_0010136e: MOV EDI,EAX CALL .plt:::lax_json_str_err ;undefined lax_json_str_err() MOV RDI,qword ptr [.bss:stderr] MOV ESI,0x1 LEA RDX,[.rodata:s_%s_00103020+22] ;= "%s\n" MOV RCX,RAX XOR EAX,EAX CALL .plt:::__fprintf_chk ;undefined __fprintf_chk() MOV EDI,0x1 CALL .plt:::exit ;void exit(int __status) LAB_0010139c: MOV R8=>.bss:out_buf,RBX MOV RCX,R12 LEA RDX,[.rodata:s_EXPECTED:_---------_%s_RECEIVED:_00103288] ;= "EXPECTED:\n---------\n%s\nRECEIVE... LAB_001013a9: MOV RDI,qword ptr [.bss:stderr] MOV ESI,0x1 XOR EAX,EAX CALL .plt:::__fprintf_chk ;undefined __fprintf_chk() MOV EDI,0x1 CALL .plt:::exit ;void exit(int __status) LAB_001013c6: LEA R8,[.bss:out_buf] MOV RCX,R12 LEA RDX,[.rodata:s__EXPECTED:_---------_%s_RECEIVED_00103258] ;= "\nEXPECTED:\n---------\n%s\nRECEI... JMP LAB_001013a9 ?? 0Fh Actual src: static void check_build(struct LaxJsonContext *context, const char *output) { int expected_len = strlen(output); enum LaxJsonError err = lax_json_eof(context); if (err!= LaxJsonErrorNone) { fprintf(stderr, "%s\n", lax_json_str_err(err)); exit(1); } if (out_buf_index!= expected_len) { fprintf(stderr, "\n" "EXPECTED:\n" "---------\n" "%s\n" "RECEIVED:\n" "---------\n" "%s\n", output, out_buf); exit(1); } if (memcmp(output, out_buf, expected_len)!= 0) { fprintf(stderr, "EXPECTED:\n" "---------\n" "%s\n" "RECEIVED:\n" "---------\n" "%s\n", output, out_buf); exit(1); } lax_json_destroy(context); } Predicted src: static void out_str(const char *str, const char *str) { if (str == NULL) { fprintf(stderr, "out: %s\n", str); exit(EXIT_FAILURE); } if (str == NULL) { fprintf(stderr, "out: %s\n", str); exit(EXIT_FAILURE); } if (str == NULL) { fprintf(stderr, "out: %s\n", str); exit(EXIT_FAILURE); } } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined ppc32_exec_LWZUX() PUSH R12 MOV EAX,ESI PUSH RBP MOV EBP,ESI SHR EAX,0xb SHR EBP,0x10 AND EAX,0x1f SHR ESI,0x15 PUSH RBX AND EBP,0x1f MOV RBX,RDI MOV EDX,ESI MOV R12D,dword ptr [RDI + RBP*0x4 + 0x4] ADD R12D,dword ptr [RDI + RAX*0x4 + 0x4] AND EDX,0x1f MOV ESI,R12D CALL qword ptr [RDI + 0x208] MOV dword ptr [RBX + RBP*0x4 + 0x4],R12D XOR EAX,EAX POP RBX POP RBP POP R12 RET ?? 66h f Actual src: static fastcall int ppc32_exec_LWZUX(cpu_ppc_t *cpu,ppc_insn_t insn) { int rd = bits(insn,21,25); int ra = bits(insn,16,20); int rb = bits(insn,11,15); m_uint32_t vaddr; vaddr = cpu->gpr[ra] + cpu->gpr[rb]; ppc32_exec_memop(cpu,PPC_MEMOP_LWZ,vaddr,rd); cpu->gpr[ra] = vaddr; return(0); } Predicted src: static uint32_t arm_mem_exec_32(struct cpu *cpu, struct arm_instr_call *ic) { uint32_t tmp; uint32_t tmp; uint32_t tmp; tmp = cpu->cd.arm.r[0]; tmp = cpu->cd.arm.r[1]; tmp = cpu->cd.arm.r[2]; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp = tmp; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmp >>= 7; tmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptmptm