{"type": "func", "start": 6443024368, "end": 6443024563, "name": "cocos2d::CCSprite::removeAllChildrenWithCleanup", "pseudocode": "// \n// cocos2d::CCSprite::removeAllChildrenWithCleanup from 0x18008bff0 to 0x18008c0b3 (195 bytes)\n// \n// 9 xrefs:\n// > <???> @ 0x1800ebab0\n// > <???> @ 0x1800ebf88\n// > <???> @ 0x1800ecb08\n// > <???> @ 0x1801039c0\n// > <???> @ 0x1801069b8\n// > <???> @ 0x18013d380\n// > <???> @ 0x18013d3d8\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b5c10\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::CCSprite::removeAllChildrenWithCleanup(cocos2d::CCSprite *this, char a2)\n{\n  cocos2d::CCArray *m_pChildren; // rax\n  cocos2d::ccArray *data; // rbx\n  __int64 num; // rax\n  cocos2d::CCObject **arr; // rbx\n  cocos2d::CCObject **i; // rsi\n  struct cocos2d::CCSprite *v9; // rax\n\n  if ( this->m_pobBatchNode )\n  {\n    m_pChildren = this->m_pChildren;\n    if ( m_pChildren )\n    {\n      data = m_pChildren->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          v9 = (struct cocos2d::CCSprite *)_RTDynamicCast(\n                                             *arr,\n                                             0,\n                                             &cocos2d::CCObject `RTTI Type Descriptor',\n                                             &cocos2d::CCSprite `RTTI Type Descriptor',\n                                             0);\n          if ( v9 )\n            cocos2d::CCSpriteBatchNode::removeSpriteFromAtlas(this->m_pobBatchNode, v9);\n        }\n      }\n    }\n  }\n  cocos2d::CCNode::removeAllChildrenWithCleanup(this, a2);\n  this->m_bHasChildren = 0;\n}", "assembly": "; \n; cocos2d::CCSprite::removeAllChildrenWithCleanup from 0x18008bff0 to 0x18008c0b3 (195 bytes)\n; \n; 9 xrefs:\n; > <???> @ 0x1800ebab0\n; > <???> @ 0x1800ebf88\n; > <???> @ 0x1800ecb08\n; > <???> @ 0x1801039c0\n; > <???> @ 0x1801069b8\n; > <???> @ 0x18013d380\n; > <???> @ 0x18013d3d8\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b5c10\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_18], rbp                                              ; +0x0, 0x18008bff0\npush    rdi                                                            ; +0x5, 0x18008bff5\nsub     rsp, 30h                                                       ; +0x6, 0x18008bff6\ncmp     qword ptr [rcx+170h], 0                                        ; +0xa, 0x18008bffa\nmovzx   ebp, dl                                                        ; +0x12, 0x18008c002\nmov     rdi, rcx                                                       ; +0x15, 0x18008c005\njz      loc_18008C095                                                  ; +0x18, 0x18008c008\nmov     rax, [rcx+0D0h]                                                ; +0x1e, 0x18008c00e\ntest    rax, rax                                                       ; +0x25, 0x18008c015\njz      short loc_18008C095                                            ; +0x28, 0x18008c018\nmov     [rsp+38h+arg_0], rbx                                           ; +0x2a, 0x18008c01a\nmov     rbx, [rax+38h]                                                 ; +0x2f, 0x18008c01f\nmov     eax, [rbx]                                                     ; +0x33, 0x18008c023\ntest    eax, eax                                                       ; +0x35, 0x18008c025\njz      short loc_18008C090                                            ; +0x37, 0x18008c027\nmov     rbx, [rbx+10h]                                                 ; +0x39, 0x18008c029\nmov     [rsp+38h+arg_8], rsi                                           ; +0x3d, 0x18008c02d\nlea     rsi, [rax-1]                                                   ; +0x42, 0x18008c032\nlea     rsi, [rbx+rsi*8]                                               ; +0x46, 0x18008c036\ncmp     rbx, rsi                                                       ; +0x4a, 0x18008c03a\nja      short loc_18008C08B                                            ; +0x4d, 0x18008c03d\nmov     [rsp+38h+arg_10], r14                                          ; +0x4f, 0x18008c03f\nxor     r14d, r14d                                                     ; +0x54, 0x18008c044\nmov     rcx, [rbx]                                                     ; +0x57, 0x18008c047\ntest    rcx, rcx                                                       ; +0x5a, 0x18008c04a\njz      short loc_18008C086                                            ; +0x5d, 0x18008c04d\nlea     r9, ??_R0?AVCCSprite@cocos2d@@@8; cocos2d::CCSprite `RTTI Type Descriptor' ; +0x5f, 0x18008c04f\nmov     [rsp+38h+var_18], r14d                                         ; +0x66, 0x18008c056\nlea     r8, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0x6b, 0x18008c05b\nxor     edx, edx                                                       ; +0x72, 0x18008c062\ncall    __RTDynamicCast                                                ; +0x74, 0x18008c064\ntest    rax, rax                                                       ; +0x79, 0x18008c069\njz      short loc_18008C07D                                            ; +0x7c, 0x18008c06c\nmov     rcx, [rdi+170h]; this                                          ; +0x7e, 0x18008c06e\nmov     rdx, rax; struct cocos2d::CCSprite *                           ; +0x85, 0x18008c075\ncall    ?removeSpriteFromAtlas@CCSpriteBatchNode@cocos2d@@QEAAXPEAVCCSprite@2@@Z; cocos2d::CCSpriteBatchNode::removeSpriteFromAtlas(cocos2d::CCSprite *) ; +0x88, 0x18008c078\nadd     rbx, 8                                                         ; +0x8d, 0x18008c07d\ncmp     rbx, rsi                                                       ; +0x91, 0x18008c081\njbe     short loc_18008C047                                            ; +0x94, 0x18008c084\nmov     r14, [rsp+38h+arg_10]                                          ; +0x96, 0x18008c086\nmov     rsi, [rsp+38h+arg_8]                                           ; +0x9b, 0x18008c08b\nmov     rbx, [rsp+38h+arg_0]                                           ; +0xa0, 0x18008c090\nmovzx   edx, bpl; bool                                                 ; +0xa5, 0x18008c095\nmov     rcx, rdi; this                                                 ; +0xa9, 0x18008c099\ncall    ?removeAllChildrenWithCleanup@CCNode@cocos2d@@UEAAX_N@Z; cocos2d::CCNode::removeAllChildrenWithCleanup(bool) ; +0xac, 0x18008c09c\nmov     rbp, [rsp+38h+arg_18]                                          ; +0xb1, 0x18008c0a1\nmov     byte ptr [rdi+17Ah], 0                                         ; +0xb6, 0x18008c0a6\nadd     rsp, 30h                                                       ; +0xbd, 0x18008c0ad\npop     rdi                                                            ; +0xc1, 0x18008c0b1\nretn                                                                   ; +0xc2, 0x18008c0b2", "xrefs": ["<???> @ 0x1800ebab0", "<???> @ 0x1800ebf88", "<???> @ 0x1800ecb08", "<???> @ 0x1801039c0", "<???> @ 0x1801069b8", "<???> @ 0x18013d380", "<???> @ 0x18013d3d8", "<???> @ 0x1801438a8", "<???> @ 0x1801b5c10"], "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"}