{"type": "func", "start": 6443037152, "end": 6443037347, "name": "cocos2d::CCSprite::removeAllChildrenWithCleanup", "pseudocode": "// \n// cocos2d::CCSprite::removeAllChildrenWithCleanup from 0x18008f1e0 to 0x18008f2a3 (195 bytes)\n// \n// 9 xrefs:\n// > <???> @ 0x1800f1bb0\n// > <???> @ 0x1800f2098\n// > <???> @ 0x1800f2c48\n// > <???> @ 0x18010a088\n// > <???> @ 0x18010d0a0\n// > <???> @ 0x18014662c\n// > <???> @ 0x180146684\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bfee0\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:07 +0000\n// \n\nvoid __fastcall cocos2d::CCSprite::removeAllChildrenWithCleanup(cocos2d::CCSprite *this, char a2)\n{\n  __int64 v4; // rax\n  unsigned int *v5; // rbx\n  __int64 v6; // rax\n  _QWORD *v7; // rbx\n  _QWORD *i; // rsi\n  struct cocos2d::CCSprite *v9; // rax\n\n  if ( *((_QWORD *)this + 46) )\n  {\n    v4 = *((_QWORD *)this + 26);\n    if ( v4 )\n    {\n      v5 = *(unsigned int **)(v4 + 56);\n      v6 = *v5;\n      if ( (_DWORD)v6 )\n      {\n        v7 = *((_QWORD **)v5 + 2);\n        for ( i = &v7[v6 - 1]; v7 <= i; ++v7 )\n        {\n          if ( !*v7 )\n            break;\n          v9 = (struct cocos2d::CCSprite *)_RTDynamicCast(\n                                             *v7,\n                                             0,\n                                             &cocos2d::CCObject `RTTI Type Descriptor',\n                                             &cocos2d::CCSprite `RTTI Type Descriptor',\n                                             0);\n          if ( v9 )\n            cocos2d::CCSpriteBatchNode::removeSpriteFromAtlas(*((cocos2d::CCSpriteBatchNode **)this + 46), v9);\n        }\n      }\n    }\n  }\n  cocos2d::CCNode::removeAllChildrenWithCleanup(this, a2);\n  *((_BYTE *)this + 378) = 0;\n}", "assembly": "; \n; cocos2d::CCSprite::removeAllChildrenWithCleanup from 0x18008f1e0 to 0x18008f2a3 (195 bytes)\n; \n; 9 xrefs:\n; > <???> @ 0x1800f1bb0\n; > <???> @ 0x1800f2098\n; > <???> @ 0x1800f2c48\n; > <???> @ 0x18010a088\n; > <???> @ 0x18010d0a0\n; > <???> @ 0x18014662c\n; > <???> @ 0x180146684\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bfee0\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:07 +0000\n; \nmov     [rsp+arg_18], rbp                                              ; +0x0, 0x18008f1e0\npush    rdi                                                            ; +0x5, 0x18008f1e5\nsub     rsp, 30h                                                       ; +0x6, 0x18008f1e6\ncmp     qword ptr [rcx+170h], 0                                        ; +0xa, 0x18008f1ea\nmovzx   ebp, dl                                                        ; +0x12, 0x18008f1f2\nmov     rdi, rcx                                                       ; +0x15, 0x18008f1f5\njz      loc_18008F285                                                  ; +0x18, 0x18008f1f8\nmov     rax, [rcx+0D0h]                                                ; +0x1e, 0x18008f1fe\ntest    rax, rax                                                       ; +0x25, 0x18008f205\njz      short loc_18008F285                                            ; +0x28, 0x18008f208\nmov     [rsp+38h+arg_0], rbx                                           ; +0x2a, 0x18008f20a\nmov     rbx, [rax+38h]                                                 ; +0x2f, 0x18008f20f\nmov     eax, [rbx]                                                     ; +0x33, 0x18008f213\ntest    eax, eax                                                       ; +0x35, 0x18008f215\njz      short loc_18008F280                                            ; +0x37, 0x18008f217\nmov     rbx, [rbx+10h]                                                 ; +0x39, 0x18008f219\nmov     [rsp+38h+arg_8], rsi                                           ; +0x3d, 0x18008f21d\nlea     rsi, [rax-1]                                                   ; +0x42, 0x18008f222\nlea     rsi, [rbx+rsi*8]                                               ; +0x46, 0x18008f226\ncmp     rbx, rsi                                                       ; +0x4a, 0x18008f22a\nja      short loc_18008F27B                                            ; +0x4d, 0x18008f22d\nmov     [rsp+38h+arg_10], r14                                          ; +0x4f, 0x18008f22f\nxor     r14d, r14d                                                     ; +0x54, 0x18008f234\nmov     rcx, [rbx]                                                     ; +0x57, 0x18008f237\ntest    rcx, rcx                                                       ; +0x5a, 0x18008f23a\njz      short loc_18008F276                                            ; +0x5d, 0x18008f23d\nlea     r9, ??_R0?AVCCSprite@cocos2d@@@8; cocos2d::CCSprite `RTTI Type Descriptor' ; +0x5f, 0x18008f23f\nmov     [rsp+38h+var_18], r14d                                         ; +0x66, 0x18008f246\nlea     r8, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0x6b, 0x18008f24b\nxor     edx, edx                                                       ; +0x72, 0x18008f252\ncall    __RTDynamicCast                                                ; +0x74, 0x18008f254\ntest    rax, rax                                                       ; +0x79, 0x18008f259\njz      short loc_18008F26D                                            ; +0x7c, 0x18008f25c\nmov     rcx, [rdi+170h]; this                                          ; +0x7e, 0x18008f25e\nmov     rdx, rax; struct cocos2d::CCSprite *                           ; +0x85, 0x18008f265\ncall    ?removeSpriteFromAtlas@CCSpriteBatchNode@cocos2d@@QEAAXPEAVCCSprite@2@@Z; cocos2d::CCSpriteBatchNode::removeSpriteFromAtlas(cocos2d::CCSprite *) ; +0x88, 0x18008f268\nadd     rbx, 8                                                         ; +0x8d, 0x18008f26d\ncmp     rbx, rsi                                                       ; +0x91, 0x18008f271\njbe     short loc_18008F237                                            ; +0x94, 0x18008f274\nmov     r14, [rsp+38h+arg_10]                                          ; +0x96, 0x18008f276\nmov     rsi, [rsp+38h+arg_8]                                           ; +0x9b, 0x18008f27b\nmov     rbx, [rsp+38h+arg_0]                                           ; +0xa0, 0x18008f280\nmovzx   edx, bpl; bool                                                 ; +0xa5, 0x18008f285\nmov     rcx, rdi; this                                                 ; +0xa9, 0x18008f289\ncall    ?removeAllChildrenWithCleanup@CCNode@cocos2d@@UEAAX_N@Z; cocos2d::CCNode::removeAllChildrenWithCleanup(bool) ; +0xac, 0x18008f28c\nmov     rbp, [rsp+38h+arg_18]                                          ; +0xb1, 0x18008f291\nmov     byte ptr [rdi+17Ah], 0                                         ; +0xb6, 0x18008f296\nadd     rsp, 30h                                                       ; +0xbd, 0x18008f29d\npop     rdi                                                            ; +0xc1, 0x18008f2a1\nretn                                                                   ; +0xc2, 0x18008f2a2", "xrefs": ["<???> @ 0x1800f1bb0", "<???> @ 0x1800f2098", "<???> @ 0x1800f2c48", "<???> @ 0x18010a088", "<???> @ 0x18010d0a0", "<???> @ 0x18014662c", "<???> @ 0x180146684", "<???> @ 0x18014cf68", "<???> @ 0x1801bfee0"], "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"}