{"type": "func", "start": 6442533088, "end": 6442533338, "name": "cocos2d::extension::CCArrayForObjectSorting::insertSortedObject", "pseudocode": "// \n// cocos2d::extension::CCArrayForObjectSorting::insertSortedObject from 0x1800140e0 to 0x1800141da (250 bytes)\n// \n// 5 xrefs:\n// > cocos2d::extension::CCArrayForObjectSorting::setObjectID_ofSortedObject @ 0x1800144a5\n// > cocos2d::extension::CCTableView::_addCellIfNecessary @ 0x18001542c\n// > <???> @ 0x180032408\n// > <???> @ 0x18004c560\n// > <???> @ 0x18004c56c\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::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; // rax\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 0x1800140e0 to 0x1800141da (250 bytes)\n; \n; 5 xrefs:\n; > cocos2d::extension::CCArrayForObjectSorting::setObjectID_ofSortedObject @ 0x1800144a5\n; > cocos2d::extension::CCTableView::_addCellIfNecessary @ 0x18001542c\n; > <???> @ 0x180032408\n; > <???> @ 0x18004c560\n; > <???> @ 0x18004c56c\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; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1800140e0\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x1800140e5\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x1800140ea\npush    rdi                                                            ; +0xf, 0x1800140ef\npush    r12                                                            ; +0x10, 0x1800140f0\npush    r13                                                            ; +0x12, 0x1800140f2\npush    r14                                                            ; +0x14, 0x1800140f4\npush    r15                                                            ; +0x16, 0x1800140f6\nsub     rsp, 30h                                                       ; +0x18, 0x1800140f8\nmov     rbx, rdx                                                       ; +0x1c, 0x1800140fc\nlea     r9, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0x1f, 0x1800140ff\nmov     r15, rcx                                                       ; +0x26, 0x180014106\nlea     r8, ??_R0?AVCCSortableObject@extension@cocos2d@@@8; cocos2d::extension::CCSortableObject `RTTI Type Descriptor' ; +0x29, 0x180014109\nxor     r13d, r13d                                                     ; +0x30, 0x180014110\nmov     rcx, rbx                                                       ; +0x33, 0x180014113\nxor     edx, edx                                                       ; +0x36, 0x180014116\nmov     [rsp+58h+var_38], r13d                                         ; +0x38, 0x180014118\ncall    __RTDynamicCast                                                ; +0x3d, 0x18001411d\nmov     r12, rax                                                       ; +0x42, 0x180014122\nmov     edi, r13d                                                      ; +0x45, 0x180014125\ntest    rbx, rbx                                                       ; +0x48, 0x180014128\njz      short loc_1800141A9                                            ; +0x4b, 0x18001412b\nmov     rcx, [rbx]                                                     ; +0x4d, 0x18001412d\nmov     ebp, r13d                                                      ; +0x50, 0x180014130\nmov     rdx, [rcx+10h]                                                 ; +0x53, 0x180014133\nmov     rcx, rbx                                                       ; +0x57, 0x180014137\ncall    rdx                                                            ; +0x5a, 0x18001413a\nmov     esi, eax                                                       ; +0x5c, 0x18001413c\ntest    r15, r15                                                       ; +0x5e, 0x18001413e\njz      short loc_1800141AE                                            ; +0x61, 0x180014141\nmov     rbx, [r15+38h]                                                 ; +0x63, 0x180014143\nmov     eax, [rbx]                                                     ; +0x67, 0x180014147\ntest    eax, eax                                                       ; +0x69, 0x180014149\njz      short loc_1800141AE                                            ; +0x6b, 0x18001414b\nmov     rbx, [rbx+10h]                                                 ; +0x6d, 0x18001414d\nlea     r14, [rax-1]                                                   ; +0x71, 0x180014151\nlea     r14, [rbx+r14*8]                                               ; +0x75, 0x180014155\ncmp     rbx, r14                                                       ; +0x79, 0x180014159\nja      short loc_1800141AE                                            ; +0x7c, 0x18001415c\nxchg    ax, ax                                                         ; +0x7e, 0x18001415e\nmov     rcx, [rbx]                                                     ; +0x80, 0x180014160\ntest    rcx, rcx                                                       ; +0x83, 0x180014163\njz      short loc_1800141AE                                            ; +0x86, 0x180014166\nlea     r9, ??_R0?AVCCSortableObject@extension@cocos2d@@@8; cocos2d::extension::CCSortableObject `RTTI Type Descriptor' ; +0x88, 0x180014168\nmov     [rsp+58h+var_38], r13d                                         ; +0x8f, 0x18001416f\nlea     r8, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0x94, 0x180014174\nxor     edx, edx                                                       ; +0x9b, 0x18001417b\ncall    __RTDynamicCast                                                ; +0x9d, 0x18001417d\nmov     rcx, [rax]                                                     ; +0xa2, 0x180014182\nmov     rdx, [rcx+10h]                                                 ; +0xa5, 0x180014185\nmov     rcx, rax                                                       ; +0xa9, 0x180014189\ncall    rdx                                                            ; +0xac, 0x18001418c\ncmp     esi, eax                                                       ; +0xae, 0x18001418e\njz      short loc_1800141AE                                            ; +0xb0, 0x180014190\ncmp     esi, ebp                                                       ; +0xb2, 0x180014192\njb      short loc_18001419A                                            ; +0xb4, 0x180014194\ncmp     esi, eax                                                       ; +0xb6, 0x180014196\njb      short loc_1800141AE                                            ; +0xb8, 0x180014198\ninc     edi                                                            ; +0xba, 0x18001419a\nadd     rbx, 8                                                         ; +0xbc, 0x18001419c\nmov     ebp, eax                                                       ; +0xc0, 0x1800141a0\ncmp     rbx, r14                                                       ; +0xc2, 0x1800141a2\njbe     short loc_180014160                                            ; +0xc5, 0x1800141a5\njmp     short loc_1800141AE                                            ; +0xc7, 0x1800141a7\nmov     edi, 0FFFFFFFFh                                                ; +0xc9, 0x1800141a9\nmov     r8d, edi                                                       ; +0xce, 0x1800141ae\nmov     rdx, r12                                                       ; +0xd1, 0x1800141b1\nmov     rcx, r15                                                       ; +0xd4, 0x1800141b4\nmov     rbx, [rsp+58h+arg_0]                                           ; +0xd7, 0x1800141b7\nmov     rbp, [rsp+58h+arg_8]                                           ; +0xdc, 0x1800141bc\nmov     rsi, [rsp+58h+arg_10]                                          ; +0xe1, 0x1800141c1\nadd     rsp, 30h                                                       ; +0xe6, 0x1800141c6\npop     r15                                                            ; +0xea, 0x1800141ca\npop     r14                                                            ; +0xec, 0x1800141cc\npop     r13                                                            ; +0xee, 0x1800141ce\npop     r12                                                            ; +0xf0, 0x1800141d0\npop     rdi                                                            ; +0xf2, 0x1800141d2\njmp     cs:?insertObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@I@Z; cocos2d::CCArray::insertObject(cocos2d::CCObject *,uint) ; +0xf3, 0x1800141d3", "xrefs": ["cocos2d::extension::CCArrayForObjectSorting::setObjectID_ofSortedObject @ 0x1800144a5", "cocos2d::extension::CCTableView::_addCellIfNecessary @ 0x18001542c", "<???> @ 0x180032408", "<???> @ 0x18004c560", "<???> @ 0x18004c56c"], "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"}