//
// CreateParticlePopup::onClose from 0xaff368 to 0xaff4d4 (364 bytes)
//
// 4 xrefs:
// > CreateParticlePopup::keyBackClicked @ 0xaff4d8
// > ??> @ 0x704c8
// > CreateParticlePopup::init @ 0xb01944
// > ??> @ 0x1542ce0
//
// 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:01:19 +0000
//
__int64 __fastcall CreateParticlePopup::onClose(cocos2d::CCArray **this, cocos2d::CCObject *a2)
{
__int64 v3; // x19
cocos2d::CCArray *v5; // x0
unsigned int i; // w19
ParticleGameObject *v7; // x21
GameToolbox *v8; // x23
__int64 v9[2]; // [xsp+50h] [xbp+50h] BYREF
void *v10; // [xsp+60h] [xbp+60h]
CreateParticlePopup::willClose(this);
v3 = (__int64)*(this + 85);
if ( v3 )
{
GameToolbox::saveParticleToString(*(this + 89), v9);
ParticleGameObject::setParticleString(v3, (__int64)v9);
if ( (v9[0] & 1) != 0 )
operator delete(v10);
*((_DWORD *)*(this + 85) + 443) = *((_DWORD *)this + 249);
*((_BYTE *)*(this + 85) + 1768) = *((_BYTE *)*(this + 89) + 740);
ParticleGameObject::updateParticle(*(this + 85));
}
else
{
v5 = *(this + 86);
if ( v5 )
{
for ( i = 0; i < (unsigned int)cocos2d::CCArray::count(v5); ++i )
{
v7 = (ParticleGameObject *)cocos2d::CCArray::objectAtIndex(*(this + 86), i);
v8 = (GameToolbox *)cocos2d::CCArray::objectAtIndex(*(this + 87), i);
GameToolbox::saveParticleToString(v8, v9);
ParticleGameObject::setParticleString((__int64)v7, (__int64)v9);
if ( (v9[0] & 1) != 0 )
operator delete(v10);
*((_BYTE *)v7 + 1768) = *((_BYTE *)v8 + 740);
ParticleGameObject::updateParticle(v7);
v5 = *(this + 86);
}
}
}
(*((void (__fastcall **)(cocos2d::CCArray **, __int64))*this + 66))(this, 1);
return _stack_chk_guard;
}