//
// GManager::loadFromCompressedString from 0x588654 to 0x588768 (276 bytes)
//
// 3 xrefs:
// > GJAccountManager::onSyncAccountCompleted @ 0x848944
// > GJAccountManager::onSyncAccountCompleted @ 0x848950
// > ??> @ 0x79e30
//
// 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 __fastcall GManager::loadFromCompressedString(__int64 a1, cocos2d::ZipUtils *a2)
{
char *v4; // x0
unsigned int *v6; // x2
int v7; // w1
std::string v8; // [xsp+40h] [xbp+40h] BYREF
cocos2d::ZipUtils::decompressString(a2, nullptr, 11, _stack_chk_guard);
sub_D174B8(a2, 0, *(_QWORD *)(*(_QWORD *)a2 - 24LL), 0);
GManager::loadFromString(a1, &v8);
v4 = (char *)v8.m_data.m_data - 24;
if ( (__int64 *)v8.m_data.m_data - 3 != &qword_124B6B0 )
{
if ( &pthread_create )
{
v6 = (unsigned int *)((char *)v8.m_data.m_data - 8);
do
v7 = __ldaxr(v6);
while ( __stlxr(v7 - 1, v6) );
}
else
{
v7 = *((_DWORD *)v8.m_data.m_data - 2);
*((_DWORD *)v8.m_data.m_data - 2) = v7 - 1;
}
if ( v7 <= 0 )
operator delete(v4);
}
return _stack_chk_guard;
}