{"type": "func", "start": 6442896560, "end": 6442896863, "name": "cocos2d::CCParticleSystemQuad::setBatchNode", "pseudocode": "// \n// cocos2d::CCParticleSystemQuad::setBatchNode from 0x18006ccb0 to 0x18006cddf (303 bytes)\n// \n// 16 xrefs:\n// > <???> @ 0x180100fb0\n// > <???> @ 0x180101630\n// > <???> @ 0x180101cb0\n// > <???> @ 0x180102330\n// > <???> @ 0x1801029b0\n// > <???> @ 0x180103030\n// > <???> @ 0x1801036b0\n// > <???> @ 0x180103d30\n// > <???> @ 0x1801043b0\n// > <???> @ 0x180104a30\n// > <???> @ 0x1801050b0\n// > <???> @ 0x180106408\n// > <???> @ 0x1801434f8\n// > <???> @ 0x180143508\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801be050\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:21:55 +0000\n// \n\nvoid __fastcall cocos2d::CCParticleSystemQuad::setBatchNode(\n        cocos2d::CCParticleSystemQuad *this,\n        struct cocos2d::CCParticleBatchNode *a2)\n{\n  struct cocos2d::CCParticleBatchNode *v2; // rbp\n  __int64 v5; // rbx\n  __int64 v6; // rax\n  __int64 v7; // rax\n  void *v8; // rcx\n  void *v9; // rcx\n\n  v2 = *((struct cocos2d::CCParticleBatchNode **)this + 55);\n  if ( v2 != a2 )\n  {\n    cocos2d::CCParticleSystem::setBatchNode(this, a2);\n    if ( a2 )\n    {\n      if ( !v2 )\n      {\n        v7 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(*((_QWORD *)this + 55) + 328LL) + 104LL))(*(_QWORD *)(*((_QWORD *)this + 55) + 328LL));\n        memcpy(\n          (void *)(v7 + 96LL * *((unsigned int *)this + 112)),\n          *((const void **)this + 99),\n          96LL * *((unsigned int *)this + 167));\n        v8 = *((void **)this + 99);\n        if ( v8 )\n        {\n          free(v8);\n          *((_QWORD *)this + 99) = 0;\n        }\n        v9 = *((void **)this + 100);\n        if ( v9 )\n        {\n          free(v9);\n          *((_QWORD *)this + 100) = 0;\n        }\n        _glewDeleteBuffers(2, (char *)this + 808);\n        *((_QWORD *)this + 101) = 0;\n      }\n    }\n    else\n    {\n      cocos2d::CCParticleSystemQuad::allocMemory(this);\n      cocos2d::CCParticleSystemQuad::initIndices(this);\n      v5 = *((_QWORD *)this + 40);\n      v6 = (*(__int64 (__fastcall **)(_QWORD *))(*((_QWORD *)v2 + 40) + 16LL))((_QWORD *)v2 + 40);\n      (*(void (__fastcall **)(char *, __int64))(v5 + 24))((char *)this + 320, v6);\n      cocos2d::CCParticleSystemQuad::setupVBO(this);\n    }\n  }\n}", "assembly": "; \n; cocos2d::CCParticleSystemQuad::setBatchNode from 0x18006ccb0 to 0x18006cddf (303 bytes)\n; \n; 16 xrefs:\n; > <???> @ 0x180100fb0\n; > <???> @ 0x180101630\n; > <???> @ 0x180101cb0\n; > <???> @ 0x180102330\n; > <???> @ 0x1801029b0\n; > <???> @ 0x180103030\n; > <???> @ 0x1801036b0\n; > <???> @ 0x180103d30\n; > <???> @ 0x1801043b0\n; > <???> @ 0x180104a30\n; > <???> @ 0x1801050b0\n; > <???> @ 0x180106408\n; > <???> @ 0x1801434f8\n; > <???> @ 0x180143508\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801be050\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:21:55 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x18006ccb0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x18006ccb5\npush    rsi                                                            ; +0xa, 0x18006ccba\nsub     rsp, 20h                                                       ; +0xb, 0x18006ccbb\nmov     rbp, [rcx+1B8h]                                                ; +0xf, 0x18006ccbf\nmov     rbx, rdx                                                       ; +0x16, 0x18006ccc6\nmov     rsi, rcx                                                       ; +0x19, 0x18006ccc9\ncmp     rbp, rdx                                                       ; +0x1c, 0x18006cccc\njz      loc_18006CDCF                                                  ; +0x1f, 0x18006cccf\ncall    ?setBatchNode@CCParticleSystem@cocos2d@@UEAAXPEAVCCParticleBatchNode@2@@Z; cocos2d::CCParticleSystem::setBatchNode(cocos2d::CCParticleBatchNode *) ; +0x25, 0x18006ccd5\ntest    rbx, rbx                                                       ; +0x2a, 0x18006ccda\njnz     short loc_18006CD31                                            ; +0x2d, 0x18006ccdd\nmov     rcx, rsi; this                                                 ; +0x2f, 0x18006ccdf\nmov     [rsp+28h+arg_0], rdi                                           ; +0x32, 0x18006cce2\ncall    ?allocMemory@CCParticleSystemQuad@cocos2d@@AEAA_NXZ; cocos2d::CCParticleSystemQuad::allocMemory(void) ; +0x37, 0x18006cce7\nmov     rcx, rsi; this                                                 ; +0x3c, 0x18006ccec\ncall    ?initIndices@CCParticleSystemQuad@cocos2d@@QEAAXXZ; cocos2d::CCParticleSystemQuad::initIndices(void) ; +0x3f, 0x18006ccef\nmov     rbx, [rsi+140h]                                                ; +0x44, 0x18006ccf4\nlea     rcx, [rbp+140h]                                                ; +0x4b, 0x18006ccfb\nmov     rax, [rcx]                                                     ; +0x52, 0x18006cd02\ncall    qword ptr [rax+10h]                                            ; +0x55, 0x18006cd05\nmov     rdx, rax                                                       ; +0x58, 0x18006cd08\nlea     rcx, [rsi+140h]                                                ; +0x5b, 0x18006cd0b\ncall    qword ptr [rbx+18h]                                            ; +0x62, 0x18006cd12\nmov     rcx, rsi; this                                                 ; +0x65, 0x18006cd15\nmov     rdi, [rsp+28h+arg_0]                                           ; +0x68, 0x18006cd18\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x6d, 0x18006cd1d\nmov     rbp, [rsp+28h+arg_10]                                          ; +0x72, 0x18006cd22\nadd     rsp, 20h                                                       ; +0x77, 0x18006cd27\npop     rsi                                                            ; +0x7b, 0x18006cd2b\njmp     ?setupVBO@CCParticleSystemQuad@cocos2d@@AEAAXXZ; cocos2d::CCParticleSystemQuad::setupVBO(void) ; +0x7c, 0x18006cd2c\ntest    rbp, rbp                                                       ; +0x81, 0x18006cd31\njnz     loc_18006CDCF                                                  ; +0x84, 0x18006cd34\nmov     rax, [rsi+1B8h]                                                ; +0x8a, 0x18006cd3a\nmov     rcx, [rax+148h]                                                ; +0x91, 0x18006cd41\nmov     rax, [rcx]                                                     ; +0x98, 0x18006cd48\ncall    qword ptr [rax+68h]                                            ; +0x9b, 0x18006cd4b\nmov     ecx, [rsi+29Ch]                                                ; +0x9e, 0x18006cd4e\nmov     rdx, [rsi+318h]; Src                                           ; +0xa4, 0x18006cd54\nlea     r8, [rcx+rcx*2]                                                ; +0xab, 0x18006cd5b\nmov     ecx, [rsi+1C0h]                                                ; +0xaf, 0x18006cd5f\nshl     r8, 5; Size                                                    ; +0xb5, 0x18006cd65\nlea     rcx, [rcx+rcx*2]                                               ; +0xb9, 0x18006cd69\nshl     rcx, 5                                                         ; +0xbd, 0x18006cd6d\nadd     rcx, rax; void *                                               ; +0xc1, 0x18006cd71\ncall    memcpy                                                         ; +0xc4, 0x18006cd74\nmov     rcx, [rsi+318h]; Block                                         ; +0xc9, 0x18006cd79\nxor     ebx, ebx                                                       ; +0xd0, 0x18006cd80\ntest    rcx, rcx                                                       ; +0xd2, 0x18006cd82\njz      short loc_18006CD94                                            ; +0xd5, 0x18006cd85\ncall    cs:__imp_free                                                  ; +0xd7, 0x18006cd87\nmov     [rsi+318h], rbx                                                ; +0xdd, 0x18006cd8d\nmov     rcx, [rsi+320h]; Block                                         ; +0xe4, 0x18006cd94\ntest    rcx, rcx                                                       ; +0xeb, 0x18006cd9b\njz      short loc_18006CDAD                                            ; +0xee, 0x18006cd9e\ncall    cs:__imp_free                                                  ; +0xf0, 0x18006cda0\nmov     [rsi+320h], rbx                                                ; +0xf6, 0x18006cda6\nmov     rax, cs:__glewDeleteBuffers                                    ; +0xfd, 0x18006cdad\nlea     rdx, [rsi+328h]                                                ; +0x104, 0x18006cdb4\nmov     ecx, 2                                                         ; +0x10b, 0x18006cdbb\nmov     r8, [rax]                                                      ; +0x110, 0x18006cdc0\ncall    r8                                                             ; +0x113, 0x18006cdc3\nxor     eax, eax                                                       ; +0x116, 0x18006cdc6\nmov     [rsi+328h], rax                                                ; +0x118, 0x18006cdc8\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x11f, 0x18006cdcf\nmov     rbp, [rsp+28h+arg_10]                                          ; +0x124, 0x18006cdd4\nadd     rsp, 20h                                                       ; +0x129, 0x18006cdd9\npop     rsi                                                            ; +0x12d, 0x18006cddd\nretn                                                                   ; +0x12e, 0x18006cdde", "xrefs": ["<???> @ 0x180100fb0", "<???> @ 0x180101630", "<???> @ 0x180101cb0", "<???> @ 0x180102330", "<???> @ 0x1801029b0", "<???> @ 0x180103030", "<???> @ 0x1801036b0", "<???> @ 0x180103d30", "<???> @ 0x1801043b0", "<???> @ 0x180104a30", "<???> @ 0x1801050b0", "<???> @ 0x180106408", "<???> @ 0x1801434f8", "<???> @ 0x180143508", "<???> @ 0x18014cf68", "<???> @ 0x1801be050"], "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"}