{"type": "func", "start": 6442533344, "end": 6442533681, "name": "cocos2d::extension::CCArrayForObjectSorting::removeSortedObject", "pseudocode": "// \n// cocos2d::extension::CCArrayForObjectSorting::removeSortedObject from 0x1800141e0 to 0x180014331 (337 bytes)\n// \n// 5 xrefs:\n// > cocos2d::extension::CCTableView::_moveCellOutOfSight @ 0x180015944\n// > <???> @ 0x180031148\n// > <???> @ 0x180031188\n// > <???> @ 0x180032408\n// > <???> @ 0x18004c578\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:15:41 +0000\n// \n\nvoid __fastcall cocos2d::extension::CCArrayForObjectSorting::removeSortedObject(\n        cocos2d::extension::CCArrayForObjectSorting *this,\n        struct cocos2d::extension::CCSortableObject *a2)\n{\n  unsigned int v4; // esi\n  unsigned int v5; // ebp\n  unsigned int v6; // edi\n  unsigned int *v7; // rbx\n  __int64 v8; // rax\n  _QWORD *v9; // rbx\n  _QWORD *i; // r15\n  __int64 v11; // rax\n  unsigned int v12; // eax\n  struct cocos2d::CCObject *v13; // rax\n  __int64 v14; // rax\n  unsigned int (__fastcall *v15)(struct cocos2d::extension::CCSortableObject *); // rdi\n  int v16; // ebx\n\n  if ( cocos2d::CCArray::count(this) )\n  {\n    v4 = 0;\n    if ( a2 )\n    {\n      v5 = 0;\n      v6 = (*(__int64 (__fastcall **)(struct cocos2d::extension::CCSortableObject *))(*(_QWORD *)a2 + 16LL))(a2);\n      if ( this )\n      {\n        v7 = *((unsigned int **)this + 7);\n        v8 = *v7;\n        if ( (_DWORD)v8 )\n        {\n          v9 = *((_QWORD **)v7 + 2);\n          for ( i = &v9[v8 - 1]; v9 <= i; v5 = v12 )\n          {\n            if ( !*v9 )\n              break;\n            v11 = _RTDynamicCast(\n                    *v9,\n                    0,\n                    &cocos2d::CCObject `RTTI Type Descriptor',\n                    &cocos2d::extension::CCSortableObject `RTTI Type Descriptor',\n                    0);\n            v12 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v11 + 16LL))(v11);\n            if ( v6 == v12 || v6 >= v5 && v6 < v12 )\n              break;\n            ++v4;\n            ++v9;\n          }\n        }\n      }\n    }\n    else\n    {\n      v4 = -1;\n    }\n    if ( v4 < cocos2d::CCArray::count(this) && v4 != -1 )\n    {\n      v13 = cocos2d::CCArray::objectAtIndex(this, v4);\n      v14 = _RTDynamicCast(\n              v13,\n              0,\n              &cocos2d::CCObject `RTTI Type Descriptor',\n              &cocos2d::extension::CCSortableObject `RTTI Type Descriptor',\n              0);\n      v15 = *(unsigned int (__fastcall **)(struct cocos2d::extension::CCSortableObject *))(*(_QWORD *)a2 + 16LL);\n      v16 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 16LL))(v14);\n      if ( v16 == v15(a2) )\n        cocos2d::CCArray::removeObjectAtIndex(this, v4, 1);\n    }\n  }\n}", "assembly": "; \n; cocos2d::extension::CCArrayForObjectSorting::removeSortedObject from 0x1800141e0 to 0x180014331 (337 bytes)\n; \n; 5 xrefs:\n; > cocos2d::extension::CCTableView::_moveCellOutOfSight @ 0x180015944\n; > <???> @ 0x180031148\n; > <???> @ 0x180031188\n; > <???> @ 0x180032408\n; > <???> @ 0x18004c578\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:15:41 +0000\n; \npush    r12                                                            ; +0x0, 0x1800141e0\npush    r14                                                            ; +0x2, 0x1800141e2\nsub     rsp, 48h                                                       ; +0x4, 0x1800141e4\nmov     r12, rdx                                                       ; +0x8, 0x1800141e8\nmov     r14, rcx                                                       ; +0xb, 0x1800141eb\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xe, 0x1800141ee\ntest    eax, eax                                                       ; +0x14, 0x1800141f4\njz      loc_180014328                                                  ; +0x16, 0x1800141f6\nmov     [rsp+58h+arg_10], rsi                                          ; +0x1c, 0x1800141fc\nmov     [rsp+58h+var_20], r13                                          ; +0x21, 0x180014201\nxor     r13d, r13d                                                     ; +0x26, 0x180014206\nmov     [rsp+58h+arg_0], rbx                                           ; +0x29, 0x180014209\nmov     esi, r13d                                                      ; +0x2e, 0x18001420e\nmov     [rsp+58h+arg_8], rbp                                           ; +0x31, 0x180014211\nmov     [rsp+58h+var_18], rdi                                          ; +0x36, 0x180014216\nmov     [rsp+58h+var_28], r15                                          ; +0x3b, 0x18001421b\ntest    r12, r12                                                       ; +0x40, 0x180014220\njz      short loc_18001429D                                            ; +0x43, 0x180014223\nmov     rax, [r12]                                                     ; +0x45, 0x180014225\nmov     rcx, r12                                                       ; +0x49, 0x180014229\nmov     ebp, r13d                                                      ; +0x4c, 0x18001422c\ncall    qword ptr [rax+10h]                                            ; +0x4f, 0x18001422f\nmov     edi, eax                                                       ; +0x52, 0x180014232\ntest    r14, r14                                                       ; +0x54, 0x180014234\njz      short loc_1800142A2                                            ; +0x57, 0x180014237\nmov     rbx, [r14+38h]                                                 ; +0x59, 0x180014239\nmov     eax, [rbx]                                                     ; +0x5d, 0x18001423d\ntest    eax, eax                                                       ; +0x5f, 0x18001423f\njz      short loc_1800142A2                                            ; +0x61, 0x180014241\nmov     rbx, [rbx+10h]                                                 ; +0x63, 0x180014243\nlea     r15, [rax-1]                                                   ; +0x67, 0x180014247\nlea     r15, [rbx+r15*8]                                               ; +0x6b, 0x18001424b\ncmp     rbx, r15                                                       ; +0x6f, 0x18001424f\nja      short loc_1800142A2                                            ; +0x72, 0x180014252\nmov     rcx, [rbx]                                                     ; +0x74, 0x180014254\ntest    rcx, rcx                                                       ; +0x77, 0x180014257\njz      short loc_1800142A2                                            ; +0x7a, 0x18001425a\nlea     r9, ??_R0?AVCCSortableObject@extension@cocos2d@@@8; cocos2d::extension::CCSortableObject `RTTI Type Descriptor' ; +0x7c, 0x18001425c\nmov     [rsp+58h+var_38], r13d                                         ; +0x83, 0x180014263\nlea     r8, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0x88, 0x180014268\nxor     edx, edx                                                       ; +0x8f, 0x18001426f\ncall    __RTDynamicCast                                                ; +0x91, 0x180014271\nmov     rcx, [rax]                                                     ; +0x96, 0x180014276\nmov     rdx, [rcx+10h]                                                 ; +0x99, 0x180014279\nmov     rcx, rax                                                       ; +0x9d, 0x18001427d\ncall    rdx                                                            ; +0xa0, 0x180014280\ncmp     edi, eax                                                       ; +0xa2, 0x180014282\njz      short loc_1800142A2                                            ; +0xa4, 0x180014284\ncmp     edi, ebp                                                       ; +0xa6, 0x180014286\njb      short loc_18001428E                                            ; +0xa8, 0x180014288\ncmp     edi, eax                                                       ; +0xaa, 0x18001428a\njb      short loc_1800142A2                                            ; +0xac, 0x18001428c\ninc     esi                                                            ; +0xae, 0x18001428e\nadd     rbx, 8                                                         ; +0xb0, 0x180014290\nmov     ebp, eax                                                       ; +0xb4, 0x180014294\ncmp     rbx, r15                                                       ; +0xb6, 0x180014296\njbe     short loc_180014254                                            ; +0xb9, 0x180014299\njmp     short loc_1800142A2                                            ; +0xbb, 0x18001429b\nmov     esi, 0FFFFFFFFh                                                ; +0xbd, 0x18001429d\nmov     rcx, r14                                                       ; +0xc2, 0x1800142a2\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xc5, 0x1800142a5\nmov     r15, [rsp+58h+var_28]                                          ; +0xcb, 0x1800142ab\nmov     rbp, [rsp+58h+arg_8]                                           ; +0xd0, 0x1800142b0\ncmp     esi, eax                                                       ; +0xd5, 0x1800142b5\njnb     short loc_180014314                                            ; +0xd7, 0x1800142b7\ncmp     esi, 0FFFFFFFFh                                                ; +0xd9, 0x1800142b9\njz      short loc_180014314                                            ; +0xdc, 0x1800142bc\nmov     edx, esi                                                       ; +0xde, 0x1800142be\nmov     rcx, r14                                                       ; +0xe0, 0x1800142c0\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xe3, 0x1800142c3\nlea     r9, ??_R0?AVCCSortableObject@extension@cocos2d@@@8; cocos2d::extension::CCSortableObject `RTTI Type Descriptor' ; +0xe9, 0x1800142c9\nmov     [rsp+58h+var_38], r13d                                         ; +0xf0, 0x1800142d0\nmov     rcx, rax                                                       ; +0xf5, 0x1800142d5\nlea     r8, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0xf8, 0x1800142d8\nxor     edx, edx                                                       ; +0xff, 0x1800142df\ncall    __RTDynamicCast                                                ; +0x101, 0x1800142e1\nmov     rcx, [rax]                                                     ; +0x106, 0x1800142e6\nmov     r8, [rcx+10h]                                                  ; +0x109, 0x1800142e9\nmov     rcx, [r12]                                                     ; +0x10d, 0x1800142ed\nmov     rdi, [rcx+10h]                                                 ; +0x111, 0x1800142f1\nmov     rcx, rax                                                       ; +0x115, 0x1800142f5\ncall    r8                                                             ; +0x118, 0x1800142f8\nmov     rcx, r12                                                       ; +0x11b, 0x1800142fb\nmov     ebx, eax                                                       ; +0x11e, 0x1800142fe\ncall    rdi                                                            ; +0x120, 0x180014300\ncmp     ebx, eax                                                       ; +0x122, 0x180014302\njnz     short loc_180014314                                            ; +0x124, 0x180014304\nmov     r8b, 1                                                         ; +0x126, 0x180014306\nmov     edx, esi                                                       ; +0x129, 0x180014309\nmov     rcx, r14                                                       ; +0x12b, 0x18001430b\ncall    cs:?removeObjectAtIndex@CCArray@cocos2d@@QEAAXI_N@Z; cocos2d::CCArray::removeObjectAtIndex(uint,bool) ; +0x12e, 0x18001430e\nmov     rdi, [rsp+58h+var_18]                                          ; +0x134, 0x180014314\nmov     rbx, [rsp+58h+arg_0]                                           ; +0x139, 0x180014319\nmov     rsi, [rsp+58h+arg_10]                                          ; +0x13e, 0x18001431e\nmov     r13, [rsp+58h+var_20]                                          ; +0x143, 0x180014323\nadd     rsp, 48h                                                       ; +0x148, 0x180014328\npop     r14                                                            ; +0x14c, 0x18001432c\npop     r12                                                            ; +0x14e, 0x18001432e\nretn                                                                   ; +0x150, 0x180014330", "xrefs": ["cocos2d::extension::CCTableView::_moveCellOutOfSight @ 0x180015944", "<???> @ 0x180031148", "<???> @ 0x180031188", "<???> @ 0x180032408", "<???> @ 0x18004c578"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}