//
// cocos2d::CCParticleSystem::resetSystem from 0x18006b010 to 0x18006b11a (266 bytes)
//
// 5 xrefs:
// > cocos2d::CCParticleSystemQuad::setTotalParticles @ 0x18006d093
// > ??> @ 0x1801432f8
// > ??> @ 0x180143308
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bdf54
//
// 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:54 +0000
//
void __fastcall cocos2d::CCParticleSystem::resetSystem(cocos2d::CCParticleSystem *this)
{
int v1; // eax
unsigned int v3; // ecx
unsigned int v4; // eax
__int64 v5; // rax
int v6; // edi
cocos2d::CCParticleBatchNode *v7; // rcx
v1 = *((_DWORD *)this + 116);
*((_BYTE *)this + 460) = 1;
*((_BYTE *)this + 564) = 0;
*((_DWORD *)this + 90) = 0;
*((_DWORD *)this + 140) = 0;
*((_DWORD *)this + 109) = 0;
if ( v1 )
{
v3 = 0;
do
{
*(_DWORD *)(148LL * v3 + *((_QWORD *)this + 53) + 64) = 0;
v3 = ++*((_DWORD *)this + 109);
v4 = *((_DWORD *)this + 116);
}
while ( v3 < v4 );
for ( ; v4; *((_DWORD *)this + 116) = v4 )
{
v5 = v4 - 1;
*((_DWORD *)this + 109) = v5;
v6 = *(_DWORD *)(148 * v5 + *((_QWORD *)this + 53) + 72);
v7 = *((cocos2d::CCParticleBatchNode **)this + 55);
if ( v7 )
{
cocos2d::CCParticleBatchNode::disableParticle(v7, v6 + *((_DWORD *)this + 112));
*(_DWORD *)(148LL * (unsigned int)(*((_DWORD *)this + 116) - 1) + *((_QWORD *)this + 53) + 72) = v6;
}
v4 = *((_DWORD *)this + 116) - 1;
}
}
*((_BYTE *)this + 286) = 0;
}