{"type": "func", "start": 6442471824, "end": 6442472077, "name": "cocos2d::CCNode::sortAllChildrenNoIndex", "pseudocode": "// \n// cocos2d::CCNode::sortAllChildrenNoIndex from 0x180005190 to 0x18000528d (253 bytes)\n// \n// 6 xrefs:\n// > cocos2d::CCNode::sortAllChildren @ 0x18000517d\n// > cocos2d::CCSpriteBatchNode::sortAllChildren @ 0x18008f0bc\n// > <???> @ 0x180130db8\n// > <???> @ 0x180130dc8\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801ad660\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::CCNode::sortAllChildrenNoIndex(cocos2d::CCNode *this)\n{\n  cocos2d::ccArray *data; // rcx\n  __int64 num; // r13\n  cocos2d::CCObject **arr; // r14\n  int v4; // r12d\n  __int64 i; // r15\n  cocos2d::CCObject *v6; // rbx\n  int v7; // esi\n  __int64 j; // rbp\n  int v9; // edi\n  int v10; // edi\n  unsigned int v11; // edi\n\n  data = this->m_pChildren->data;\n  num = (int)data->num;\n  arr = data->arr;\n  if ( num > 1 )\n  {\n    v4 = 0;\n    for ( i = 1; i < num; ++i )\n    {\n      v6 = arr[i];\n      v7 = v4;\n      for ( j = i - 1; v7 >= 0; --v7 )\n      {\n        v9 = ((__int64 (__fastcall *)(cocos2d::CCObject *))arr[j]->__vftable[1].acceptVisitor)(arr[j]);\n        if ( ((int (__fastcall *)(cocos2d::CCObject *))v6->__vftable[1].acceptVisitor)(v6) >= v9 )\n        {\n          v10 = ((__int64 (__fastcall *)(cocos2d::CCObject *))arr[j]->__vftable[1].acceptVisitor)(arr[j]);\n          if ( ((unsigned int (__fastcall *)(cocos2d::CCObject *))v6->__vftable[1].acceptVisitor)(v6) != v10 )\n            break;\n          v11 = ((__int64 (__fastcall *)(cocos2d::CCObject *))arr[j]->__vftable[5].update)(arr[j]);\n          if ( ((unsigned int (__fastcall *)(cocos2d::CCObject *))v6->__vftable[5].update)(v6) >= v11 )\n            break;\n        }\n        arr[j + 1] = arr[j];\n        --j;\n      }\n      ++v4;\n      arr[j + 1] = v6;\n    }\n  }\n}", "assembly": "; \n; cocos2d::CCNode::sortAllChildrenNoIndex from 0x180005190 to 0x18000528d (253 bytes)\n; \n; 6 xrefs:\n; > cocos2d::CCNode::sortAllChildren @ 0x18000517d\n; > cocos2d::CCSpriteBatchNode::sortAllChildren @ 0x18008f0bc\n; > <???> @ 0x180130db8\n; > <???> @ 0x180130dc8\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801ad660\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    r13                                                            ; +0x0, 0x180005190\npush    r14                                                            ; +0x2, 0x180005192\nsub     rsp, 38h                                                       ; +0x4, 0x180005194\nmov     rax, [rcx+0D0h]                                                ; +0x8, 0x180005198\nmov     rcx, [rax+38h]                                                 ; +0xf, 0x18000519f\nmovsxd  r13, dword ptr [rcx]                                           ; +0x13, 0x1800051a3\nmov     r14, [rcx+10h]                                                 ; +0x16, 0x1800051a6\ncmp     r13, 1                                                         ; +0x1a, 0x1800051aa\njle     loc_180005284                                                  ; +0x1e, 0x1800051ae\nmov     [rsp+48h+arg_0], rbx                                           ; +0x24, 0x1800051b4\nmov     [rsp+48h+arg_8], rbp                                           ; +0x29, 0x1800051b9\nmov     [rsp+48h+arg_10], rsi                                          ; +0x2e, 0x1800051be\nmov     [rsp+48h+var_18], rdi                                          ; +0x33, 0x1800051c3\nmov     [rsp+48h+var_20], r12                                          ; +0x38, 0x1800051c8\nxor     r12d, r12d                                                     ; +0x3d, 0x1800051cd\nmov     [rsp+48h+var_28], r15                                          ; +0x40, 0x1800051d0\nmov     r15d, 1                                                        ; +0x45, 0x1800051d5\nnop     dword ptr [rax+rax+00h]                                        ; +0x4b, 0x1800051db\nmov     rbx, [r14+r15*8]                                               ; +0x50, 0x1800051e0\nmov     esi, r12d                                                      ; +0x54, 0x1800051e4\nlea     rbp, [r15-1]                                                   ; +0x57, 0x1800051e7\ntest    r12d, r12d                                                     ; +0x5b, 0x1800051eb\njs      short loc_180005252                                            ; +0x5e, 0x1800051ee\nmov     rcx, [r14+rbp*8]                                               ; +0x60, 0x1800051f0\nmov     rax, [rcx]                                                     ; +0x64, 0x1800051f4\ncall    qword ptr [rax+60h]                                            ; +0x67, 0x1800051f7\nmov     rdx, [rbx]                                                     ; +0x6a, 0x1800051fa\nmov     rcx, rbx                                                       ; +0x6d, 0x1800051fd\nmov     edi, eax                                                       ; +0x70, 0x180005200\ncall    qword ptr [rdx+60h]                                            ; +0x72, 0x180005202\ncmp     eax, edi                                                       ; +0x75, 0x180005205\njl      short loc_180005241                                            ; +0x77, 0x180005207\nmov     rcx, [r14+rbp*8]                                               ; +0x79, 0x180005209\nmov     rax, [rcx]                                                     ; +0x7d, 0x18000520d\ncall    qword ptr [rax+60h]                                            ; +0x80, 0x180005210\nmov     rdx, [rbx]                                                     ; +0x83, 0x180005213\nmov     rcx, rbx                                                       ; +0x86, 0x180005216\nmov     edi, eax                                                       ; +0x89, 0x180005219\ncall    qword ptr [rdx+60h]                                            ; +0x8b, 0x18000521b\ncmp     eax, edi                                                       ; +0x8e, 0x18000521e\njnz     short loc_180005252                                            ; +0x90, 0x180005220\nmov     rcx, [r14+rbp*8]                                               ; +0x92, 0x180005222\nmov     rax, [rcx]                                                     ; +0x96, 0x180005226\ncall    qword ptr [rax+188h]                                           ; +0x99, 0x180005229\nmov     rdx, [rbx]                                                     ; +0x9f, 0x18000522f\nmov     rcx, rbx                                                       ; +0xa2, 0x180005232\nmov     edi, eax                                                       ; +0xa5, 0x180005235\ncall    qword ptr [rdx+188h]                                           ; +0xa7, 0x180005237\ncmp     eax, edi                                                       ; +0xad, 0x18000523d\njnb     short loc_180005252                                            ; +0xaf, 0x18000523f\nmov     rax, [r14+rbp*8]                                               ; +0xb1, 0x180005241\nmov     [r14+rbp*8+8], rax                                             ; +0xb5, 0x180005245\ndec     rbp                                                            ; +0xba, 0x18000524a\nsub     esi, 1                                                         ; +0xbd, 0x18000524d\njns     short loc_1800051F0                                            ; +0xc0, 0x180005250\ninc     r12d                                                           ; +0xc2, 0x180005252\nmov     [r14+rbp*8+8], rbx                                             ; +0xc5, 0x180005255\ninc     r15                                                            ; +0xca, 0x18000525a\ncmp     r15, r13                                                       ; +0xcd, 0x18000525d\njl      loc_1800051E0                                                  ; +0xd0, 0x180005260\nmov     r15, [rsp+48h+var_28]                                          ; +0xd6, 0x180005266\nmov     r12, [rsp+48h+var_20]                                          ; +0xdb, 0x18000526b\nmov     rdi, [rsp+48h+var_18]                                          ; +0xe0, 0x180005270\nmov     rsi, [rsp+48h+arg_10]                                          ; +0xe5, 0x180005275\nmov     rbp, [rsp+48h+arg_8]                                           ; +0xea, 0x18000527a\nmov     rbx, [rsp+48h+arg_0]                                           ; +0xef, 0x18000527f\nadd     rsp, 38h                                                       ; +0xf4, 0x180005284\npop     r14                                                            ; +0xf8, 0x180005288\npop     r13                                                            ; +0xfa, 0x18000528a\nretn                                                                   ; +0xfc, 0x18000528c", "xrefs": ["cocos2d::CCNode::sortAllChildren @ 0x18000517d", "cocos2d::CCSpriteBatchNode::sortAllChildren @ 0x18008f0bc", "<???> @ 0x180130db8", "<???> @ 0x180130dc8", "<???> @ 0x1801438a8", "<???> @ 0x1801ad660"], "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"}