//
// GJBaseGameLayer::getParticleKey from 0x9ef9b8 to 0x9efbec (564 bytes)
//
// 3 xrefs:
// > GameObject::createAndAddParticle @ 0x778f08
// > GJBaseGameLayer::createParticle @ 0x9efc58
// > ??> @ 0x721d8
//
// 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 12:59:06 +0000
//
__int64 *__usercall GJBaseGameLayer::getParticleKey@(
unsigned int a1@,
const char *a2@,
unsigned int a3@,
unsigned int a4@,
__int64 *a5@)
{
size_t v9; // x0
size_t v10; // x20
size_t v11; // x24
unsigned __int64 v12; // x27
size_t v13; // x23
size_t v14; // x0
const char *v15; // x1
size_t v16; // x0
void *v18; // [xsp+68h] [xbp+68h]
char *v19; // [xsp+68h] [xbp+68h]
__int64 v20[2]; // [xsp+90h] [xbp+90h] BYREF
char *v21; // [xsp+A0h] [xbp+A0h]
size_t v22; // [xsp+A8h] [xbp+A8h] BYREF
size_t v23; // [xsp+B0h] [xbp+B0h]
_BYTE *v24; // [xsp+B8h] [xbp+B8h]
_BYTE v25[504]; // [xsp+C0h] [xbp+C0h] BYREF
v22 = 0;
v23 = 500;
v24 = v25;
fmt::BasicWriter::FormatInt,char>>(&v22, a1);
if ( a2 )
{
v9 = strlen(a2);
v10 = v22;
v11 = v9;
v12 = v9 + v22;
if ( v9 + v22 <= v23 )
goto LABEL_3;
}
else
{
v10 = v22;
if ( v22 <= v23 )
goto LABEL_5;
v12 = v22;
v11 = 0;
}
fmt::internal::Array::grow(&v22, v12);
LABEL_3:
v22 = v12;
if ( v11 )
memmove(&v24[v10], a2, v11);
LABEL_5:
fmt::BasicWriter::FormatInt,char>>(&v22, a3);
fmt::BasicWriter::FormatInt,char>>(&v22, a4);
v13 = v22;
if ( v23 < v22 + 1 )
fmt::internal::Array::grow(&v22, v22 + 1);
v24[v13] = 0;
v20[0] = 0;
v20[1] = 0;
v21 = nullptr;
v18 = v24;
v14 = strlen(v24);
std::string::__init(v20, v18, v14);
v15 = (char *)v20 + 1;
if ( (v20[0] & 1) != 0 )
v15 = v21;
*a5 = 0;
a5[1] = 0;
a5[2] = 0;
v19 = (char *)v15;
v16 = strlen(v15);
std::string::__init(a5, v19, v16);
if ( (v20[0] & 1) != 0 )
operator delete(v21);
if ( v24 != v25 && v24 )
operator delete[](v24);
return a5;
}