============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* Py::PythonExtensionBase::str() * ;************************************************************************************************************************************************************ ;undefined str(void) ;local_20 undefined8 -20 ;local_30 undefined1 -30 ;local_40 undefined8 -40 PUSH R12 MOV EDI,0x1 PUSH RBP PUSH RBX SUB RSP,0x30 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + local_20+0x48],RAX XOR EAX,EAX LEA RBP=>local_40,[RSP + 0x8] CALL .plt:::__cxa_allocate_exception ;undefined __cxa_allocate_exception() LEA RSI,[.rodata:s_Extension_object_missing_impleme_002426d8] ;= "Extension object missing implemen... MOV RDI,RBP MOV R12,RAX ;try { // try from 0017feba to 0017febe has its CatchHandler @ 0017ff00 LAB_0017feba: CALL std::__cxx11::basic_string,std::allocator>::basic_string ;undefined basic_string(char * param_... ;} // end try from 0017feba to 0017febe MOV RDI,RBP LEA RBX=>local_30,[RSP + 0x18] ;try { // try from 0017fec7 to 0017fecb has its CatchHandler @ 0017feec LAB_0017fec7: CALL Py::RuntimeError::RuntimeError ;undefined RuntimeError(RuntimeError... ;} // end try from 0017fec7 to 0017fecb MOV RDI=>local_40,qword ptr [RSP + 0x8] CMP RDI,RBX JZ LAB_0017fedb CALL .plt:::operator.delete ;void operator.delete(void * param_1) LAB_0017fedb: MOV RSI=>.data.rel.ro:Py::RuntimeError::typeinfo,qword ptr [->Py::RuntimeError::typeinfo] ;= 002a5cd8 ;= 00293fb8 XOR EDX,EDX MOV RDI,R12 LAB_0017fee7: CALL .plt:::__cxa_throw ;undefined __cxa_throw() ;catch() {... } // from try @ 0017fec7 with catch @ 0017feec LAB_0017feec: MOV RBP,RAX MOV RDI,qword ptr [RSP + 0x8] CMP RDI,RBX JZ LAB_0017ff03 CALL .plt:::operator.delete ;void operator.delete(void * param_1) JMP LAB_0017ff03 ;catch() {... } // from try @ 0017feba with catch @ 0017ff00 LAB_0017ff00: MOV RBP,RAX LAB_0017ff03: MOV RDI,R12 CALL .plt:::__cxa_free_exception ;undefined __cxa_free_exception() MOV RDI,RBP CALL .plt:::_Unwind_Resume ;undefined _Unwind_Resume() NOP Actual src: Py::Object PythonExtensionBase::str() { missing_method( str ); return Py::None(); } Predicted src: PyObject* PyBaseBaseBaseBaseBase::free(void) { return PyObject_New(); } ============================== Sample 2 ============================== 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_out(const char *str, const char *s) { if (str!= NULL) { fprintf(stderr, "%s: %s\n", str); exit(EXIT_FAILURE); } if (str!= NULL) { fprintf(stderr, "%s\n", str); exit(EXIT_FAILURE); } if (str!= NULL) { fprintf(stderr, "%s: %s\n", str); exit(EXIT_FAILURE); } } ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* idAnimBlend::GetCycleCount() const * ;************************************************************************************************************************************************************ ;undefined GetCycleCount(idAnimBlend * this) ;this idAnimBlend * RDI MOVSX EAX,word ptr [this + 0x34] RET ?? 90h Actual src: int idAnimBlend::GetCycleCount( void ) const { return cycle; } Predicted src: int GetidCount() const override { return m_idCount; } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* VNode::collect(std::vector >&) const * ;************************************************************************************************************************************************************ ;undefined collect(VNode * this, vector * param_1) ;this VNode * RDI ;param_1 vector * RSI MOV RAX,qword ptr [this + 0x20] MOV RDX,qword ptr [this + 0x28] SUB RDX,RAX SAR RDX,0x3 TEST EDX,EDX JLE LAB_005291e0 PUSH R13 PUSH R12 MOV R12,this PUSH RBP XOR EBP,EBP PUSH RBX MOV RBX,param_1 SUB RSP,0x8 LAB_00529175: CMP RBP,RDX JNC LAB_005291e1 LEA R13,[RBP*0x8] MOV param_1,qword ptr [RBX + 0x8] LEA RDX,[RAX + R13*0x1] CMP param_1,qword ptr [RBX + 0x10] JZ LAB_005291d0 MOV RDX,qword ptr [RDX] ADD param_1,0x8 MOV qword ptr [param_1 + -0x8],RDX MOV qword ptr [RBX + 0x8],param_1 LAB_0052919f: MOV this,qword ptr [RAX + R13*0x1] MOV param_1,RBX ADD RBP,0x1 CALL VNode::collect ;undefined collect(VNode * this, vect... MOV RAX,qword ptr [R12 + 0x20] MOV RDX,qword ptr [R12 + 0x28] SUB RDX,RAX SAR RDX,0x3 CMP EDX,EBP JG LAB_00529175 ADD RSP,0x8 POP RBX POP RBP POP R12 POP R13 RET ?? 90h LAB_005291d0: MOV this,RBX CALL std::vector>::_M_realloc_insert ;void _M_realloc_insert... MOV RAX,qword ptr [R12 + 0x20] JMP LAB_0052919f ?? 90h LAB_005291e0: RET LAB_005291e1: MOV param_1,RBP LEA this,[.rodata:s_vector::_M_range_check:___n_(whi_00983c78] ;= "vector::_M_range_check: __n (whic... XOR EAX,EAX CALL .plt:::std::__throw_out_of_range_fmt ;undefined __throw_out_of_range_fmt(c... NOP dword ptr CS:[RAX + RAX*0x1] Actual src: void VNode::collect(std::vector& vec) const { for(int i=0; i < numOfChildren(); i++) { vec.push_back(children_.at(i)); children_[i]->collect(vec); } } Predicted src: void Node::erase(const std::vector &v) { for (const_iterator i = v.begin(); i!= v.end(); ++i) { v.push_back(i); } } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* op_0690_40_ff(unsigned int) * ;************************************************************************************************************************************************************ ;undefined op_0690_40_ff(uint param_1) ;param_1 uint EDI AND param_1,0x7 PUSH R12 MOV RAX,qword ptr [.bss:regs[72]] MOV R12D,dword ptr [.bss:regs[32] + param_1*0x4] PUSH RBP PUSH RBX MOV EBX,dword ptr [RAX + 0x2] MOV EBP,R12D MOV param_1,R12D SHR EBP,0x10 MOV RAX,qword ptr [.bss:mem_banks + RBP*0x8] BSWAP EBX MOV EDX,dword ptr [RAX + 0x6c] OR dword ptr [.bss:special_mem],EDX CALL qword ptr [RAX] XOR ECX,ECX MOV ESI,EAX MOV EDX,EAX MOV EAX,dword ptr [.bss:regflags] ADD ESI,EBX SETZ CL AND EAX,0xffffbffe MOV param_1,ESI SHL ECX,0xe XOR param_1,EBX OR EAX,ECX MOV ECX,ESI XOR ECX,EDX AND ECX,param_1 MOV param_1,R12D SHR ECX,0x1f OR EAX,ECX AND AH,0xfe ADD EDX,EBX SETC DL Actual src: uae_u32 REGPARAM2 CPUFUNC(op_4650_0)(uae_u32 opcode) { uae_u32 srcreg = (opcode & 7); {{ uaecptr srca; srca = m68k_areg (regs, srcreg); { uae_s16 src = get_word (srca); { uae_u32 dst = ~src; CLEAR_CZNV (); SET_ZFLG (((uae_s16)(dst)) == 0); SET_NFLG (((uae_s16)(dst)) < 0); put_word (srca, dst); }}}} m68k_incpc (2); return 8 * CYCLE_UNIT / 2; } Predicted src: uae_u32 REGPARAM2 CPUFUNC(op_0f0_0)(uae_u32 opcode) { uae_u32 srcreg = (opcode & 7); {{ uaecptr srca; srca = m68k_areg (regs, srcreg) + (uae_s32)(uae_s16)get_diword (2); { uae_s8 src = get_byte (srca); { uaecptr dsta; dsta = m68k_areg (regs, dstreg) + (uae_s32)(uae_s16)get_diword (4); CLEAR_CZNV (); SET_ZFLG (((uae_s8)(src)) == 0); SET_NFLG (((uae_s8)(src)) < 0); put_byte (dsta, src); }}}} m68k_incpc (4); return 8 * CYCLE_UNIT / 2; }