//
// GameToolbox::particleFromString from 0x584060 to 0x5842a0 (576 bytes)
//
// 19 xrefs:
// > ParticleGameObject::updateParticle @ 0x7555ec
// > LevelPage::updateDynamicPage @ 0x79fafc
// > LevelPage::updateDynamicPage @ 0x79fbb4
// > LevelPage::updateDynamicPage @ 0x79fc6c
// > GJDifficultySprite::updateFeatureState @ 0x8da2d0
// > GauntletSelectLayer::unlockAnimationStep2 @ 0x918444
// > GauntletSelectLayer::unlockAnimationStep3 @ 0x918908
// > GauntletSelectLayer::unlockAnimationStep3 @ 0x918a90
// > GauntletSelectLayer::playUnlockAnimation @ 0x918ea0
// > CreateParticlePopup::init @ 0x9c573c
// > CreateParticlePopup::init @ 0x9c575c
// > CreateParticlePopup::init @ 0x9c8984
// > LevelAreaLayer::init @ 0xa30030
// > GJPathPage::unlockAnimationStep2 @ 0xa6d5e4
// > GJPathPage::playUnlockAnimation @ 0xa6e1c8
// > GJPathPage::unlockAnimationStep3 @ 0xa6eadc
// > GJPathPage::unlockAnimationStep3 @ 0xa6ebd0
// > SecretLayer5::onSubmit @ 0xa955c4
// > ??> @ 0x53160
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
cocos2d::CCParticleSystemQuad *__fastcall GameToolbox::particleFromString(
_QWORD *a1,
cocos2d::CCParticleSystemQuad *a2,
bool a3)
{
cocos2d::CCParticleSystemQuad *v5; // x20
char *v7; // x0
unsigned int *v8; // x1
int v9; // w2
cocos2d::ParticleStruct v10; // [xsp+48h] [xbp+48h] BYREF
v5 = a2;
if ( *(_QWORD *)(*a1 - 24LL) )
{
memset(&v10, 0, 221);
memset(&v10.frictionPos, 0, 21);
v10.frictionSize = 0.0;
v10.sFrame.m_data.m_data = (stl::StringData::Internal *)&byte_124B6C8;
v10.frictionSizeVar = 0.0;
v10.frictionRot = 0.0;
v10.frictionRotVar = 0.0;
GameToolbox::particleStringToStruct(a1, (__int64)&v10);
v5 = GameToolbox::particleFromStruct(&v10, a2, a3);
v7 = (char *)v10.sFrame.m_data.m_data - 24;
if ( (__int64 *)v10.sFrame.m_data.m_data - 3 != &qword_124B6B0 )
{
if ( &pthread_create )
{
v8 = (unsigned int *)((char *)v10.sFrame.m_data.m_data - 8);
do
v9 = __ldaxr(v8);
while ( __stlxr(v9 - 1, v8) );
}
else
{
v9 = *((_DWORD *)v10.sFrame.m_data.m_data - 2);
*((_DWORD *)v10.sFrame.m_data.m_data - 2) = v9 - 1;
}
if ( v9 <= 0 )
operator delete(v7);
}
}
return v5;
}