//
// cocos2d::CCParticleFireworks::initWithTotalParticles from 0xd6bba0 to 0xd6bd58 (440 bytes)
//
// 4 xrefs:
// > cocos2d::CCParticleFireworks::create @ 0xd6d7a8
// > cocos2d::CCParticleFireworks::createWithTotalParticles @ 0xd6d834
// > ??> @ 0x4f2e8
// > ??> @ 0x1528850
//
// This function is hookable on this platform (idp: arm, 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 13:07:57 +0000
//
__int64 __fastcall cocos2d::CCParticleFireworks::initWithTotalParticles(
cocos2d::CCParticleFireworks *this,
unsigned int a2)
{
unsigned __int8 v3; // w0
unsigned int v4; // w21
cocos2d::CCDirector *v6; // x0
void (__fastcall *v7)(cocos2d::CCParticleFireworks *, float *); // x23
float v8; // s0
__int64 v9; // x1
__int64 v10; // [xsp+58h] [xbp+58h] BYREF
float v11; // [xsp+60h] [xbp+60h] BYREF
v3 = cocos2d::CCParticleSystemQuad::initWithTotalParticles(this, a2, 0);
v4 = v3;
if ( v3 )
{
*((_DWORD *)this + 173) = 0;
*((float *)this + 115) = -1.0;
cocos2d::CCPoint::CCPoint(&v11, 0.0, -90.0);
cocos2d::CCPoint::operator=((float *)this + 89, &v11);
*((_DWORD *)this + 91) = 1127481344;
*((_DWORD *)this + 95) = 0;
*((_DWORD *)this + 96) = 0;
*((_DWORD *)this + 92) = 1112014848;
v6 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)0x42480000);
cocos2d::CCDirector::getWinSize(&v10, v6);
v7 = *(void (__fastcall **)(cocos2d::CCParticleFireworks *, float *))(*(_QWORD *)this + 184LL);
cocos2d::CCPoint::CCPoint(&v11, *(float *)&v10 * 0.5, *((float *)&v10 + 1) * 0.5);
v7(this, &v11);
v8 = (float)*((unsigned int *)this + 165) / 3.5;
*((_DWORD *)this + 155) = 1045220557;
*((_DWORD *)this + 159) = 1045220557;
*((_DWORD *)this + 122) = 1119092736;
*((float *)this + 123) = 20.0;
*((float *)this + 120) = 3.5;
*((float *)this + 121) = 1.0;
*((float *)this + 144) = 0.5;
*((float *)this + 145) = 0.5;
*((float *)this + 146) = 0.5;
*((float *)this + 147) = 1.0;
*((float *)this + 148) = 0.5;
*((float *)this + 149) = 0.5;
*((float *)this + 164) = v8;
*((float *)this + 150) = 0.5;
*((float *)this + 140) = 8.0;
*((_DWORD *)this + 151) = 1036831949;
*((_DWORD *)this + 152) = 1036831949;
*((_DWORD *)this + 153) = 1036831949;
*((_DWORD *)this + 154) = 1036831949;
*((_DWORD *)this + 156) = 1036831949;
*((_DWORD *)this + 157) = 1036831949;
*((_DWORD *)this + 158) = 1036831949;
*((float *)this + 141) = 2.0;
*((float *)this + 142) = -1.0;
v9 = sub_D6B8F8((cocos2d::CCTextureCache *)0x3DCCCCCD);
if ( v9 )
(*(void (__fastcall **)(cocos2d::CCParticleFireworks *, __int64))(*(_QWORD *)this + 1520LL))(this, v9);
(*(void (__fastcall **)(cocos2d::CCParticleFireworks *, _QWORD))(*(_QWORD *)this + 1280LL))(this, 0);
}
return v4;
}