//
// GameObject::createAndAddParticle from 0x140295be0 to 0x140295d0e (302 bytes)
//
// 41 xrefs:
// > EndPortalObject::init @ 0x140208fac
// > GameObject::customSetup @ 0x14028e986
// > GameObject::customSetup @ 0x14028ea16
// > GameObject::customSetup @ 0x14028eb51
// > GameObject::customSetup @ 0x14028eba0
// > GameObject::customSetup @ 0x14028ec06
// > GameObject::customSetup @ 0x14028ec9e
// > GameObject::customSetup @ 0x14028ed31
// > GameObject::customSetup @ 0x14028edc4
// > GameObject::customSetup @ 0x14028ee99
// > GameObject::customSetup @ 0x14028ef5f
// > GameObject::customSetup @ 0x14028f025
// > GameObject::customSetup @ 0x14028f0eb
// > GameObject::customSetup @ 0x14028f1bc
// > GameObject::customSetup @ 0x14028f29c
// > GameObject::customSetup @ 0x14028f369
// > GameObject::customSetup @ 0x14028f8ac
// > GameObject::customSetup @ 0x14028f910
// > GameObject::customSetup @ 0x14028f974
// > GameObject::customSetup @ 0x14028f9d8
// > GameObject::customSetup @ 0x14028fa3c
// > GameObject::customSetup @ 0x14028fb06
// > GameObject::customSetup @ 0x14028fb6a
// > GameObject::customSetup @ 0x14028fc18
// > GameObject::customSetup @ 0x14028fc8e
// > GameObject::customSetup @ 0x14028fd7f
// > GameObject::customSetup @ 0x14028fe82
// > GameObject::customSetup @ 0x14028ff85
// > GameObject::customSetup @ 0x140290063
// > GameObject::customSetup @ 0x140290171
// > GameObject::customSetup @ 0x14029025e
// > GameObject::customSetup @ 0x14029033c
// > GameObject::customSetup @ 0x14029041a
// > GameObject::customSetup @ 0x1402904f8
// > GameObject::customSetup @ 0x140290a2a
// > GameObject::commonInteractiveSetup @ 0x140293f78
// > EnhancedGameObject::customSetup @ 0x1402a23c5
// > EnhancedGameObject::customSetup @ 0x1402a2503
// > EnhancedGameObject::customSetup @ 0x1402a28ff
// > EnhancedGameObject::updateUserCoin @ 0x1402a3a0f
// > ??> @ 0x14091d630
//
// 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:29:10 +0000
//
// Hidden C++ exception states: #wind=3
__int64 __fastcall GameObject::createAndAddParticle(__int64 a1, int a2, int a3, int a4, int a5)
{
__int64 v9; // rcx
__int64 v10; // rcx
int v11; // ecx
__int64 Particle; // r15
__int64 ParticleKey; // rax
void *v15; // [rsp+30h] [rbp-68h]
void *v16; // [rsp+30h] [rbp-68h]
_BYTE v17[32]; // [rsp+38h] [rbp-60h] BYREF
v9 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v15 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v15);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v9 = qword_14090BFD0;
}
v10 = *(_QWORD *)(v9 + 560);
if ( !v10 || *(_BYTE *)(a1 + 1053) )
return 0;
Particle = GJBaseGameLayer::createParticle(v10, a2, a3, a4, a5);
if ( !qword_14090BFD0 )
{
v16 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v16);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
}
ParticleKey = GJBaseGameLayer::getParticleKey(v11, (unsigned int)v17, a2, a3, a4, a5);
sub_140059C40(a1 + 784, ParticleKey);
sub_14003D310((__int64)v17);
*(_BYTE *)(a1 + 816) = 1;
return Particle;
}