============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* idLBCache::Reset() * ;************************************************************************************************************************************************************ ;undefined Reset(idLBCache * this) ;this idLBCache * RDI PUSH R15 LEA R15,[this + 0xcc] PUSH R14 MOV R14,this PUSH R13 PUSH R12 PUSH RBP LEA RBP,[this + 0x4] PUSH RBX SUB RSP,0x8 LAB_0080c80c: MOV R13,qword ptr [RBP + 0x14] MOV dword ptr [RBP],0x0 TEST R13,R13 JZ LAB_0080c85c MOV EAX,dword ptr [RBP + 0x8] TEST EAX,EAX JLE LAB_0080c854 SUB EAX,0x1 LEA RBX,[R13 + 0x10] LEA RAX,[RAX + RAX*0x2] SHL RAX,0x6 LEA R12,[R13 + RAX*0x1 + 0xd0] NOP word ptr [RAX + RAX*0x1] LAB_0080c840: MOV this,RBX ADD RBX,0xc0 CALL idStr::FreeData ;undefined FreeData(idStr * this) CMP RBX,R12 JNZ LAB_0080c840 LAB_0080c854: MOV this,R13 LAB_0080c857: CALL Mem_Free16 ;undefined Mem_Free16(void * param_1) LAB_0080c85c: MOV qword ptr [RBP + 0x14],0x0 ADD RBP,0x28 MOV dword ptr [RBP + -0x24],0x0 MOV dword ptr [RBP + -0x20],0x0 CMP RBP,R15 JNZ LAB_0080c80c MOV qword ptr [R14 + 0xc8],0x0 XOR EAX,EAX MOV dword ptr [R14 + 0xd0],0x0 MOV qword ptr [R14 + 0xe8],0x0 MOV dword ptr [R14 + 0xf0],0x0 MOV qword ptr [R14 + 0xd8],0x0 MOV dword ptr [R14 + 0xe0],0x0 MOV word ptr [R14 + 0xe4],AX ADD RSP,0x8 POP RBX POP RBP POP R12 POP R13 POP R14 POP R15 RET ?? 66h f Actual src: void idLBCache::Reset() { for( int i = 0; i < NUM_ROW_BLOCKS; i++ ) { rowBlocks[i].startIndex = 0; rowBlocks[i].rows.Clear(); } def = NULL; filter = DEFAULT_LEADERBOARD_FILTER; pendingDef = NULL; pendingFilter = DEFAULT_LEADERBOARD_FILTER; rowOffset = 0; requestingRows = false; numRowsInLeaderboard = 0; entryIndex = 0; loadingNewLeaderboard = false; } Predicted src: void idCache::Reset() { for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { m[i][j] = 0; m[i][j] = 0; m[i][j] = 0; m[i][j] = 0; m[i][j] = 0; } } } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* RGWGetBucketPolicyStatus_ObjStore_S3::send_response() * ;************************************************************************************************************************************************************ ;undefined send_response(RGWGetBucketPolicyStatus_ObjStore_S3 * this) ;this RGWGetBucke... RDI PUSH RBX MOV ESI,dword ptr [this + 0x70] MOV RBX,this TEST ESI,ESI JNZ LAB_00902160 LAB_0090209f: MOV this,qword ptr [RBX + 0x8] CALL dump_errno ;undefined dump_errno(req_state * par... MOV this,qword ptr [RBX + 0x8] XOR R9D,R9D XOR R8D,R8D MOV RCX,-0x1 LEA RDX,[.rodata:s_application/xml_00be3a9c] ;= "application/xml" MOV RSI,RBX CALL end_header ;undefined end_header(req_state * par... MOV this,qword ptr [RBX + 0x8] CALL dump_start ;undefined dump_start(req_state * par... MOV RAX,qword ptr [RBX + 0x8] LEA RCX,[.rodata:s_http://s3.amazonaws.com/doc/2006_00bba808] ;= "http://s3.amazonaws.com/doc/2006-... MOV ESI,0xc LEA RDX,[.rodata:s_PolicyStatus_00c1d571+12] ;= "PolicyStatus" MOV this,qword ptr [RAX + 0x28] MOV RAX,qword ptr [this] CALL qword ptr [RAX + 0x58] MOV RAX,qword ptr [RBX + 0x8] MOVZX ECX,byte ptr [RBX + 0x74] MOV this,qword ptr [RAX + 0x28] MOV R9,qword ptr [this] MOV RAX,qword ptr [R9 + 0x88] CMP RAX,qword ptr [->ceph::Formatter::dump_bool] ;= 004e9af0 JNZ LAB_00902170 TEST CL,CL LEA RAX,[.rodata:s_false_00b9dbb7] ;= "false" LEA R8,[.rodata:DAT_00ba59e0] ;= 74h MOV ESI,0x8 CMOVZ R8,RAX LEA RCX,[.rodata:s_%s_00c380b4+25] ;= "%s" LEA RDX,[.rodata:s_IsPublic_00bfb2e5] ;= "IsPublic" XOR EAX,EAX CALL qword ptr [R9 + 0xb0] LAB_00902141: MOV RAX,qword ptr [RBX + 0x8] MOV this,qword ptr [RAX + 0x28] MOV RAX,qword ptr [this] CALL qword ptr [RAX + 0x60] MOV this,qword ptr [RBX + 0x8] POP RBX MOV RSI,qword ptr [this + 0x28] JMP rgw_flush_formatter_and_reset ;undefined rgw_flush_formatter_and_re... ?? 0Fh ?? 1Fh ?? 00h LAB_00902160: MOV this,qword ptr [this + 0x8] CALL set_req_state_err ;undefined set_req_state_err(req_stat... JMP LAB_0090209f ?? 66h f ?? 90h LAB_00902170: MOV ESI,0x8 LEA RDX,[.rodata:s_IsPublic_00bfb2e5] ;= "IsPublic" CALL RAX JMP LAB_00902141 ;************************************************************************************************************************************************************ ;*boost::date_time::date::TEMPNAMEPLACEHOLDERVALUE(boost::gr...* ;************************************************************************************************************************************************************ ;undefined operator-(date * this, date * param_1) ;this dateformatter->open_object_section_in_ns("PolicyStatus", XMLNS_AWS_S3); // https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETPolicyStatus.html // mentions TRUE and FALSE, but boto/aws official clients seem to want lower // case which is returned by AWS as well; so let's be bug to bug compatible // with the API s->formatter->dump_bool("IsPublic", isPublic); s->formatter->close_section(); rgw_flush_formatter_and_reset(s, s->formatter); } Predicted src: void test_state::reset() { switch (state) { case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; case 0: break; default: break; } } ============================== Sample 3 ============================== 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 free_file_close (void *ptr) { if (ptr == NULL) return; free (ptr); free (ptr); } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined _vala_docky_clippy_preferences_set_property() PUSH R14 MOV R14,RDX PUSH R13 PUSH R12 MOV R12,RCX PUSH RBP MOV RBP,RDI PUSH RBX MOV EBX,ESI CALL .plt:docky_clippy_preferences_get_type ;undefined docky_clippy_preferences_g... MOV RDI,RBP MOV RSI,RAX CALL .plt:::g_type_check_instance_cast ;undefined g_type_check_instance_cast() MOV R13,RAX CMP EBX,0x1 JZ LAB_00103990 CMP EBX,0x2 JZ LAB_001039b0 MOV RAX,qword ptr [RBP] MOV RDI,qword ptr [RAX] CALL .plt:::g_type_name ;undefined g_type_name() MOV RBP,RAX MOV RAX,qword ptr [R12] MOV RDI,qword ptr [RAX] CALL .plt:::g_type_name ;undefined g_type_name() PUSH RBP LEA R9,[.rodata:s_property_00104438] ;= "property" XOR EDI,EDI PUSH RAX MOV R8D,0x115 XOR EAX,EAX LEA RCX,[.rodata:s_ClippyPreferences.c_00104441] ;= "ClippyPreferences.c" PUSH qword ptr [R12 + 0x8] LEA RDX,[.rodata:s_%s:%d:_invalid_%s_id_%u_for_"%s"_001043a8] ;= "%s:%d: invalid %s id %u for \"%s\... MOV ESI,0x10 PUSH RBX CALL .plt:::g_log ;undefined g_log() ADD RSP,0x20 POP RBX POP RBP POP R12 POP R13 POP R14 RET ?? 0Fh ?? 1Fh ?? 00h LAB_00103990: MOV RDI,R14 CALL .plt:::g_value_get_uint ;undefined g_value_get_uint() POP RBX MOV RDI,R13 POP RBP MOV ESI,EAX POP R12 POP R13 POP R14 JMP .plt:docky_clippy_preferences_set_MaxEntries ;undefined docky_clippy_preferences_s... ?? 66h f ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_001039b0: MOV RDI,R14 CALL .plt:::g_value_get_boolean ;undefined g_value_get_boolean() POP RBX MOV RDI,R13 POP RBP MOV ESI,EAX POP R12 POP R13 POP R14 JMP .plt:LAB_00102160 ?? 66h f Actual src: static void _vala_docky_clippy_preferences_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { DockyClippyPreferences * self; self = G_TYPE_CHECK_INSTANCE_CAST (object, DOCKY_TYPE_CLIPPY_PREFERENCES, DockyClippyPreferences); switch (property_id) { case DOCKY_CLIPPY_PREFERENCES_MAX_ENTRIES_PROPERTY: docky_clippy_preferences_set_MaxEntries (self, g_value_get_uint (value)); break; case DOCKY_CLIPPY_PREFERENCES_TRACK_MOUSE_SELECTIONS_PROPERTY: docky_clippy_preferences_set_TrackMouseSelections (self, g_value_get_boolean (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; } } Predicted src: static void _vala_dock_dock_dock_dock_get_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { dockdockdock * self; self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_dockdock_dock_dock_PROPERTY_PROPERTY,predockdockdock); switch (property_id) { case PROP_PROPERTY: g_value_set_boolean (value, g_value_get_boolean (value)); break; case PROP_PROPERTY: g_value_set_boolean (value, g_value_get_boolean (value)); break; case PROP_PROPERTY: g_value_set_boolean (value, g_value_get_boolean (value)); break; case PROP_PROPERTY: g_value_set_boolean (value, g_value_get_boolean (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; break; } } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* _wrap_PyNs3WaveBsmStats_GetRxPktCount(PyNs3WaveBsmStats*, _object*, _object*) * ;************************************************************************************************************************************************************ ;undefined _wrap_PyNs3WaveBsmStats_GetRxPktCount(PyNs3WaveBsmStats * param_1, _object * param_2, _object * param_3) ;param_1 PyNs3WaveBs... RDI ;param_2 _object * RSI ;param_3 _object * RDX SUB RSP,0x8 MOV param_1,qword ptr [param_1 + 0x10] CALL .plt:::ns3::WaveBsmStats::GetRxPktCount ;undefined GetRxPktCount(void) LEA param_1,[.rodata:DAT_0018e091] ;= 69h i ADD RSP,0x8 MOV param_2,EAX XOR EAX,EAX JMP .plt:_Py_BuildValue_SizeT ;undefined _Py_BuildValue_SizeT() ?? 66h f Actual src: PyObject * _wrap_PyNs3WaveBsmStats_GetRxPktCount(PyNs3WaveBsmStats *self, PyObject *PYBINDGEN_UNUSED(_args), PyObject *PYBINDGEN_UNUSED(_kwargs)) { PyObject *py_retval; int retval; retval = self->obj->GetRxPktCount(); py_retval = Py_BuildValue((char *) "i", retval); return py_retval; } Predicted src: PyObject * _wrap_PyNs3WifiMacHeader_GetSerializedSize(PyNs3WifiMacHeader *self, PyObject *PYBINDGEN_UNUSED(_args), PyObject *PYBINDGEN_UNUSED(_kwargs)) { PyObject *py_retval; uint32_t retval; retval = self->obj->GetSerializedSize(); py_retval = Py_BuildValue((char *) "i", PyLong_FromUnsignedLong(retval)); return py_retval; }