//
// GJEffectManager::getSaveString from 0x8b9718 to 0x8b98fc (484 bytes)
//
// 2 xrefs:
// > LevelSettingsObject::getSaveString @ 0x676d54
// > ??> @ 0x6d428
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 *__usercall GJEffectManager::getSaveString@(
__int64 *__return_ptr a1@,
GJEffectManager *this@,
int a3@,
int a4@,
int a5@,
int a6@)
{
int v6; // w3
cocos2d::CCDictionary *m_unkObject148; // x0
int v9; // w2
cocos2d::CCDictElement *m_pElements; // x0
_QWORD *next; // x19
__int64 m_pObject; // x0
size_t v13; // x25
size_t v14; // x24
_QWORD *v15; // x0
size_t v16; // x19
char v18; // [xsp+0h] [xbp+0h]
size_t v19; // [xsp+58h] [xbp+58h] BYREF
unsigned __int64 v20; // [xsp+60h] [xbp+60h]
char *v21; // [xsp+68h] [xbp+68h]
_BYTE v22[504]; // [xsp+70h] [xbp+70h] BYREF
v6 = 500;
m_unkObject148 = this->m_unkObject148;
v9 = _stack_chk_guard;
v19 = 0;
v20 = 500;
v21 = v22;
if ( m_unkObject148 && (m_pElements = m_unkObject148->m_pElements) != nullptr )
{
next = m_pElements->hh.next;
m_pObject = (__int64)m_pElements->m_pObject;
if ( *(int *)(m_pObject + 92) <= 999 )
goto LABEL_8;
while ( 1 )
{
LABEL_4:
ColorAction::writeSaveString(m_pObject, &v19, v9, v6, a3, a4, a5, a6, v18);
v13 = v19;
v14 = v19 + 1;
if ( v19 + 1 > v20 )
fmt::internal::Array::grow(&v19, v19 + 1);
v19 = v14;
v21[v13] = asc_EA06B0[0];
if ( !next )
break;
while ( 1 )
{
v15 = next;
next = (_QWORD *)next[36];
m_pObject = v15[33];
if ( *(int *)(m_pObject + 92) > 999 )
break;
LABEL_8:
v9 = *(unsigned __int8 *)(m_pObject + 72) == 255;
if ( ((unsigned __int8)v9 & (*(unsigned __int8 *)(m_pObject + 73) == 255)) == 0
|| *(unsigned __int8 *)(m_pObject + 74) != 255
|| *(_BYTE *)(m_pObject + 84)
|| *(float *)(m_pObject + 96) != 1.0
|| *(_DWORD *)(m_pObject + 120)
|| *(int *)(m_pObject + 88) > 0 )
{
goto LABEL_4;
}
if ( !next )
goto LABEL_15;
}
}
LABEL_15:
v16 = v19;
if ( v20 < v19 + 1 )
fmt::internal::Array::grow(&v19, v19 + 1);
}
else
{
v16 = 0;
}
v21[v16] = 0;
sub_D153B8((int)a1, v21);
if ( v21 != v22 && v21 )
operator delete[](v21);
return a1;
}