//
// GameToolbox::particleFromString from 0x1004f37e0 to 0x1004f38cc (236 bytes)
//
// 20 xrefs:
// > ParticleGameObject::updateParticle @ 0x1001929a1
// > LevelCell::playRecallUnlock @ 0x10023ab0c
// > LevelAreaLayer::init @ 0x100264983
// > GJDifficultySprite::updateFeatureState @ 0x1002a5019
// > GJPathPage::playUnlockAnimation @ 0x1002ebf09
// > GJPathPage::unlockAnimationStep2 @ 0x1002ec943
// > GJPathPage::unlockAnimationStep3 @ 0x1002ecfcc
// > GJPathPage::unlockAnimationStep3 @ 0x1002ed1d8
// > LevelPage::updateDynamicPage @ 0x1004209f4
// > LevelPage::updateDynamicPage @ 0x100420ac8
// > LevelPage::updateDynamicPage @ 0x100420bae
// > CreateParticlePopup::init @ 0x1004630ee
// > CreateParticlePopup::init @ 0x10046310b
// > CreateParticlePopup::init @ 0x1004670d0
// > CreateParticlePopup::init @ 0x10046720d
// > SecretLayer5::onSubmit @ 0x10046ff87
// > GauntletSelectLayer::playUnlockAnimation @ 0x1005a075e
// > GauntletSelectLayer::unlockAnimationStep2 @ 0x1005a0d4e
// > GauntletSelectLayer::unlockAnimationStep3 @ 0x1005a102e
// > GauntletSelectLayer::unlockAnimationStep3 @ 0x1005a11d1
//
// 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 12:31:25 +0000
//
__int64 __fastcall GameToolbox::particleFromString(unsigned __int8 *a1, __int64 a2, unsigned __int8 a3)
{
__int64 v4; // rbx
unsigned int v5; // eax
_QWORD v7[33]; // [rsp+0h] [rbp-130h] BYREF
__int128 v8; // [rsp+108h] [rbp-28h]
void *__p; // [rsp+118h] [rbp-18h]
v4 = a2;
v5 = *a1;
if ( (v5 & 1) != 0 )
{
if ( !*((_QWORD *)a1 + 1) )
return v4;
}
else if ( !(v5 >> 1) )
{
return v4;
}
memset(v7, 0, 221);
memset(&v7[28], 0, 21);
*(_OWORD *)&v7[31] = 0;
v8 = 0;
__p = nullptr;
GameToolbox::particleStringToStruct(a1, (__int64)v7);
v4 = GameToolbox::particleFromStruct(v7, a2, a3);
if ( (v8 & 1) != 0 )
operator delete(__p);
return v4;
}