{"type": "func", "start": 6442850256, "end": 6442850576, "name": "cocos2d::CCParticleBatchNode::insertChild", "pseudocode": "// \n// cocos2d::CCParticleBatchNode::insertChild from 0x1800617d0 to 0x180061910 (320 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCParticleBatchNode::addChild @ 0x1800611ec\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b3660\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::CCParticleBatchNode::insertChild(\n        cocos2d::CCParticleBatchNode *this,\n        struct cocos2d::CCParticleSystem *a2,\n        unsigned int a3)\n{\n  int v6; // edi\n  unsigned int v7; // edi\n  int v8; // ebx\n  int v9; // eax\n  cocos2d::CCParticleSystem_vtbl *v10; // rbx\n  int v11; // edi\n  int v12; // eax\n  int v13; // ebx\n  int v14; // eax\n  unsigned int v15; // eax\n\n  a2->m_uAtlasIndex = a3;\n  v6 = ((__int64 (__fastcall *)(cocos2d::CCTextureAtlas *))this->m_pTextureAtlas->getTotalQuads)(this->m_pTextureAtlas);\n  v7 = ((__int64 (__fastcall *)(struct cocos2d::CCParticleSystem *))a2->getTotalParticles)(a2) + v6;\n  if ( v7 > ((unsigned int (__fastcall *)(cocos2d::CCTextureAtlas *))this->m_pTextureAtlas->getCapacity)(this->m_pTextureAtlas) )\n  {\n    v8 = ((__int64 (__fastcall *)(cocos2d::CCTextureAtlas *))this->m_pTextureAtlas->getTotalQuads)(this->m_pTextureAtlas);\n    v9 = ((__int64 (__fastcall *)(struct cocos2d::CCParticleSystem *))a2->getTotalParticles)(a2);\n    cocos2d::CCTextureAtlas::resizeCapacity(this->m_pTextureAtlas, v8 + v9);\n    v10 = a2->cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    v11 = ((__int64 (__fastcall *)(cocos2d::CCTextureAtlas *))this->m_pTextureAtlas->getCapacity)(this->m_pTextureAtlas);\n    LODWORD(v10) = ((__int64 (__fastcall *)(struct cocos2d::CCParticleSystem *))v10->getTotalParticles)(a2);\n    v12 = ((__int64 (__fastcall *)(struct cocos2d::CCParticleSystem *))a2->getTotalParticles)(a2);\n    cocos2d::CCTextureAtlas::fillWithEmptyQuadsFromIndex(this->m_pTextureAtlas, v11 - v12, (unsigned int)v10);\n  }\n  v13 = ((__int64 (__fastcall *)(cocos2d::CCTextureAtlas *))this->m_pTextureAtlas->getTotalQuads)(this->m_pTextureAtlas);\n  if ( a2->m_uAtlasIndex + ((unsigned int (__fastcall *)(struct cocos2d::CCParticleSystem *))a2->getTotalParticles)(a2) != v13 )\n  {\n    v14 = ((__int64 (__fastcall *)(struct cocos2d::CCParticleSystem *))a2->getTotalParticles)(a2);\n    cocos2d::CCTextureAtlas::moveQuadsFromIndex(this->m_pTextureAtlas, a3, a3 + v14);\n  }\n  v15 = ((__int64 (__fastcall *)(struct cocos2d::CCParticleSystem *))a2->getTotalParticles)(a2);\n  cocos2d::CCTextureAtlas::increaseTotalQuadsWith(this->m_pTextureAtlas, v15);\n  cocos2d::CCParticleBatchNode::updateAllAtlasIndexes(this);\n}", "assembly": "; \n; cocos2d::CCParticleBatchNode::insertChild from 0x1800617d0 to 0x180061910 (320 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCParticleBatchNode::addChild @ 0x1800611ec\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b3660\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_0], rbx                                               ; +0x0, 0x1800617d0\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x1800617d5\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x1800617da\nmov     [rsp+arg_18], rdi                                              ; +0xf, 0x1800617df\npush    r14                                                            ; +0x14, 0x1800617e4\nsub     rsp, 20h                                                       ; +0x16, 0x1800617e6\nmov     [rdx+1C0h], r8d                                                ; +0x1a, 0x1800617ea\nmov     rbp, rcx                                                       ; +0x21, 0x1800617f1\nmov     rcx, [rcx+148h]                                                ; +0x24, 0x1800617f4\nmov     r14d, r8d                                                      ; +0x2b, 0x1800617fb\nmov     rsi, rdx                                                       ; +0x2e, 0x1800617fe\nmov     rax, [rcx]                                                     ; +0x31, 0x180061801\ncall    qword ptr [rax+48h]                                            ; +0x34, 0x180061804\nmov     r9, [rsi]                                                      ; +0x37, 0x180061807\nmov     rcx, rsi                                                       ; +0x3a, 0x18006180a\nmov     edi, eax                                                       ; +0x3d, 0x18006180d\ncall    qword ptr [r9+5C0h]                                            ; +0x3f, 0x18006180f\nmov     rcx, [rbp+148h]                                                ; +0x46, 0x180061816\nadd     edi, eax                                                       ; +0x4d, 0x18006181d\nmov     rdx, [rcx]                                                     ; +0x4f, 0x18006181f\ncall    qword ptr [rdx+50h]                                            ; +0x52, 0x180061822\ncmp     edi, eax                                                       ; +0x55, 0x180061825\njbe     short loc_180061890                                            ; +0x57, 0x180061827\nmov     rcx, [rbp+148h]                                                ; +0x59, 0x180061829\nmov     rax, [rcx]                                                     ; +0x60, 0x180061830\ncall    qword ptr [rax+48h]                                            ; +0x63, 0x180061833\nmov     rdx, [rsi]                                                     ; +0x66, 0x180061836\nmov     rcx, rsi                                                       ; +0x69, 0x180061839\nmov     ebx, eax                                                       ; +0x6c, 0x18006183c\ncall    qword ptr [rdx+5C0h]                                           ; +0x6e, 0x18006183e\nmov     rcx, [rbp+148h]; this                                          ; +0x74, 0x180061844\nlea     edx, [rbx+rax]; unsigned int                                   ; +0x7b, 0x18006184b\ncall    ?resizeCapacity@CCTextureAtlas@cocos2d@@QEAA_NI@Z; cocos2d::CCTextureAtlas::resizeCapacity(uint) ; +0x7e, 0x18006184e\nmov     rcx, [rbp+148h]                                                ; +0x83, 0x180061853\nmov     rbx, [rsi]                                                     ; +0x8a, 0x18006185a\nmov     rax, [rcx]                                                     ; +0x8d, 0x18006185d\ncall    qword ptr [rax+50h]                                            ; +0x90, 0x180061860\nmov     rcx, rsi                                                       ; +0x93, 0x180061863\nmov     edi, eax                                                       ; +0x96, 0x180061866\ncall    qword ptr [rbx+5C0h]                                           ; +0x98, 0x180061868\nmov     r8, [rsi]                                                      ; +0x9e, 0x18006186e\nmov     rcx, rsi                                                       ; +0xa1, 0x180061871\nmov     ebx, eax                                                       ; +0xa4, 0x180061874\ncall    qword ptr [r8+5C0h]                                            ; +0xa6, 0x180061876\nmov     rcx, [rbp+148h]; this                                          ; +0xad, 0x18006187d\nmov     r8d, ebx; unsigned int                                         ; +0xb4, 0x180061884\nsub     edi, eax                                                       ; +0xb7, 0x180061887\nmov     edx, edi; unsigned int                                         ; +0xb9, 0x180061889\ncall    ?fillWithEmptyQuadsFromIndex@CCTextureAtlas@cocos2d@@QEAAXII@Z; cocos2d::CCTextureAtlas::fillWithEmptyQuadsFromIndex(uint,uint) ; +0xbb, 0x18006188b\nmov     rcx, [rbp+148h]                                                ; +0xc0, 0x180061890\nmov     rax, [rcx]                                                     ; +0xc7, 0x180061897\ncall    qword ptr [rax+48h]                                            ; +0xca, 0x18006189a\nmov     rdx, [rsi]                                                     ; +0xcd, 0x18006189d\nmov     rcx, rsi                                                       ; +0xd0, 0x1800618a0\nmov     ebx, eax                                                       ; +0xd3, 0x1800618a3\ncall    qword ptr [rdx+5C0h]                                           ; +0xd5, 0x1800618a5\nadd     eax, [rsi+1C0h]                                                ; +0xdb, 0x1800618ab\ncmp     eax, ebx                                                       ; +0xe1, 0x1800618b1\njz      short loc_1800618D4                                            ; +0xe3, 0x1800618b3\nmov     rax, [rsi]                                                     ; +0xe5, 0x1800618b5\nmov     rcx, rsi                                                       ; +0xe8, 0x1800618b8\ncall    qword ptr [rax+5C0h]                                           ; +0xeb, 0x1800618bb\nmov     rcx, [rbp+148h]; this                                          ; +0xf1, 0x1800618c1\nmov     edx, r14d; unsigned int                                        ; +0xf8, 0x1800618c8\nlea     r8d, [r14+rax]; unsigned int                                   ; +0xfb, 0x1800618cb\ncall    ?moveQuadsFromIndex@CCTextureAtlas@cocos2d@@QEAAXII@Z; cocos2d::CCTextureAtlas::moveQuadsFromIndex(uint,uint) ; +0xff, 0x1800618cf\nmov     rax, [rsi]                                                     ; +0x104, 0x1800618d4\nmov     rcx, rsi                                                       ; +0x107, 0x1800618d7\ncall    qword ptr [rax+5C0h]                                           ; +0x10a, 0x1800618da\nmov     rcx, [rbp+148h]; this                                          ; +0x110, 0x1800618e0\nmov     edx, eax; unsigned int                                         ; +0x117, 0x1800618e7\ncall    ?increaseTotalQuadsWith@CCTextureAtlas@cocos2d@@QEAAXI@Z; cocos2d::CCTextureAtlas::increaseTotalQuadsWith(uint) ; +0x119, 0x1800618e9\nmov     rcx, rbp; this                                                 ; +0x11e, 0x1800618ee\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x121, 0x1800618f1\nmov     rbp, [rsp+28h+arg_8]                                           ; +0x126, 0x1800618f6\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x12b, 0x1800618fb\nmov     rdi, [rsp+28h+arg_18]                                          ; +0x130, 0x180061900\nadd     rsp, 20h                                                       ; +0x135, 0x180061905\npop     r14                                                            ; +0x139, 0x180061909\njmp     ?updateAllAtlasIndexes@CCParticleBatchNode@cocos2d@@AEAAXXZ; cocos2d::CCParticleBatchNode::updateAllAtlasIndexes(void) ; +0x13b, 0x18006190b", "xrefs": ["cocos2d::CCParticleBatchNode::addChild @ 0x1800611ec", "<???> @ 0x1801438a8", "<???> @ 0x1801b3660"], "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"}