// // cocos2d::CCParticleSystemQuad::setTotalParticles from 0x18006cf20 to 0x18006d0b7 (407 bytes) // // 14 xrefs: // > @ 0x180101208 // > @ 0x180101888 // > @ 0x180101f08 // > @ 0x180102588 // > @ 0x180102c08 // > @ 0x180103288 // > @ 0x180103908 // > @ 0x180103f88 // > @ 0x180104608 // > @ 0x180104c88 // > @ 0x180105308 // > @ 0x180106660 // > @ 0x18014cf68 // > @ 0x1801be0c8 // // This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 11:21:55 +0000 // void __fastcall cocos2d::CCParticleSystemQuad::setTotalParticles(cocos2d::CCParticleSystemQuad *this, unsigned int a2) { __int64 v3; // rdi void *v4; // rbp void *v5; // rsi void *v6; // rax bool v7; // zf unsigned int v8; // edx v3 = a2; if ( a2 <= *((_DWORD *)this + 114) ) { *((_DWORD *)this + 167) = a2; LABEL_16: cocos2d::CCParticleSystem::resetSystem(this); return; } v4 = realloc(*((void **)this + 53), 148LL * a2); v5 = realloc(*((void **)this + 99), 96 * v3); v6 = realloc(*((void **)this + 100), 12 * v3); if ( v4 ) { if ( v5 && v6 ) { *((_QWORD *)this + 53) = v4; *((_QWORD *)this + 99) = v5; *((_QWORD *)this + 100) = v6; memset(v4, 0, 148 * v3); memset(*((void **)this + 99), 0, 96 * v3); memset(*((void **)this + 100), 0, 12 * v3); v7 = *((_QWORD *)this + 55) == 0; *((_DWORD *)this + 114) = v3; *((_DWORD *)this + 167) = v3; if ( !v7 ) { v8 = 0; if ( (_DWORD)v3 ) { do { *(_DWORD *)(148LL * v8 + *((_QWORD *)this + 53) + 72) = v8; ++v8; } while ( v8 < *((_DWORD *)this + 167) ); } } cocos2d::CCParticleSystemQuad::initIndices(this); cocos2d::CCParticleSystemQuad::setupVBO(this); if ( *((_QWORD *)this + 84) ) cocos2d::CCParticleSystemQuad::initTexCoordsWithRect( this, (cocos2d::CCParticleSystemQuad *)((char *)this + 816)); goto LABEL_16; } *((_QWORD *)this + 53) = v4; } if ( v5 ) *((_QWORD *)this + 99) = v5; if ( v6 ) *((_QWORD *)this + 100) = v6; }