{"type": "func", "start": 6442886624, "end": 6442887010, "name": "cocos2d::CCParticleSystemQuad::draw", "pseudocode": "// \n// cocos2d::CCParticleSystemQuad::draw from 0x18006a5e0 to 0x18006a762 (386 bytes)\n// \n// 14 xrefs:\n// > <???> @ 0x1800fa9d0\n// > <???> @ 0x1800fb040\n// > <???> @ 0x1800fb6b0\n// > <???> @ 0x1800fbd20\n// > <???> @ 0x1800fc390\n// > <???> @ 0x1800fca00\n// > <???> @ 0x1800fd070\n// > <???> @ 0x1800fd6e0\n// > <???> @ 0x1800fdd50\n// > <???> @ 0x1800fe3c0\n// > <???> @ 0x1800fea30\n// > <???> @ 0x1800ffd18\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b3ccc\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::CCParticleSystemQuad::draw(cocos2d::CCParticleSystemQuad *this, float a2)\n{\n  cocos2d::CCGLProgram *v3; // rax\n  cocos2d::CCGLProgram *v4; // rax\n  unsigned int v5; // eax\n  unsigned int v6; // edx\n  unsigned int v7; // r8d\n  unsigned int v8; // edx\n\n  if ( this->m_pTexture )\n  {\n    if ( this->m_uParticleCount )\n    {\n      cocos2d::CCNode::updateTweenActionInt((cocos2d::CCNode *)(unsigned int)this->m_eGLServerState, a2);\n      ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *))this->getShaderProgram)(this);\n      v3 = (cocos2d::CCGLProgram *)((__int64 (__fastcall *)(cocos2d::CCParticleSystemQuad *))this->getShaderProgram)(this);\n      cocos2d::CCGLProgram::use(v3);\n      v4 = (cocos2d::CCGLProgram *)((__int64 (__fastcall *)(cocos2d::CCParticleSystemQuad *))this->getShaderProgram)(this);\n      cocos2d::CCGLProgram::setUniformsForBuiltins(v4);\n      v5 = ((__int64 (__fastcall *)(cocos2d::CCTexture2D *))this->m_pTexture->getName)(this->m_pTexture);\n      cocos2d::ccGLBindTexture2D((cocos2d *)v5, v6);\n      cocos2d::ccGLBlendFunc(this->m_tBlendFunc.src, this->m_tBlendFunc.dst, v7);\n      cocos2d::ccGLEnableVertexAttribs((cocos2d *)7, v8);\n      _glewBindBuffer(34962, this->m_pBuffersVBO[0]);\n      _glewVertexAttribPointer(0, 3, 5126);\n      _glewVertexAttribPointer(1, 4, 5121);\n      _glewVertexAttribPointer(2, 2, 5126);\n      _glewBindBuffer(34963, this->m_pBuffersVBO[1]);\n      glDrawElements(4u, 6 * this->cocos2d::CCParticleSystem::m_uParticleIdx, 0x1403u, nullptr);\n      _glewBindBuffer(34962, 0);\n      _glewBindBuffer(34963, 0);\n      ++g_uNumberOfDraws;\n    }\n  }\n}", "assembly": "; \n; cocos2d::CCParticleSystemQuad::draw from 0x18006a5e0 to 0x18006a762 (386 bytes)\n; \n; 14 xrefs:\n; > <???> @ 0x1800fa9d0\n; > <???> @ 0x1800fb040\n; > <???> @ 0x1800fb6b0\n; > <???> @ 0x1800fbd20\n; > <???> @ 0x1800fc390\n; > <???> @ 0x1800fca00\n; > <???> @ 0x1800fd070\n; > <???> @ 0x1800fd6e0\n; > <???> @ 0x1800fdd50\n; > <???> @ 0x1800fe3c0\n; > <???> @ 0x1800fea30\n; > <???> @ 0x1800ffd18\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b3ccc\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\npush    rbx                                                            ; +0x0, 0x18006a5e0\nsub     rsp, 30h                                                       ; +0x2, 0x18006a5e2\ncmp     qword ptr [rcx+2A0h], 0                                        ; +0x6, 0x18006a5e6\nmov     rbx, rcx                                                       ; +0xe, 0x18006a5ee\njz      loc_18006A75C                                                  ; +0x11, 0x18006a5f1\ncmp     dword ptr [rcx+1D0h], 0                                        ; +0x17, 0x18006a5f7\njz      loc_18006A75C                                                  ; +0x1e, 0x18006a5fe\nmov     ecx, [rcx+0F8h]; this                                          ; +0x24, 0x18006a604\ncall    ?updateTweenActionInt@CCNode@cocos2d@@UEAAXMH@Z; cocos2d::CCNode::updateTweenActionInt(float,int) ; +0x2a, 0x18006a60a\nmov     rax, [rbx]                                                     ; +0x2f, 0x18006a60f\nmov     rcx, rbx                                                       ; +0x32, 0x18006a612\ncall    qword ptr [rax+278h]                                           ; +0x35, 0x18006a615\nmov     rax, [rbx]                                                     ; +0x3b, 0x18006a61b\nmov     rcx, rbx                                                       ; +0x3e, 0x18006a61e\ncall    qword ptr [rax+278h]                                           ; +0x41, 0x18006a621\nmov     rcx, rax; this                                                 ; +0x47, 0x18006a627\ncall    ?use@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::use(void) ; +0x4a, 0x18006a62a\nmov     rax, [rbx]                                                     ; +0x4f, 0x18006a62f\nmov     rcx, rbx                                                       ; +0x52, 0x18006a632\ncall    qword ptr [rax+278h]                                           ; +0x55, 0x18006a635\nmov     rcx, rax; this                                                 ; +0x5b, 0x18006a63b\ncall    ?setUniformsForBuiltins@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::setUniformsForBuiltins(void) ; +0x5e, 0x18006a63e\nmov     rcx, [rbx+2A0h]                                                ; +0x63, 0x18006a643\nmov     rax, [rcx]                                                     ; +0x6a, 0x18006a64a\ncall    qword ptr [rax+60h]                                            ; +0x6d, 0x18006a64d\nmov     ecx, eax; this                                                 ; +0x70, 0x18006a650\ncall    ?ccGLBindTexture2D@cocos2d@@YAXI@Z; cocos2d::ccGLBindTexture2D(uint) ; +0x72, 0x18006a652\nmov     edx, [rbx+2ACh]; dfactor                                       ; +0x77, 0x18006a657\nmov     ecx, [rbx+2A8h]; sfactor                                       ; +0x7d, 0x18006a65d\ncall    ?ccGLBlendFunc@cocos2d@@YAXII@Z; cocos2d::ccGLBlendFunc(uint,uint) ; +0x83, 0x18006a663\nmov     ecx, 7; this                                                   ; +0x88, 0x18006a668\ncall    ?ccGLEnableVertexAttribs@cocos2d@@YAXI@Z; cocos2d::ccGLEnableVertexAttribs(uint) ; +0x8d, 0x18006a66d\nmov     rax, cs:__glewBindBuffer                                       ; +0x92, 0x18006a672\nmov     ecx, 8892h                                                     ; +0x99, 0x18006a679\nmov     edx, [rbx+328h]                                                ; +0x9e, 0x18006a67e\ncall    qword ptr [rax]                                                ; +0xa4, 0x18006a684\nmov     rax, cs:__glewVertexAttribPointer                              ; +0xa6, 0x18006a686\nxor     r9d, r9d                                                       ; +0xad, 0x18006a68d\nmov     [rsp+38h+var_10], 0                                            ; +0xb0, 0x18006a690\nxor     ecx, ecx                                                       ; +0xb9, 0x18006a699\nmov     r8d, 1406h                                                     ; +0xbb, 0x18006a69b\nmov     [rsp+38h+var_18], 18h                                          ; +0xc1, 0x18006a6a1\nlea     edx, [r9+3]                                                    ; +0xc9, 0x18006a6a9\ncall    qword ptr [rax]                                                ; +0xcd, 0x18006a6ad\nmov     rax, cs:__glewVertexAttribPointer                              ; +0xcf, 0x18006a6af\nmov     edx, 4                                                         ; +0xd6, 0x18006a6b6\nmov     [rsp+38h+var_10], 0Ch                                          ; +0xdb, 0x18006a6bb\nmov     r9b, 1                                                         ; +0xe4, 0x18006a6c4\nmov     r8d, 1401h                                                     ; +0xe7, 0x18006a6c7\nmov     [rsp+38h+var_18], 18h                                          ; +0xed, 0x18006a6cd\nlea     ecx, [rdx-3]                                                   ; +0xf5, 0x18006a6d5\ncall    qword ptr [rax]                                                ; +0xf8, 0x18006a6d8\nmov     rax, cs:__glewVertexAttribPointer                              ; +0xfa, 0x18006a6da\nmov     edx, 2                                                         ; +0x101, 0x18006a6e1\nmov     [rsp+38h+var_10], 10h                                          ; +0x106, 0x18006a6e6\nxor     r9d, r9d                                                       ; +0x10f, 0x18006a6ef\nmov     ecx, edx                                                       ; +0x112, 0x18006a6f2\nmov     [rsp+38h+var_18], 18h                                          ; +0x114, 0x18006a6f4\nmov     r8d, 1406h                                                     ; +0x11c, 0x18006a6fc\ncall    qword ptr [rax]                                                ; +0x122, 0x18006a702\nmov     rax, cs:__glewBindBuffer                                       ; +0x124, 0x18006a704\nmov     ecx, 8893h                                                     ; +0x12b, 0x18006a70b\nmov     edx, [rbx+32Ch]                                                ; +0x130, 0x18006a710\ncall    qword ptr [rax]                                                ; +0x136, 0x18006a716\nmov     eax, [rbx+1B4h]                                                ; +0x138, 0x18006a718\nxor     r9d, r9d; indices                                              ; +0x13e, 0x18006a71e\nmov     r8d, 1403h; type                                               ; +0x141, 0x18006a721\nlea     edx, [rax+rax*2]                                               ; +0x147, 0x18006a727\nadd     edx, edx; count                                                ; +0x14a, 0x18006a72a\nlea     ecx, [r9+4]; mode                                              ; +0x14c, 0x18006a72c\ncall    cs:glDrawElements                                              ; +0x150, 0x18006a730\nmov     rax, cs:__glewBindBuffer                                       ; +0x156, 0x18006a736\nxor     edx, edx                                                       ; +0x15d, 0x18006a73d\nmov     ecx, 8892h                                                     ; +0x15f, 0x18006a73f\ncall    qword ptr [rax]                                                ; +0x164, 0x18006a744\nmov     rax, cs:__glewBindBuffer                                       ; +0x166, 0x18006a746\nxor     edx, edx                                                       ; +0x16d, 0x18006a74d\nmov     ecx, 8893h                                                     ; +0x16f, 0x18006a74f\ncall    qword ptr [rax]                                                ; +0x174, 0x18006a754\ninc     cs:?g_uNumberOfDraws@@3IA; uint g_uNumberOfDraws               ; +0x176, 0x18006a756\nadd     rsp, 30h                                                       ; +0x17c, 0x18006a75c\npop     rbx                                                            ; +0x180, 0x18006a760\nretn                                                                   ; +0x181, 0x18006a761", "xrefs": ["<???> @ 0x1800fa9d0", "<???> @ 0x1800fb040", "<???> @ 0x1800fb6b0", "<???> @ 0x1800fbd20", "<???> @ 0x1800fc390", "<???> @ 0x1800fca00", "<???> @ 0x1800fd070", "<???> @ 0x1800fd6e0", "<???> @ 0x1800fdd50", "<???> @ 0x1800fe3c0", "<???> @ 0x1800fea30", "<???> @ 0x1800ffd18", "<???> @ 0x1801438a8", "<???> @ 0x1801b3ccc"], "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"}