//
// GJEffectManager::getPersistentStateString from 0x5cfc80 to 0x5cff26 (678 bytes)
//
// 1 xrefs:
// > PlayLayer::resetLevel @ 0x4126da
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:54:04 +0000
//
GJEffectManager *__fastcall GJEffectManager::getPersistentStateString(GJEffectManager *this, _DWORD *a2)
{
unsigned int v3; // r1
_DWORD *i; // r7
int v6; // r9
unsigned int *v7; // r6
_DWORD *v8; // r0
_DWORD *v9; // r7
unsigned int *v10; // r0
unsigned int *v11; // r0
unsigned int v12; // r1
_DWORD *j; // r7
unsigned int *v14; // r6
_DWORD *v15; // r8
unsigned int *v16; // r0
const char *v17; // r2
size_t v18; // r3
int *v19; // r0
size_t v20; // r2
const char *v21; // r1
const char *v22; // r0
const char *v23; // r4
size_t v24; // r0
int *v26; // [sp+0h] [bp-254h]
int *v27; // [sp+0h] [bp-254h]
unsigned int *v28; // [sp+4h] [bp-250h]
int v29; // [sp+1Ch] [bp-238h] BYREF
int v30[3]; // [sp+20h] [bp-234h] BYREF
const char *v31; // [sp+2Ch] [bp-228h]
size_t v32; // [sp+30h] [bp-224h]
char *v33; // [sp+34h] [bp-220h] BYREF
int *v34; // [sp+38h] [bp-21Ch]
int *v35; // [sp+3Ch] [bp-218h]
int v36[3]; // [sp+40h] [bp-214h] BYREF
unsigned int v37[3]; // [sp+4Ch] [bp-208h] BYREF
char v38; // [sp+58h] [bp-1FCh] BYREF
v3 = a2[123];
if ( !v3 && !a2[128] )
{
*(_DWORD *)this = 0;
*((_DWORD *)this + 1) = 0;
*((_DWORD *)this + 2) = 0;
std::string::__init((int *)this, &unk_B6B226, 0);
return this;
}
v37[1] = 500;
v37[0] = 0;
v37[2] = (unsigned int)&v38;
if ( v3 )
{
v33 = nullptr;
v34 = nullptr;
v35 = nullptr;
std::vector::reserve(&v33, v3);
for ( i = (_DWORD *)a2[122]; i; i = (_DWORD *)*i )
{
if ( v34 == v35 )
{
std::vector::__push_back_slow_path((int)&v33, i + 2);
}
else
{
if ( v34 )
*v34 = i[2];
++v34;
}
}
LOBYTE(v29) = 0;
std::__sort &,int *>((int)v33, v34, &v29);
v6 = 0;
v7 = (unsigned int *)v33;
v26 = v34;
while ( v7 != (unsigned int *)v26 )
{
v8 = std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::find(
a2 + 120,
v7);
v9 = v8;
if ( v8 && v8[3] )
{
if ( v6 )
{
v31 = "|";
v32 = 0;
fmt::BasicWriter::operator<<(v37, "|", 0);
}
v10 = fmt::BasicWriter::operator<<(v37, *v7);
v31 = "|";
v32 = 0;
v11 = fmt::BasicWriter::operator<<(v10, "|", 0);
fmt::BasicWriter::operator<<(v11, v9[3]);
v6 = 1;
}
++v7;
}
v31 = "@";
v32 = 0;
fmt::BasicWriter::operator<<(v37, "@", 0);
std::__vector_base::~__vector_base(&v33);
}
else
{
v6 = 0;
}
v12 = a2[128];
if ( v12 )
{
v33 = nullptr;
v34 = nullptr;
v35 = nullptr;
std::vector::reserve(&v33, v12);
for ( j = (_DWORD *)a2[127]; j; j = (_DWORD *)*j )
{
if ( v34 == v35 )
{
std::vector::__push_back_slow_path((int)&v33, j + 2);
}
else
{
if ( v34 )
*v34 = j[2];
++v34;
}
}
LOBYTE(v30[0]) = 0;
std::__sort &,int *>((int)v33, v34, v30);
v14 = (unsigned int *)v33;
v27 = v34;
while ( v14 != (unsigned int *)v27 )
{
v15 = std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::find(
a2 + 141,
v14);
if ( v15 )
{
if ( j )
{
v31 = "|";
v32 = 0;
fmt::BasicWriter::operator<<(v37, "|", 0);
}
v16 = fmt::BasicWriter::operator<<(v37, *v14);
v30[1] = (int)"|";
v30[2] = 0;
v28 = fmt::BasicWriter::operator<<(v16, "|", 0);
timerItemToString(v36, (int)(v15 + 4));
if ( (v36[0] & 1) != 0 )
v17 = (const char *)v36[2];
else
v17 = (char *)v36 + 1;
v31 = v17;
if ( (v36[0] & 1) != 0 )
v18 = v36[1];
else
v18 = (int)LOBYTE(v36[0]) >> 1;
v32 = v18;
fmt::BasicWriter::operator<<(v28, v31, v18);
j = &dword_0 + 1;
std::string::~string((int)v36);
}
++v14;
}
std::__vector_base::~__vector_base(&v33);
if ( !v6 && !j )
goto LABEL_45;
LABEL_48:
v22 = (const char *)fmt::BasicWriter::c_str((int *)v37);
*(_DWORD *)this = 0;
*((_DWORD *)this + 1) = 0;
v23 = v22;
*((_DWORD *)this + 2) = 0;
v24 = strlen(v22);
v21 = v23;
v20 = v24;
v19 = (int *)this;
goto LABEL_46;
}
if ( v6 )
goto LABEL_48;
LABEL_45:
v19 = (int *)this;
v20 = 0;
*(_DWORD *)this = 0;
v21 = (const char *)&unk_B6B226;
*((_DWORD *)this + 1) = 0;
*((_DWORD *)this + 2) = 0;
LABEL_46:
std::string::__init(v19, v21, v20);
fmt::internal::Array::free((int)v37);
return this;
}