{"type": "func", "start": 6442534208, "end": 6442534455, "name": "cocos2d::extension::CCArrayForObjectSorting::insertSortedObject", "pseudocode": "// \n// cocos2d::extension::CCArrayForObjectSorting::insertSortedObject from 0x180014540 to 0x180014637 (247 bytes)\n// \n// 5 xrefs:\n// > cocos2d::extension::CCArrayForObjectSorting::setObjectID_ofSortedObject @ 0x1800148ea\n// > cocos2d::extension::CCTableView::_addCellIfNecessary @ 0x18001589c\n// > <???> @ 0x18002fdf8\n// > <???> @ 0x18004a62c\n// > <???> @ 0x18004a638\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::insertSortedObject(\n        cocos2d::extension::CCArrayForObjectSorting *this,\n        struct cocos2d::extension::CCSortableObject *a2)\n{\n  struct cocos2d::CCObject *v4; // r12\n  unsigned int v5; // edi\n  unsigned int v6; // ebp\n  unsigned int v7; // esi\n  unsigned int *v8; // rbx\n  __int64 v9; // rcx\n  _QWORD *v10; // rbx\n  _QWORD *i; // r14\n  __int64 v12; // rax\n  unsigned int v13; // eax\n\n  v4 = (struct cocos2d::CCObject *)_RTDynamicCast(\n                                     a2,\n                                     0,\n                                     &cocos2d::extension::CCSortableObject `RTTI Type Descriptor',\n                                     &cocos2d::CCObject `RTTI Type Descriptor',\n                                     0);\n  v5 = 0;\n  if ( a2 )\n  {\n    v6 = 0;\n    v7 = (*(__int64 (__fastcall **)(struct cocos2d::extension::CCSortableObject *))(*(_QWORD *)a2 + 16LL))(a2);\n    if ( this )\n    {\n      v8 = *((unsigned int **)this + 7);\n      v9 = *v8;\n      if ( (_DWORD)v9 )\n      {\n        v10 = *((_QWORD **)v8 + 2);\n        for ( i = &v10[v9 - 1]; v10 <= i; v6 = v13 )\n        {\n          if ( !*v10 )\n            break;\n          v12 = _RTDynamicCast(\n                  *v10,\n                  0,\n                  &cocos2d::CCObject `RTTI Type Descriptor',\n                  &cocos2d::extension::CCSortableObject `RTTI Type Descriptor',\n                  0);\n          v13 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v12 + 16LL))(v12);\n          if ( v7 == v13 || v7 >= v6 && v7 < v13 )\n            break;\n          ++v5;\n          ++v10;\n        }\n      }\n    }\n  }\n  else\n  {\n    v5 = -1;\n  }\n  cocos2d::CCArray::insertObject(this, v4, v5);\n}", "assembly": "; \n; cocos2d::extension::CCArrayForObjectSorting::insertSortedObject from 0x180014540 to 0x180014637 (247 bytes)\n; \n; 5 xrefs:\n; > cocos2d::extension::CCArrayForObjectSorting::setObjectID_ofSortedObject @ 0x1800148ea\n; > cocos2d::extension::CCTableView::_addCellIfNecessary @ 0x18001589c\n; > <???> @ 0x18002fdf8\n; > <???> @ 0x18004a62c\n; > <???> @ 0x18004a638\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\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x180014540\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x180014545\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x18001454a\npush    rdi                                                            ; +0xf, 0x18001454f\npush    r12                                                            ; +0x10, 0x180014550\npush    r13                                                            ; +0x12, 0x180014552\npush    r14                                                            ; +0x14, 0x180014554\npush    r15                                                            ; +0x16, 0x180014556\nsub     rsp, 30h                                                       ; +0x18, 0x180014558\nmov     rbx, rdx                                                       ; +0x1c, 0x18001455c\nlea     r9, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0x1f, 0x18001455f\nmov     r15, rcx                                                       ; +0x26, 0x180014566\nlea     r8, ??_R0?AVCCSortableObject@extension@cocos2d@@@8; cocos2d::extension::CCSortableObject `RTTI Type Descriptor' ; +0x29, 0x180014569\nxor     r13d, r13d                                                     ; +0x30, 0x180014570\nmov     rcx, rbx                                                       ; +0x33, 0x180014573\nxor     edx, edx                                                       ; +0x36, 0x180014576\nmov     [rsp+58h+var_38], r13d                                         ; +0x38, 0x180014578\ncall    __RTDynamicCast                                                ; +0x3d, 0x18001457d\nmov     r12, rax                                                       ; +0x42, 0x180014582\nmov     edi, r13d                                                      ; +0x45, 0x180014585\ntest    rbx, rbx                                                       ; +0x48, 0x180014588\njz      short loc_180014606                                            ; +0x4b, 0x18001458b\nmov     rdx, [rbx]                                                     ; +0x4d, 0x18001458d\nmov     rcx, rbx                                                       ; +0x50, 0x180014590\nmov     ebp, r13d                                                      ; +0x53, 0x180014593\ncall    qword ptr [rdx+10h]                                            ; +0x56, 0x180014596\nmov     esi, eax                                                       ; +0x59, 0x180014599\ntest    r15, r15                                                       ; +0x5b, 0x18001459b\njz      short loc_18001460B                                            ; +0x5e, 0x18001459e\nmov     rbx, [r15+38h]                                                 ; +0x60, 0x1800145a0\nmov     ecx, [rbx]                                                     ; +0x64, 0x1800145a4\ntest    ecx, ecx                                                       ; +0x66, 0x1800145a6\njz      short loc_18001460B                                            ; +0x68, 0x1800145a8\nmov     rbx, [rbx+10h]                                                 ; +0x6a, 0x1800145aa\nlea     r14, [rcx-1]                                                   ; +0x6e, 0x1800145ae\nlea     r14, [rbx+r14*8]                                               ; +0x72, 0x1800145b2\ncmp     rbx, r14                                                       ; +0x76, 0x1800145b6\nja      short loc_18001460B                                            ; +0x79, 0x1800145b9\nnop     dword ptr [rax+rax+00h]                                        ; +0x7b, 0x1800145bb\nmov     rcx, [rbx]                                                     ; +0x80, 0x1800145c0\ntest    rcx, rcx                                                       ; +0x83, 0x1800145c3\njz      short loc_18001460B                                            ; +0x86, 0x1800145c6\nlea     r9, ??_R0?AVCCSortableObject@extension@cocos2d@@@8; cocos2d::extension::CCSortableObject `RTTI Type Descriptor' ; +0x88, 0x1800145c8\nmov     [rsp+58h+var_38], r13d                                         ; +0x8f, 0x1800145cf\nlea     r8, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0x94, 0x1800145d4\nxor     edx, edx                                                       ; +0x9b, 0x1800145db\ncall    __RTDynamicCast                                                ; +0x9d, 0x1800145dd\nmov     rcx, rax                                                       ; +0xa2, 0x1800145e2\nmov     rdx, [rax]                                                     ; +0xa5, 0x1800145e5\ncall    qword ptr [rdx+10h]                                            ; +0xa8, 0x1800145e8\ncmp     esi, eax                                                       ; +0xab, 0x1800145eb\njz      short loc_18001460B                                            ; +0xad, 0x1800145ed\ncmp     esi, ebp                                                       ; +0xaf, 0x1800145ef\njb      short loc_1800145F7                                            ; +0xb1, 0x1800145f1\ncmp     esi, eax                                                       ; +0xb3, 0x1800145f3\njb      short loc_18001460B                                            ; +0xb5, 0x1800145f5\ninc     edi                                                            ; +0xb7, 0x1800145f7\nadd     rbx, 8                                                         ; +0xb9, 0x1800145f9\nmov     ebp, eax                                                       ; +0xbd, 0x1800145fd\ncmp     rbx, r14                                                       ; +0xbf, 0x1800145ff\njbe     short loc_1800145C0                                            ; +0xc2, 0x180014602\njmp     short loc_18001460B                                            ; +0xc4, 0x180014604\nmov     edi, 0FFFFFFFFh                                                ; +0xc6, 0x180014606\nmov     r8d, edi                                                       ; +0xcb, 0x18001460b\nmov     rdx, r12                                                       ; +0xce, 0x18001460e\nmov     rcx, r15                                                       ; +0xd1, 0x180014611\nmov     rbx, [rsp+58h+arg_0]                                           ; +0xd4, 0x180014614\nmov     rbp, [rsp+58h+arg_8]                                           ; +0xd9, 0x180014619\nmov     rsi, [rsp+58h+arg_10]                                          ; +0xde, 0x18001461e\nadd     rsp, 30h                                                       ; +0xe3, 0x180014623\npop     r15                                                            ; +0xe7, 0x180014627\npop     r14                                                            ; +0xe9, 0x180014629\npop     r13                                                            ; +0xeb, 0x18001462b\npop     r12                                                            ; +0xed, 0x18001462d\npop     rdi                                                            ; +0xef, 0x18001462f\njmp     cs:?insertObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@I@Z; cocos2d::CCArray::insertObject(cocos2d::CCObject *,uint) ; +0xf0, 0x180014630", "xrefs": ["cocos2d::extension::CCArrayForObjectSorting::setObjectID_ofSortedObject @ 0x1800148ea", "cocos2d::extension::CCTableView::_addCellIfNecessary @ 0x18001589c", "<???> @ 0x18002fdf8", "<???> @ 0x18004a62c", "<???> @ 0x18004a638"], "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"}