============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* js::frontend::ElemOpEmitter::prepareForRhs() * ;************************************************************************************************************************************************************ ;undefined prepareForRhs(ElemOpEmitter * this) ;this ElemOpEmitt... RDI MOV EAX,dword ptr [this + 0x8] SUB EAX,0x8 CMP EAX,0x1 JA LAB_00687ad2 MOV EAX,dword ptr [this + 0xc] TEST EAX,EAX JZ LAB_00687ae0 LAB_00687ad2: MOV EAX,0x1 RET ?? 0Fh ;? -> 00841f0f ?? 1Fh ?? 84h ?? 00h ?? 00h ?? 00h ?? 00h ?? 00h LAB_00687ae0: MOV this,qword ptr [this] JMP js::frontend::BytecodeEmitter::emitSuperBase ;undefined emitSuperBase(BytecodeEmit... ?? 0Fh ;? -> 00841f0f Actual src: bool ElemOpEmitter::prepareForRhs() { MOZ_ASSERT(isSimpleAssignment() || isPropInit() || isCompoundAssignment()); MOZ_ASSERT_IF(isSimpleAssignment() || isPropInit(), state_ == State::Key); MOZ_ASSERT_IF(isCompoundAssignment(), state_ == State::Get); if (isSimpleAssignment() || isPropInit()) { // For CompoundAssignment, SuperBase is already emitted by emitGet. if (isSuper()) { if (!bce_->emitSuperBase()) { // [stack] THIS KEY SUPERBASE return false; } } } #ifdef DEBUG state_ = State::Rhs; #endif return true; } Predicted src: void BaseBaseBase::emit() { if (m_flags.empty()) return; else return; } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* ccl::EmissionNode::compile(ccl::SVMCompiler&) * ;************************************************************************************************************************************************************ ;undefined compile(EmissionNode * this, SVMCompiler * param_1) ;this EmissionNode * RDI ;param_1 SVMCompiler * RSI ;local_30 undefined8 -30 ;local_3c undefined4 -3c ;local_40 undefined4 -40 ;local_44 undefined4 -44 ;local_48 undefined4 -48 PUSH R13 PUSH R12 PUSH RBP MOV RBP,param_1 LEA param_1,[.rodata:s_Color_03a76446] ;= "Color" PUSH RBX MOV RBX,this SUB RSP,0x28 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + local_30+0x48],RAX XOR EAX,EAX CALL ccl::ShaderNode::input ;undefined input(ShaderNode * this, c... LEA param_1,[.rodata:s_Strength_03a7bfa8] ;= "Strength" MOV this,RBX MOV R12,RAX CALL ccl::ShaderNode::input ;undefined input(ShaderNode * this, c... CMP qword ptr [R12 + 0x10],0x0 MOV param_1,RAX JZ LAB_02777090 LAB_02777029: MOV this,RBP CALL ccl::SVMCompiler::stack_assign ;undefined stack_assign(ShaderInput *... MOV param_1,R12 MOV this,RBP MOV R13D,EAX CALL ccl::SVMCompiler::stack_assign ;undefined stack_assign(ShaderInput *... XOR R8D,R8D MOV ECX,R13D MOV param_1,0x7 MOV EDX,EAX MOV this,RBP CALL ccl::SVMCompiler::add_node ;undefined add_node(SVMCompiler * thi... LAB_02777054: MOV RAX,qword ptr [RSP + local_30+0x48] SUB RAX,qword ptr FS:[0x28] JNZ LAB_027770e4 MOV EDX,dword ptr [RBP + 0x440] ADD RSP,0x28 MOV this,RBP XOR R8D,R8D POP RBX XOR ECX,ECX POP RBP MOV param_1,0x3 POP R12 POP R13 JMP ccl::SVMCompiler::add_node ;undefined add_node(SVMCompiler * thi... ?? 66h f ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_02777090: CMP qword ptr [RAX + 0x10],0x0 JNZ LAB_02777029 MOVSS XMM1,dword ptr [RBX + 0x78] MOVSS XMM2,dword ptr [RBX + 0x74] MOV RDX,RSP MOV this,RBP MOVSS XMM0,dword ptr [RBX + 0x80] MOV param_1,0x5 MOV dword ptr [RSP + local_3c+0x48],0x0 MULSS XMM1,XMM0 MULSS XMM2,XMM0 MULSS XMM0,dword ptr [RBX + 0x70] MOVSS dword ptr [RSP + local_40+0x48],XMM1 MOVSS dword ptr [RSP + local_44+0x48],XMM2 MOVSS dword ptr [RSP]=>local_48,XMM0 CALL ccl::SVMCompiler::add_node ;undefined add_node(SVMCompiler * thi... JMP LAB_02777054 LAB_027770e4: CALL .plt:::__stack_chk_fail ;undefined __stack_chk_fail() NOP Actual src: void EmissionNode::compile(SVMCompiler &compiler) { ShaderInput *color_in = input("Color"); ShaderInput *strength_in = input("Strength"); if (color_in->link || strength_in->link) { compiler.add_node( NODE_EMISSION_WEIGHT, compiler.stack_assign(color_in), compiler.stack_assign(strength_in)); } else compiler.add_node(NODE_CLOSURE_SET_WEIGHT, color * strength); compiler.add_node(NODE_CLOSURE_EMISSION, compiler.closure_mix_weight_offset()); } Predicted src: void nodeNode::add_node(Node *node) { node->add_node(node); node->add_node(node); node->add_node(node); node->add_node(node); node->add_node(node); node->add_node(node); node->add_node(node); node->add_node(node); node->add_node(node); } ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined allocate_row() PUSH RBX MOV RAX,qword ptr [RDI] MOV RBX,RDI LEA RDI,[RAX + 0x10] CALL .plt:shash_count ;undefined shash_count() MOV R8,RAX MOV RAX,qword ptr [RBX] LEA RDX,[R8 + R8*0x2] MOV RAX,qword ptr [RAX + 0x38] SHL RAX,0x4 LEA RDI,[RAX + RDX*0x8 + 0x48] CALL .plt:xmalloc ;undefined xmalloc() LEA RDX,[RAX + 0x20] MOV qword ptr [RAX + 0x10],RBX MOV qword ptr [RAX + 0x20],RDX MOV qword ptr [RAX + 0x28],RDX LEA RDX,[RAX + 0x30] MOV qword ptr [RAX + 0x18],0x0 MOV qword ptr [RAX + 0x30],RDX MOV qword ptr [RAX + 0x38],RDX MOV qword ptr [RAX + 0x40],0x0 POP RBX RET ?? 66h f Actual src: static struct ovsdb_row * allocate_row(const struct ovsdb_table *table) { size_t n_fields = shash_count(&table->schema->columns); size_t n_indexes = table->schema->n_indexes; size_t row_size = (offsetof(struct ovsdb_row, fields) + sizeof(struct ovsdb_datum) * n_fields + sizeof(struct hmap_node) * n_indexes); struct ovsdb_row *row = xmalloc(row_size); row->table = CONST_CAST(struct ovsdb_table *, table); row->txn_row = NULL; ovs_list_init(&row->src_refs); ovs_list_init(&row->dst_refs); row->n_refs = 0; return row; } Predicted src: static void row_row_row_init (row_row_t *row) { row_row_t *row = (row_row_t *)row->row; row_row_t *row = row->row; row->row = row->row; row->row = row->row; row->row = row->row; row->row = row->row; row->row = row->row; row->row = row->row; row->row = row->row; row->row = row->row; } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined usage() PUSH RBP LEA R9,[.rodata:s_[-h_home]_[-P_password]_[-t_btre_001055c0] ;= "[-h home] [-P password] [-t btree... MOV ESI,0x1 XOR EAX,EAX PUSH RBX LEA R8,[.rodata:s_[-nTV]_[-c_name=value]_[-f_file]_00105608] ;= "[-nTV] [-c name=value] [-f file]" LEA RDX,[.rodata:s_usage:_%s_%s_%s_001051c6] ;= "usage: %s %s\n\t%s\n" SUB RSP,0x8 LEA RBP,[.bss:progname] ;=?? MOV RBX,qword ptr [->stderr] ;= 00108120 MOV RCX,qword ptr [RBP]=>.bss:progname ;=?? MOV RDI,qword ptr [RBX]=>EXTERNAL:stderr ;=?? CALL .plt:::__fprintf_chk ;undefined __fprintf_chk() MOV RCX,qword ptr [RBP]=>.bss:progname ;=?? MOV RDI,qword ptr [RBX]=>EXTERNAL:stderr ;=?? XOR EAX,EAX LEA R8,[.rodata:s_-r_lsn_|_fileid_[-h_home]_[-P_pa_00105630] ;= "-r lsn | fileid [-h home] [-P pas... LEA RDX,[.rodata:s_usage:_%s_%s_001051d8] ;= "usage: %s %s\n" MOV ESI,0x1 CALL .plt:::__fprintf_chk ;undefined __fprintf_chk() ADD RSP,0x8 MOV EAX,0x1 POP RBX POP RBP RET ?? 0Fh Actual src: int usage() { (void)fprintf(stderr, "usage: %s %s\n\t%s\n", progname, "[-nTV] [-c name=value] [-f file]", "[-h home] [-P password] [-t btree | hash | recno | queue] db_file"); (void)fprintf(stderr, "usage: %s %s\n", progname, "-r lsn | fileid [-h home] [-P password] db_file"); return (EXIT_FAILURE); } Predicted src: static void usage(void) { fprintf(stderr, "Usage: %s [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f [-f] [-f] [-f] [-f] [-f] [-f [-f] [-f] [-f] [-f] [-f] [-f [-f] [-f] [-f] [-f] [-f] [-f [-f] [-f] [-f] [-f] [-f] [-f [-f] [-f] [-f] [-f] [-f] [-f [-f] [-f] [-f] [-f] [-f] [-f [-f] [ ============================== Sample 5 ============================== 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 GetCount() const override { return m_id; }