//
// GJBaseGameLayer::claimParticle from 0x1002a166c to 0x1002a1814 (424 bytes)
//
// 2 xrefs:
// > GameObject::claimParticle @ 0x1002f9094
// > GameObject::claimParticle @ 0x1002f90cc
//
// 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 11:02:13 +0000
//
__int64 __fastcall GJBaseGameLayer::claimParticle(_QWORD *a1, char *a2)
{
char *v2; // x22
__int64 v4; // x20
__int64 v5; // x0
__int64 v6; // x21
__int64 v7; // x20
__int64 v8; // x23
__int64 v9; // x22
__int64 v10; // x21
__int64 v11; // x8
__int64 v12; // x0
__n128 v13; // q0
void *v15[2]; // [xsp+0h] [xbp-60h] BYREF
__int64 v16; // [xsp+10h] [xbp-50h]
void *__p[2]; // [xsp+18h] [xbp-48h] BYREF
char v18; // [xsp+2Fh] [xbp-31h]
v2 = a2;
v4 = a1[1535];
if ( a2[23] < 0 )
a2 = *(char **)a2;
sub_100009900(__p, a2);
v5 = cocos2d::CCDictionary::objectForKey(v4, __p);
v6 = v5;
if ( v18 < 0 )
{
operator delete(__p[0]);
if ( !v6 )
return 0;
}
else if ( !v5 )
{
return 0;
}
if ( !(unsigned int)sub_1002E757C(v6) )
return 0;
v7 = sub_1002E75B0(v6);
v8 = a1[1535];
if ( v2[23] < 0 )
{
sub_1000097D0(v15, *(void **)v2, *((_QWORD *)v2 + 1));
}
else
{
*(_OWORD *)v15 = *(_OWORD *)v2;
v16 = *((_QWORD *)v2 + 2);
}
GJBaseGameLayer::getParticleKey2((const char *)v15, __p);
v9 = cocos2d::CCDictionary::objectForKey(v8, __p);
if ( v18 < 0 )
operator delete(__p[0]);
if ( SHIBYTE(v16) < 0 )
operator delete(v15[0]);
sub_1002E74E0(v9, v7);
sub_1002E7648(v6, 1);
if ( !(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 512LL))(v7) )
{
v10 = a1[490];
v11 = a1[1552];
if ( v11 && *(_BYTE *)(v11 + 1078) == 1 && (unsigned int)(*(_DWORD *)(v11 + 1068) - 2) <= 5 )
v10 = a1[491];
v12 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 64LL))(v7);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v10 + 464LL))(v10, v7, v12);
}
v13 = sub_1002E74E0(a1[1544], v7);
(*(void (__fastcall **)(__int64, __int64, __n128))(*(_QWORD *)v7 + 344LL))(v7, 1, v13);
return v7;
}