{"type": "func", "start": 6442471472, "end": 6442471575, "name": "cocos2d::CCNode::setUseChildIndex", "pseudocode": "// \n// cocos2d::CCNode::setUseChildIndex from 0x180005030 to 0x180005097 (103 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801ad630\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::setUseChildIndex(cocos2d::CCNode *this, bool a2)\n{\n  cocos2d::CCArray *m_pChildren; // rcx\n  int v4; // edx\n  cocos2d::ccArray *data; // rcx\n  __int64 num; // r8\n  cocos2d::CCObject **arr; // r9\n  __int64 i; // rcx\n  cocos2d::CCObject *v9; // rax\n\n  if ( this->m_bUseChildIndex != a2 )\n  {\n    this->m_bUseChildIndex = a2;\n    if ( a2 )\n    {\n      m_pChildren = this->m_pChildren;\n      if ( m_pChildren )\n      {\n        if ( cocos2d::CCArray::count(m_pChildren) )\n        {\n          v4 = 0;\n          data = this->m_pChildren->data;\n          num = (int)data->num;\n          arr = data->arr;\n          if ( num > 0 )\n          {\n            for ( i = 0; i < num; ++i )\n            {\n              v9 = arr[i];\n              v9->m_uUnknown = v4++;\n            }\n          }\n        }\n      }\n    }\n  }\n}", "assembly": "; \n; cocos2d::CCNode::setUseChildIndex from 0x180005030 to 0x180005097 (103 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801ad630\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    rbx                                                            ; +0x0, 0x180005030\nsub     rsp, 20h                                                       ; +0x2, 0x180005032\nmov     rbx, rcx                                                       ; +0x6, 0x180005036\ncmp     [rcx+138h], dl                                                 ; +0x9, 0x180005039\njz      short loc_180005091                                            ; +0xf, 0x18000503f\nmov     [rcx+138h], dl                                                 ; +0x11, 0x180005041\ntest    dl, dl                                                         ; +0x17, 0x180005047\njz      short loc_180005091                                            ; +0x19, 0x180005049\nmov     rcx, [rcx+0D0h]; this                                          ; +0x1b, 0x18000504b\ntest    rcx, rcx                                                       ; +0x22, 0x180005052\njz      short loc_180005091                                            ; +0x25, 0x180005055\ncall    ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x27, 0x180005057\ntest    eax, eax                                                       ; +0x2c, 0x18000505c\njz      short loc_180005091                                            ; +0x2e, 0x18000505e\nmov     rax, [rbx+0D0h]                                                ; +0x30, 0x180005060\nxor     edx, edx                                                       ; +0x37, 0x180005067\nmov     rcx, [rax+38h]                                                 ; +0x39, 0x180005069\nmovsxd  r8, dword ptr [rcx]                                            ; +0x3d, 0x18000506d\nmov     r9, [rcx+10h]                                                  ; +0x40, 0x180005070\ntest    r8, r8                                                         ; +0x44, 0x180005074\njle     short loc_180005091                                            ; +0x47, 0x180005077\nmov     ecx, edx                                                       ; +0x49, 0x180005079\nnop     dword ptr [rax+rax+00h]                                        ; +0x4b, 0x18000507b\nmov     rax, [r9+rcx*8]                                                ; +0x50, 0x180005080\ninc     rcx                                                            ; +0x54, 0x180005084\nmov     [rax+24h], edx                                                 ; +0x57, 0x180005087\ninc     edx                                                            ; +0x5a, 0x18000508a\ncmp     rcx, r8                                                        ; +0x5c, 0x18000508c\njl      short loc_180005080                                            ; +0x5f, 0x18000508f\nadd     rsp, 20h                                                       ; +0x61, 0x180005091\npop     rbx                                                            ; +0x65, 0x180005095\nretn                                                                   ; +0x66, 0x180005096", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801ad630"], "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"}