{"type": "func", "start": 6443035984, "end": 6443036154, "name": "cocos2d::CCSpriteBatchNode::removeAllChildrenWithCleanup", "pseudocode": "// \n// cocos2d::CCSpriteBatchNode::removeAllChildrenWithCleanup from 0x18008ed50 to 0x18008edfa (170 bytes)\n// \n// 7 xrefs:\n// > <???> @ 0x1800ec4b0\n// > <???> @ 0x180103eb0\n// > <???> @ 0x180105c18\n// > <???> @ 0x18013d89c\n// > <???> @ 0x18013d8d0\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b6090\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::CCSpriteBatchNode::removeAllChildrenWithCleanup(cocos2d::CCSpriteBatchNode *this, char a2)\n{\n  cocos2d::CCArray *m_pobDescendants; // rcx\n  cocos2d::CCArray *v5; // rax\n  cocos2d::ccArray *data; // rbx\n  __int64 num; // rax\n  cocos2d::CCObject **arr; // rbx\n  cocos2d::CCObject **i; // rsi\n\n  m_pobDescendants = this->m_pobDescendants;\n  if ( m_pobDescendants )\n  {\n    if ( (unsigned int)cocos2d::CCArray::count(m_pobDescendants) )\n    {\n      v5 = this->m_pobDescendants;\n      if ( v5 )\n      {\n        data = v5->data;\n        num = data->num;\n        if ( (_DWORD)num )\n        {\n          arr = data->arr;\n          for ( i = &arr[num - 1]; arr <= i; ++arr )\n          {\n            if ( !*arr )\n              break;\n            ((void (__fastcall *)(cocos2d::CCObject *, _QWORD))(*arr)->__vftable[13].isEqual)(*arr, 0);\n          }\n        }\n      }\n    }\n  }\n  cocos2d::CCNode::removeAllChildrenWithCleanup(this, a2);\n  cocos2d::CCArray::removeAllObjects(this->m_pobDescendants);\n  cocos2d::CCTextureAtlas::removeAllQuads(this->m_pobTextureAtlas);\n}", "assembly": "; \n; cocos2d::CCSpriteBatchNode::removeAllChildrenWithCleanup from 0x18008ed50 to 0x18008edfa (170 bytes)\n; \n; 7 xrefs:\n; > <???> @ 0x1800ec4b0\n; > <???> @ 0x180103eb0\n; > <???> @ 0x180105c18\n; > <???> @ 0x18013d89c\n; > <???> @ 0x18013d8d0\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b6090\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\nmov     [rsp+arg_10], rbp                                              ; +0x0, 0x18008ed50\npush    rdi                                                            ; +0x5, 0x18008ed55\nsub     rsp, 20h                                                       ; +0x6, 0x18008ed56\nmov     rdi, rcx                                                       ; +0xa, 0x18008ed5a\nmovzx   ebp, dl                                                        ; +0xd, 0x18008ed5d\nmov     rcx, [rcx+158h]; this                                          ; +0x10, 0x18008ed60\ntest    rcx, rcx                                                       ; +0x17, 0x18008ed67\njz      short loc_18008EDCC                                            ; +0x1a, 0x18008ed6a\ncall    ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x1c, 0x18008ed6c\ntest    eax, eax                                                       ; +0x21, 0x18008ed71\njz      short loc_18008EDCC                                            ; +0x23, 0x18008ed73\nmov     rax, [rdi+158h]                                                ; +0x25, 0x18008ed75\ntest    rax, rax                                                       ; +0x2c, 0x18008ed7c\njz      short loc_18008EDCC                                            ; +0x2f, 0x18008ed7f\nmov     [rsp+28h+arg_0], rbx                                           ; +0x31, 0x18008ed81\nmov     rbx, [rax+38h]                                                 ; +0x36, 0x18008ed86\nmov     eax, [rbx]                                                     ; +0x3a, 0x18008ed8a\ntest    eax, eax                                                       ; +0x3c, 0x18008ed8c\njz      short loc_18008EDC7                                            ; +0x3e, 0x18008ed8e\nmov     rbx, [rbx+10h]                                                 ; +0x40, 0x18008ed90\nmov     [rsp+28h+arg_8], rsi                                           ; +0x44, 0x18008ed94\nlea     rsi, [rax-1]                                                   ; +0x49, 0x18008ed99\nlea     rsi, [rbx+rsi*8]                                               ; +0x4d, 0x18008ed9d\ncmp     rbx, rsi                                                       ; +0x51, 0x18008eda1\nja      short loc_18008EDC2                                            ; +0x54, 0x18008eda4\nmov     rcx, [rbx]                                                     ; +0x56, 0x18008eda6\ntest    rcx, rcx                                                       ; +0x59, 0x18008eda9\njz      short loc_18008EDC2                                            ; +0x5c, 0x18008edac\nmov     rax, [rcx]                                                     ; +0x5e, 0x18008edae\nxor     edx, edx                                                       ; +0x61, 0x18008edb1\ncall    qword ptr [rax+3B8h]                                           ; +0x63, 0x18008edb3\nadd     rbx, 8                                                         ; +0x69, 0x18008edb9\ncmp     rbx, rsi                                                       ; +0x6d, 0x18008edbd\njbe     short loc_18008EDA6                                            ; +0x70, 0x18008edc0\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x72, 0x18008edc2\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x77, 0x18008edc7\nmovzx   edx, bpl; bool                                                 ; +0x7c, 0x18008edcc\nmov     rcx, rdi; this                                                 ; +0x80, 0x18008edd0\ncall    ?removeAllChildrenWithCleanup@CCNode@cocos2d@@UEAAX_N@Z; cocos2d::CCNode::removeAllChildrenWithCleanup(bool) ; +0x83, 0x18008edd3\nmov     rcx, [rdi+158h]; this                                          ; +0x88, 0x18008edd8\ncall    ?removeAllObjects@CCArray@cocos2d@@QEAAXXZ; cocos2d::CCArray::removeAllObjects(void) ; +0x8f, 0x18008eddf\nmov     rcx, [rdi+148h]; this                                          ; +0x94, 0x18008ede4\nmov     rbp, [rsp+28h+arg_10]                                          ; +0x9b, 0x18008edeb\nadd     rsp, 20h                                                       ; +0xa0, 0x18008edf0\npop     rdi                                                            ; +0xa4, 0x18008edf4\njmp     ?removeAllQuads@CCTextureAtlas@cocos2d@@QEAAXXZ; cocos2d::CCTextureAtlas::removeAllQuads(void) ; +0xa5, 0x18008edf5", "xrefs": ["<???> @ 0x1800ec4b0", "<???> @ 0x180103eb0", "<???> @ 0x180105c18", "<???> @ 0x18013d89c", "<???> @ 0x18013d8d0", "<???> @ 0x1801438a8", "<???> @ 0x1801b6090"], "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"}