{"type": "func", "start": 6442533696, "end": 6442534096, "name": "cocos2d::extension::CCArrayForObjectSorting::setObjectID_ofSortedObject", "pseudocode": "// \n// cocos2d::extension::CCArrayForObjectSorting::setObjectID_ofSortedObject from 0x180014340 to 0x1800144d0 (400 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x180032408\n// > <???> @ 0x18004c5b4\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::setObjectID_ofSortedObject(\n        cocos2d::extension::CCArrayForObjectSorting *this,\n        unsigned int a2,\n        struct cocos2d::extension::CCSortableObject *a3)\n{\n  unsigned int v3; // esi\n  unsigned int v7; // ebp\n  unsigned int v8; // edi\n  unsigned int *v9; // rbx\n  __int64 v10; // rax\n  _QWORD *v11; // rbx\n  _QWORD *i; // r14\n  __int64 v13; // rax\n  unsigned int v14; // eax\n  struct cocos2d::CCObject *v15; // rax\n  struct cocos2d::extension::CCSortableObject *v16; // r14\n  cocos2d::CCObject *v17; // rbp\n  unsigned int (__fastcall *v18)(struct cocos2d::extension::CCSortableObject *); // rdi\n  int v19; // ebx\n\n  v3 = 0;\n  if ( a3 )\n  {\n    v7 = 0;\n    v8 = (*(__int64 (__fastcall **)(struct cocos2d::extension::CCSortableObject *))(*(_QWORD *)a3 + 16LL))(a3);\n    if ( this )\n    {\n      v9 = *((unsigned int **)this + 7);\n      v10 = *v9;\n      if ( (_DWORD)v10 )\n      {\n        v11 = *((_QWORD **)v9 + 2);\n        for ( i = &v11[v10 - 1]; v11 <= i; v7 = v14 )\n        {\n          if ( !*v11 )\n            break;\n          v13 = _RTDynamicCast(\n                  *v11,\n                  0,\n                  &cocos2d::CCObject `RTTI Type Descriptor',\n                  &cocos2d::extension::CCSortableObject `RTTI Type Descriptor',\n                  0);\n          v14 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v13 + 16LL))(v13);\n          if ( v8 == v14 || v8 >= v7 && v8 < v14 )\n            break;\n          ++v3;\n          ++v11;\n        }\n      }\n    }\n  }\n  else\n  {\n    v3 = -1;\n  }\n  if ( v3 < cocos2d::CCArray::count(this) && v3 != -1 )\n  {\n    v15 = cocos2d::CCArray::objectAtIndex(this, v3);\n    v16 = (struct cocos2d::extension::CCSortableObject *)_RTDynamicCast(\n                                                           v15,\n                                                           0,\n                                                           &cocos2d::CCObject `RTTI Type Descriptor',\n                                                           &cocos2d::extension::CCSortableObject `RTTI Type Descriptor',\n                                                           0);\n    v17 = (cocos2d::CCObject *)_RTDynamicCast(\n                                 v16,\n                                 0,\n                                 &cocos2d::extension::CCSortableObject `RTTI Type Descriptor',\n                                 &cocos2d::CCObject `RTTI Type Descriptor',\n                                 0);\n    cocos2d::CCObject::retain(v17);\n    v18 = *(unsigned int (__fastcall **)(struct cocos2d::extension::CCSortableObject *))(*(_QWORD *)v16 + 16LL);\n    v19 = (*(__int64 (__fastcall **)(struct cocos2d::extension::CCSortableObject *))(*(_QWORD *)a3 + 16LL))(a3);\n    if ( v18(v16) == v19 )\n    {\n      cocos2d::CCArray::removeObjectAtIndex(this, v3, 1);\n      (*(void (__fastcall **)(struct cocos2d::extension::CCSortableObject *, _QWORD))(*(_QWORD *)v16 + 8LL))(v16, a2);\n      cocos2d::extension::CCArrayForObjectSorting::insertSortedObject(this, v16);\n    }\n    cocos2d::CCObject::release(v17);\n  }\n}", "assembly": "; \n; cocos2d::extension::CCArrayForObjectSorting::setObjectID_ofSortedObject from 0x180014340 to 0x1800144d0 (400 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x180032408\n; > <???> @ 0x18004c5b4\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, 0x180014340\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x180014345\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x18001434a\npush    rdi                                                            ; +0xf, 0x18001434f\npush    r12                                                            ; +0x10, 0x180014350\npush    r13                                                            ; +0x12, 0x180014352\npush    r14                                                            ; +0x14, 0x180014354\npush    r15                                                            ; +0x16, 0x180014356\nsub     rsp, 30h                                                       ; +0x18, 0x180014358\nxor     esi, esi                                                       ; +0x1c, 0x18001435c\nmov     r12, r8                                                        ; +0x1e, 0x18001435e\nmov     r13d, edx                                                      ; +0x21, 0x180014361\nmov     r15, rcx                                                       ; +0x24, 0x180014364\ntest    r8, r8                                                         ; +0x27, 0x180014367\njz      loc_1800143EC                                                  ; +0x2a, 0x18001436a\nmov     rax, [r8]                                                      ; +0x30, 0x180014370\nmov     rcx, r8                                                        ; +0x33, 0x180014373\nxor     ebp, ebp                                                       ; +0x36, 0x180014376\ncall    qword ptr [rax+10h]                                            ; +0x38, 0x180014378\nmov     edi, eax                                                       ; +0x3b, 0x18001437b\ntest    r15, r15                                                       ; +0x3d, 0x18001437d\njz      short loc_1800143F1                                            ; +0x40, 0x180014380\nmov     rbx, [r15+38h]                                                 ; +0x42, 0x180014382\nmov     eax, [rbx]                                                     ; +0x46, 0x180014386\ntest    eax, eax                                                       ; +0x48, 0x180014388\njz      short loc_1800143F1                                            ; +0x4a, 0x18001438a\nmov     rbx, [rbx+10h]                                                 ; +0x4c, 0x18001438c\nlea     r14, [rax-1]                                                   ; +0x50, 0x180014390\nlea     r14, [rbx+r14*8]                                               ; +0x54, 0x180014394\ncmp     rbx, r14                                                       ; +0x58, 0x180014398\nja      short loc_1800143F1                                            ; +0x5b, 0x18001439b\nnop     dword ptr [rax]                                                ; +0x5d, 0x18001439d\nmov     rcx, [rbx]                                                     ; +0x60, 0x1800143a0\ntest    rcx, rcx                                                       ; +0x63, 0x1800143a3\njz      short loc_1800143F1                                            ; +0x66, 0x1800143a6\nlea     r9, ??_R0?AVCCSortableObject@extension@cocos2d@@@8; cocos2d::extension::CCSortableObject `RTTI Type Descriptor' ; +0x68, 0x1800143a8\nmov     [rsp+58h+var_38], 0                                            ; +0x6f, 0x1800143af\nlea     r8, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0x77, 0x1800143b7\nxor     edx, edx                                                       ; +0x7e, 0x1800143be\ncall    __RTDynamicCast                                                ; +0x80, 0x1800143c0\nmov     rcx, [rax]                                                     ; +0x85, 0x1800143c5\nmov     rdx, [rcx+10h]                                                 ; +0x88, 0x1800143c8\nmov     rcx, rax                                                       ; +0x8c, 0x1800143cc\ncall    rdx                                                            ; +0x8f, 0x1800143cf\ncmp     edi, eax                                                       ; +0x91, 0x1800143d1\njz      short loc_1800143F1                                            ; +0x93, 0x1800143d3\ncmp     edi, ebp                                                       ; +0x95, 0x1800143d5\njb      short loc_1800143DD                                            ; +0x97, 0x1800143d7\ncmp     edi, eax                                                       ; +0x99, 0x1800143d9\njb      short loc_1800143F1                                            ; +0x9b, 0x1800143db\ninc     esi                                                            ; +0x9d, 0x1800143dd\nadd     rbx, 8                                                         ; +0x9f, 0x1800143df\nmov     ebp, eax                                                       ; +0xa3, 0x1800143e3\ncmp     rbx, r14                                                       ; +0xa5, 0x1800143e5\njbe     short loc_1800143A0                                            ; +0xa8, 0x1800143e8\njmp     short loc_1800143F1                                            ; +0xaa, 0x1800143ea\nmov     esi, 0FFFFFFFFh                                                ; +0xac, 0x1800143ec\nmov     rcx, r15                                                       ; +0xb1, 0x1800143f1\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xb4, 0x1800143f4\ncmp     esi, eax                                                       ; +0xba, 0x1800143fa\njnb     loc_1800144B3                                                  ; +0xbc, 0x1800143fc\ncmp     esi, 0FFFFFFFFh                                                ; +0xc2, 0x180014402\njz      loc_1800144B3                                                  ; +0xc5, 0x180014405\nmov     edx, esi                                                       ; +0xcb, 0x18001440b\nmov     rcx, r15                                                       ; +0xcd, 0x18001440d\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xd0, 0x180014410\nlea     r9, ??_R0?AVCCSortableObject@extension@cocos2d@@@8; cocos2d::extension::CCSortableObject `RTTI Type Descriptor' ; +0xd6, 0x180014416\nmov     [rsp+58h+var_38], 0                                            ; +0xdd, 0x18001441d\nmov     rcx, rax                                                       ; +0xe5, 0x180014425\nlea     r8, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0xe8, 0x180014428\nxor     edx, edx                                                       ; +0xef, 0x18001442f\ncall    __RTDynamicCast                                                ; +0xf1, 0x180014431\nlea     r9, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0xf6, 0x180014436\nmov     [rsp+58h+var_38], 0                                            ; +0xfd, 0x18001443d\nlea     r8, ??_R0?AVCCSortableObject@extension@cocos2d@@@8; cocos2d::extension::CCSortableObject `RTTI Type Descriptor' ; +0x105, 0x180014445\nxor     edx, edx                                                       ; +0x10c, 0x18001444c\nmov     rcx, rax                                                       ; +0x10e, 0x18001444e\nmov     r14, rax                                                       ; +0x111, 0x180014451\ncall    __RTDynamicCast                                                ; +0x114, 0x180014454\nmov     rcx, rax                                                       ; +0x119, 0x180014459\nmov     rbp, rax                                                       ; +0x11c, 0x18001445c\ncall    cs:?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x11f, 0x18001445f\nmov     rcx, [r14]                                                     ; +0x125, 0x180014465\nmov     rdi, [rcx+10h]                                                 ; +0x128, 0x180014468\nmov     rcx, [r12]                                                     ; +0x12c, 0x18001446c\nmov     r8, [rcx+10h]                                                  ; +0x130, 0x180014470\nmov     rcx, r12                                                       ; +0x134, 0x180014474\ncall    r8                                                             ; +0x137, 0x180014477\nmov     rcx, r14                                                       ; +0x13a, 0x18001447a\nmov     ebx, eax                                                       ; +0x13d, 0x18001447d\ncall    rdi                                                            ; +0x13f, 0x18001447f\ncmp     eax, ebx                                                       ; +0x141, 0x180014481\njnz     short loc_1800144AA                                            ; +0x143, 0x180014483\nmov     r8b, 1                                                         ; +0x145, 0x180014485\nmov     edx, esi                                                       ; +0x148, 0x180014488\nmov     rcx, r15                                                       ; +0x14a, 0x18001448a\ncall    cs:?removeObjectAtIndex@CCArray@cocos2d@@QEAAXI_N@Z; cocos2d::CCArray::removeObjectAtIndex(uint,bool) ; +0x14d, 0x18001448d\nmov     rax, [r14]                                                     ; +0x153, 0x180014493\nmov     edx, r13d                                                      ; +0x156, 0x180014496\nmov     rcx, r14                                                       ; +0x159, 0x180014499\ncall    qword ptr [rax+8]                                              ; +0x15c, 0x18001449c\nmov     rdx, r14; struct cocos2d::extension::CCSortableObject *        ; +0x15f, 0x18001449f\nmov     rcx, r15; this                                                 ; +0x162, 0x1800144a2\ncall    ?insertSortedObject@CCArrayForObjectSorting@extension@cocos2d@@QEAAXPEAVCCSortableObject@23@@Z; cocos2d::extension::CCArrayForObjectSorting::insertSortedObject(cocos2d::extension::CCSortableObject *) ; +0x165, 0x1800144a5\nmov     rcx, rbp                                                       ; +0x16a, 0x1800144aa\ncall    cs:?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x16d, 0x1800144ad\nmov     rbx, [rsp+58h+arg_0]                                           ; +0x173, 0x1800144b3\nmov     rbp, [rsp+58h+arg_8]                                           ; +0x178, 0x1800144b8\nmov     rsi, [rsp+58h+arg_10]                                          ; +0x17d, 0x1800144bd\nadd     rsp, 30h                                                       ; +0x182, 0x1800144c2\npop     r15                                                            ; +0x186, 0x1800144c6\npop     r14                                                            ; +0x188, 0x1800144c8\npop     r13                                                            ; +0x18a, 0x1800144ca\npop     r12                                                            ; +0x18c, 0x1800144cc\npop     rdi                                                            ; +0x18e, 0x1800144ce\nretn                                                                   ; +0x18f, 0x1800144cf", "xrefs": ["<???> @ 0x180032408", "<???> @ 0x18004c5b4"], "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"}