{"type": "func", "start": 6443049664, "end": 6443049932, "name": "cocos2d::CCSpriteBatchNode::sortAllChildren", "pseudocode": "// \n// cocos2d::CCSpriteBatchNode::sortAllChildren from 0x1800922c0 to 0x1800923cc (268 bytes)\n// \n// 7 xrefs:\n// > <???> @ 0x1800f25e0\n// > <???> @ 0x18010a598\n// > <???> @ 0x18010c328\n// > <???> @ 0x180146b78\n// > <???> @ 0x180146b88\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c03cc\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 11:22:08 +0000\n// \n\nvoid __fastcall cocos2d::CCSpriteBatchNode::sortAllChildren(cocos2d::CCArray **this)\n{\n  __int64 v2; // rax\n  unsigned int *v3; // rdi\n  __int64 v4; // rax\n  _QWORD *v5; // rdi\n  _QWORD *i; // rsi\n  __int64 v7; // rax\n  unsigned int *v8; // rdi\n  __int64 v9; // rax\n  struct cocos2d::CCSprite **v10; // rdi\n  struct cocos2d::CCSprite **j; // rsi\n  int v12; // [rsp+30h] [rbp+8h] BYREF\n\n  if ( *((_BYTE *)this + 288) && (!*((_BYTE *)this + 352) || *((_BYTE *)this + 353)) )\n  {\n    if ( *((_BYTE *)this + 312) )\n      cocos2d::CCNode::sortAllChildrenWithIndex((cocos2d::CCNode *)this);\n    else\n      cocos2d::CCNode::sortAllChildrenNoIndex((cocos2d::CCNode *)this);\n    if ( (unsigned int)cocos2d::CCArray::count(*(this + 26)) )\n    {\n      v2 = (__int64)*(this + 26);\n      if ( v2 )\n      {\n        v3 = *(unsigned int **)(v2 + 56);\n        v4 = *v3;\n        if ( (_DWORD)v4 )\n        {\n          v5 = *((_QWORD **)v3 + 2);\n          for ( i = &v5[v4 - 1]; v5 <= i; ++v5 )\n          {\n            if ( !*v5 )\n              break;\n            (*(void (__fastcall **)(_QWORD))(*(_QWORD *)*v5 + 592LL))(*v5);\n          }\n        }\n      }\n      v7 = (__int64)*(this + 26);\n      v12 = 0;\n      if ( v7 )\n      {\n        v8 = *(unsigned int **)(v7 + 56);\n        v9 = *v8;\n        if ( (_DWORD)v9 )\n        {\n          v10 = *((struct cocos2d::CCSprite ***)v8 + 2);\n          for ( j = &v10[v9 - 1]; v10 <= j; ++v10 )\n          {\n            if ( !*v10 )\n              break;\n            cocos2d::CCSpriteBatchNode::updateAtlasIndex((cocos2d::CCSpriteBatchNode *)this, *v10, &v12);\n          }\n        }\n      }\n    }\n    *((_BYTE *)this + 288) = 0;\n    *((_BYTE *)this + 353) = 0;\n  }\n}", "assembly": "; \n; cocos2d::CCSpriteBatchNode::sortAllChildren from 0x1800922c0 to 0x1800923cc (268 bytes)\n; \n; 7 xrefs:\n; > <???> @ 0x1800f25e0\n; > <???> @ 0x18010a598\n; > <???> @ 0x18010c328\n; > <???> @ 0x180146b78\n; > <???> @ 0x180146b88\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c03cc\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 11:22:08 +0000\n; \npush    rbx                                                            ; +0x0, 0x1800922c0\nsub     rsp, 20h                                                       ; +0x2, 0x1800922c2\ncmp     byte ptr [rcx+120h], 0                                         ; +0x6, 0x1800922c6\nmov     rbx, rcx                                                       ; +0xd, 0x1800922cd\njz      loc_1800923C6                                                  ; +0x10, 0x1800922d0\ncmp     byte ptr [rcx+160h], 0                                         ; +0x16, 0x1800922d6\njz      short loc_1800922EC                                            ; +0x1d, 0x1800922dd\ncmp     byte ptr [rcx+161h], 0                                         ; +0x1f, 0x1800922df\njz      loc_1800923C6                                                  ; +0x26, 0x1800922e6\ncmp     byte ptr [rcx+138h], 0                                         ; +0x2c, 0x1800922ec\njz      short loc_1800922FC                                            ; +0x33, 0x1800922f3\ncall    ?sortAllChildrenWithIndex@CCNode@cocos2d@@QEAAXXZ; cocos2d::CCNode::sortAllChildrenWithIndex(void) ; +0x35, 0x1800922f5\njmp     short loc_180092301                                            ; +0x3a, 0x1800922fa\ncall    ?sortAllChildrenNoIndex@CCNode@cocos2d@@QEAAXXZ; cocos2d::CCNode::sortAllChildrenNoIndex(void) ; +0x3c, 0x1800922fc\nmov     rcx, [rbx+0D0h]; this                                          ; +0x41, 0x180092301\ncall    ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x48, 0x180092308\ntest    eax, eax                                                       ; +0x4d, 0x18009230d\njz      loc_1800923B8                                                  ; +0x4f, 0x18009230f\nmov     rax, [rbx+0D0h]                                                ; +0x55, 0x180092315\nmov     [rsp+28h+arg_8], rsi                                           ; +0x5c, 0x18009231c\nmov     [rsp+28h+arg_10], rdi                                          ; +0x61, 0x180092321\ntest    rax, rax                                                       ; +0x66, 0x180092326\njz      short loc_180092360                                            ; +0x69, 0x180092329\nmov     rdi, [rax+38h]                                                 ; +0x6b, 0x18009232b\nmov     eax, [rdi]                                                     ; +0x6f, 0x18009232f\ntest    eax, eax                                                       ; +0x71, 0x180092331\njz      short loc_180092360                                            ; +0x73, 0x180092333\nmov     rdi, [rdi+10h]                                                 ; +0x75, 0x180092335\nlea     rsi, [rax-1]                                                   ; +0x79, 0x180092339\nlea     rsi, [rdi+rsi*8]                                               ; +0x7d, 0x18009233d\ncmp     rdi, rsi                                                       ; +0x81, 0x180092341\nja      short loc_180092360                                            ; +0x84, 0x180092344\nmov     rcx, [rdi]                                                     ; +0x86, 0x180092346\ntest    rcx, rcx                                                       ; +0x89, 0x180092349\njz      short loc_180092360                                            ; +0x8c, 0x18009234c\nmov     rax, [rcx]                                                     ; +0x8e, 0x18009234e\ncall    qword ptr [rax+250h]                                           ; +0x91, 0x180092351\nadd     rdi, 8                                                         ; +0x97, 0x180092357\ncmp     rdi, rsi                                                       ; +0x9b, 0x18009235b\njbe     short loc_180092346                                            ; +0x9e, 0x18009235e\nmov     rax, [rbx+0D0h]                                                ; +0xa0, 0x180092360\nmov     [rsp+28h+arg_0], 0                                             ; +0xa7, 0x180092367\ntest    rax, rax                                                       ; +0xaf, 0x18009236f\njz      short loc_1800923AE                                            ; +0xb2, 0x180092372\nmov     rdi, [rax+38h]                                                 ; +0xb4, 0x180092374\nmov     eax, [rdi]                                                     ; +0xb8, 0x180092378\ntest    eax, eax                                                       ; +0xba, 0x18009237a\njz      short loc_1800923AE                                            ; +0xbc, 0x18009237c\nmov     rdi, [rdi+10h]                                                 ; +0xbe, 0x18009237e\nlea     rsi, [rax-1]                                                   ; +0xc2, 0x180092382\nlea     rsi, [rdi+rsi*8]                                               ; +0xc6, 0x180092386\ncmp     rdi, rsi                                                       ; +0xca, 0x18009238a\nja      short loc_1800923AE                                            ; +0xcd, 0x18009238d\nnop                                                                    ; +0xcf, 0x18009238f\nmov     rdx, [rdi]; struct cocos2d::CCSprite *                         ; +0xd0, 0x180092390\ntest    rdx, rdx                                                       ; +0xd3, 0x180092393\njz      short loc_1800923AE                                            ; +0xd6, 0x180092396\nlea     r8, [rsp+28h+arg_0]; int *                                     ; +0xd8, 0x180092398\nmov     rcx, rbx; this                                                 ; +0xdd, 0x18009239d\ncall    ?updateAtlasIndex@CCSpriteBatchNode@cocos2d@@AEAAXPEAVCCSprite@2@PEAH@Z; cocos2d::CCSpriteBatchNode::updateAtlasIndex(cocos2d::CCSprite *,int *) ; +0xe0, 0x1800923a0\nadd     rdi, 8                                                         ; +0xe5, 0x1800923a5\ncmp     rdi, rsi                                                       ; +0xe9, 0x1800923a9\njbe     short loc_180092390                                            ; +0xec, 0x1800923ac\nmov     rsi, [rsp+28h+arg_8]                                           ; +0xee, 0x1800923ae\nmov     rdi, [rsp+28h+arg_10]                                          ; +0xf3, 0x1800923b3\nmov     byte ptr [rbx+120h], 0                                         ; +0xf8, 0x1800923b8\nmov     byte ptr [rbx+161h], 0                                         ; +0xff, 0x1800923bf\nadd     rsp, 20h                                                       ; +0x106, 0x1800923c6\npop     rbx                                                            ; +0x10a, 0x1800923ca\nretn                                                                   ; +0x10b, 0x1800923cb", "xrefs": ["<???> @ 0x1800f25e0", "<???> @ 0x18010a598", "<???> @ 0x18010c328", "<???> @ 0x180146b78", "<???> @ 0x180146b88", "<???> @ 0x18014cf68", "<???> @ 0x1801c03cc"], "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"}