{"type": "func", "start": 6442534464, "end": 6442534793, "name": "cocos2d::extension::CCArrayForObjectSorting::removeSortedObject", "pseudocode": "// \n// cocos2d::extension::CCArrayForObjectSorting::removeSortedObject from 0x180014640 to 0x180014789 (329 bytes)\n// \n// 5 xrefs:\n// > cocos2d::extension::CCTableView::_moveCellOutOfSight @ 0x180015d44\n// > <???> @ 0x18002ebb4\n// > <???> @ 0x18002ebf0\n// > <???> @ 0x18002fdf8\n// > <???> @ 0x18004a644\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid __fastcall cocos2d::extension::CCArrayForObjectSorting::removeSortedObject(\n        cocos2d::extension::CCArrayForObjectSorting *this,\n        struct cocos2d::extension::CCSortableObject *a2)\n{\n  unsigned int v4; // edi\n  unsigned int v5; // ebp\n  unsigned int v6; // esi\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  int v15; // 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 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 16LL))(v14);\n      if ( v15 == (*(unsigned int (__fastcall **)(struct cocos2d::extension::CCSortableObject *))(*(_QWORD *)a2 + 16LL))(a2) )\n        cocos2d::CCArray::removeObjectAtIndex(this, v4, 1);\n    }\n  }\n}", "assembly": "; \n; cocos2d::extension::CCArrayForObjectSorting::removeSortedObject from 0x180014640 to 0x180014789 (329 bytes)\n; \n; 5 xrefs:\n; > cocos2d::extension::CCTableView::_moveCellOutOfSight @ 0x180015d44\n; > <???> @ 0x18002ebb4\n; > <???> @ 0x18002ebf0\n; > <???> @ 0x18002fdf8\n; > <???> @ 0x18004a644\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\npush    r12                                                            ; +0x0, 0x180014640\npush    r14                                                            ; +0x2, 0x180014642\nsub     rsp, 48h                                                       ; +0x4, 0x180014644\nmov     r12, rdx                                                       ; +0x8, 0x180014648\nmov     r14, rcx                                                       ; +0xb, 0x18001464b\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xe, 0x18001464e\ntest    eax, eax                                                       ; +0x14, 0x180014654\njz      loc_180014780                                                  ; +0x16, 0x180014656\nmov     [rsp+58h+var_18], rdi                                          ; +0x1c, 0x18001465c\nmov     [rsp+58h+var_20], r13                                          ; +0x21, 0x180014661\nxor     r13d, r13d                                                     ; +0x26, 0x180014666\nmov     [rsp+58h+arg_0], rbx                                           ; +0x29, 0x180014669\nmov     edi, r13d                                                      ; +0x2e, 0x18001466e\nmov     [rsp+58h+arg_8], rbp                                           ; +0x31, 0x180014671\nmov     [rsp+58h+arg_10], rsi                                          ; +0x36, 0x180014676\nmov     [rsp+58h+var_28], r15                                          ; +0x3b, 0x18001467b\ntest    r12, r12                                                       ; +0x40, 0x180014680\njz      short loc_1800146FA                                            ; +0x43, 0x180014683\nmov     rax, [r12]                                                     ; +0x45, 0x180014685\nmov     rcx, r12                                                       ; +0x49, 0x180014689\nmov     ebp, r13d                                                      ; +0x4c, 0x18001468c\ncall    qword ptr [rax+10h]                                            ; +0x4f, 0x18001468f\nmov     esi, eax                                                       ; +0x52, 0x180014692\ntest    r14, r14                                                       ; +0x54, 0x180014694\njz      short loc_1800146FF                                            ; +0x57, 0x180014697\nmov     rbx, [r14+38h]                                                 ; +0x59, 0x180014699\nmov     eax, [rbx]                                                     ; +0x5d, 0x18001469d\ntest    eax, eax                                                       ; +0x5f, 0x18001469f\njz      short loc_1800146FF                                            ; +0x61, 0x1800146a1\nmov     rbx, [rbx+10h]                                                 ; +0x63, 0x1800146a3\nlea     r15, [rax-1]                                                   ; +0x67, 0x1800146a7\nlea     r15, [rbx+r15*8]                                               ; +0x6b, 0x1800146ab\ncmp     rbx, r15                                                       ; +0x6f, 0x1800146af\nja      short loc_1800146FF                                            ; +0x72, 0x1800146b2\nmov     rcx, [rbx]                                                     ; +0x74, 0x1800146b4\ntest    rcx, rcx                                                       ; +0x77, 0x1800146b7\njz      short loc_1800146FF                                            ; +0x7a, 0x1800146ba\nlea     r9, ??_R0?AVCCSortableObject@extension@cocos2d@@@8; cocos2d::extension::CCSortableObject `RTTI Type Descriptor' ; +0x7c, 0x1800146bc\nmov     [rsp+58h+var_38], r13d                                         ; +0x83, 0x1800146c3\nlea     r8, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0x88, 0x1800146c8\nxor     edx, edx                                                       ; +0x8f, 0x1800146cf\ncall    __RTDynamicCast                                                ; +0x91, 0x1800146d1\nmov     rcx, rax                                                       ; +0x96, 0x1800146d6\nmov     rdx, [rax]                                                     ; +0x99, 0x1800146d9\ncall    qword ptr [rdx+10h]                                            ; +0x9c, 0x1800146dc\ncmp     esi, eax                                                       ; +0x9f, 0x1800146df\njz      short loc_1800146FF                                            ; +0xa1, 0x1800146e1\ncmp     esi, ebp                                                       ; +0xa3, 0x1800146e3\njb      short loc_1800146EB                                            ; +0xa5, 0x1800146e5\ncmp     esi, eax                                                       ; +0xa7, 0x1800146e7\njb      short loc_1800146FF                                            ; +0xa9, 0x1800146e9\ninc     edi                                                            ; +0xab, 0x1800146eb\nadd     rbx, 8                                                         ; +0xad, 0x1800146ed\nmov     ebp, eax                                                       ; +0xb1, 0x1800146f1\ncmp     rbx, r15                                                       ; +0xb3, 0x1800146f3\njbe     short loc_1800146B4                                            ; +0xb6, 0x1800146f6\njmp     short loc_1800146FF                                            ; +0xb8, 0x1800146f8\nmov     edi, 0FFFFFFFFh                                                ; +0xba, 0x1800146fa\nmov     rcx, r14                                                       ; +0xbf, 0x1800146ff\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xc2, 0x180014702\nmov     r15, [rsp+58h+var_28]                                          ; +0xc8, 0x180014708\nmov     rsi, [rsp+58h+arg_10]                                          ; +0xcd, 0x18001470d\nmov     rbp, [rsp+58h+arg_8]                                           ; +0xd2, 0x180014712\ncmp     edi, eax                                                       ; +0xd7, 0x180014717\njnb     short loc_180014771                                            ; +0xd9, 0x180014719\ncmp     edi, 0FFFFFFFFh                                                ; +0xdb, 0x18001471b\njz      short loc_180014771                                            ; +0xde, 0x18001471e\nmov     edx, edi                                                       ; +0xe0, 0x180014720\nmov     rcx, r14                                                       ; +0xe2, 0x180014722\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xe5, 0x180014725\nlea     r9, ??_R0?AVCCSortableObject@extension@cocos2d@@@8; cocos2d::extension::CCSortableObject `RTTI Type Descriptor' ; +0xeb, 0x18001472b\nmov     [rsp+58h+var_38], r13d                                         ; +0xf2, 0x180014732\nmov     rcx, rax                                                       ; +0xf7, 0x180014737\nlea     r8, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0xfa, 0x18001473a\nxor     edx, edx                                                       ; +0x101, 0x180014741\ncall    __RTDynamicCast                                                ; +0x103, 0x180014743\nmov     rcx, rax                                                       ; +0x108, 0x180014748\nmov     r8, [rax]                                                      ; +0x10b, 0x18001474b\ncall    qword ptr [r8+10h]                                             ; +0x10e, 0x18001474e\nmov     r8, [r12]                                                      ; +0x112, 0x180014752\nmov     rcx, r12                                                       ; +0x116, 0x180014756\nmov     ebx, eax                                                       ; +0x119, 0x180014759\ncall    qword ptr [r8+10h]                                             ; +0x11b, 0x18001475b\ncmp     ebx, eax                                                       ; +0x11f, 0x18001475f\njnz     short loc_180014771                                            ; +0x121, 0x180014761\nmov     r8b, 1                                                         ; +0x123, 0x180014763\nmov     edx, edi                                                       ; +0x126, 0x180014766\nmov     rcx, r14                                                       ; +0x128, 0x180014768\ncall    cs:?removeObjectAtIndex@CCArray@cocos2d@@QEAAXI_N@Z; cocos2d::CCArray::removeObjectAtIndex(uint,bool) ; +0x12b, 0x18001476b\nmov     rbx, [rsp+58h+arg_0]                                           ; +0x131, 0x180014771\nmov     rdi, [rsp+58h+var_18]                                          ; +0x136, 0x180014776\nmov     r13, [rsp+58h+var_20]                                          ; +0x13b, 0x18001477b\nadd     rsp, 48h                                                       ; +0x140, 0x180014780\npop     r14                                                            ; +0x144, 0x180014784\npop     r12                                                            ; +0x146, 0x180014786\nretn                                                                   ; +0x148, 0x180014788", "xrefs": ["cocos2d::extension::CCTableView::_moveCellOutOfSight @ 0x180015d44", "<???> @ 0x18002ebb4", "<???> @ 0x18002ebf0", "<???> @ 0x18002fdf8", "<???> @ 0x18004a644"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}