//
// cocos2d::ZipUtils::decompressString from 0x7fb280 to 0x7fb392 (274 bytes)
//
// 19 xrefs:
// > GManager::loadFromCompressedString @ 0x3d4142
// > PlayLayer::loadPersistentCheckpoint @ 0x402b72
// > PlayLayer::loadPersistentCheckpoint @ 0x402ca0
// > PlayLayer::addLiveStartPosObject @ 0x4067c4
// > PlayLayer::init @ 0x40b288
// > LevelEditorLayer::init @ 0x4762f2
// > LevelInfoLayer::loadReplay @ 0x49a3c2
// > GJGameLevel::copyLevelInfo @ 0x4c0c6c
// > GameLevelManager::onGetLevelSaveDataCompleted @ 0x4c1c8a
// > GJGameLevel::ensureSessionLog @ 0x4ca790
// > GJGameLevel::dataLoaded @ 0x4cb844
// > GameLevelManager::applyDeathBlob @ 0x4d96c0
// > LocalLevelManager::importLevelsFromPaths @ 0x542d5c
// > LocalLevelManager::tryRecoverAutoSaves @ 0x5438d2
// > GJAccountManager::onSyncAccountCompleted @ 0x58297a
// > GJAccountManager::onSyncAccountCompleted @ 0x582a74
// > EditorSFXManager::summarizeBlob @ 0x7803c2
// > EditorSFXManager::importFromString @ 0x7812c2
// > LevelStatsInfoPopup::buildInfoText @ 0x79bdaa
//
// 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 12:01:15 +0000
//
int *__fastcall cocos2d::ZipUtils::decompressString(int *a1, unsigned __int8 *a2, int a3, char a4)
{
int v6; // r1
int v7; // r0
int v8; // r1
cocos2d *v9; // r0
unsigned __int8 **v10; // r3
unsigned __int8 *v11; // r8
int v12; // r1
cocos2d *v13; // r0
unsigned __int8 *v14; // r2
int v15; // r0
int v16; // r1
int v17; // r2
cocos2d::ZipUtils *v19; // [sp+0h] [bp-1Ch] BYREF
void *v20; // [sp+4h] [bp-18h] BYREF
int v21; // [sp+8h] [bp-14h] BYREF
int v22; // [sp+Ch] [bp-10h]
cocos2d *v23; // [sp+10h] [bp-Ch]
v6 = *a2;
v7 = v6 & 1;
if ( (v6 & 1) != 0 )
v8 = *((_DWORD *)a2 + 1);
else
v8 = v6 >> 1;
if ( v8 <= 0 )
{
LABEL_25:
std::string::basic_string(a1, (int)a2);
return a1;
}
v19 = nullptr;
if ( a3 )
{
cocos2d::ZipUtils::encryptDecrypt((int)&v21, a2, a4);
if ( (v21 & 1) != 0 )
{
v12 = v22;
v13 = v23;
}
else
{
v12 = (int)(unsigned __int8)v21 >> 1;
v13 = (cocos2d *)((char *)&v21 + 1);
}
v11 = (unsigned __int8 *)base64Decode(
v13,
(const unsigned __int8 *)v12,
(void **)&v19,
(unsigned int *)((char *)&dword_0 + 1));
std::string::~string((int)&v21);
}
else
{
if ( v7 )
v9 = *((cocos2d **)a2 + 2);
else
v9 = (cocos2d *)(a2 + 1);
v11 = (unsigned __int8 *)base64Decode(
v9,
(const unsigned __int8 *)v8,
(void **)&v19,
(unsigned int *)((char *)&dword_0 + 1));
}
if ( (int)v11 <= 0 )
{
if ( v19 )
{
operator delete[](v19);
v19 = nullptr;
}
goto LABEL_25;
}
v20 = nullptr;
v14 = cocos2d::ZipUtils::ccInflateMemory(v19, v11, &v20, v10, (unsigned int)v19);
if ( (int)v14 <= 0 )
{
if ( v19 )
{
operator delete[](v19);
v19 = nullptr;
}
if ( v20 )
{
operator delete[](v20);
v20 = nullptr;
}
goto LABEL_25;
}
v21 = 0;
v22 = 0;
v23 = nullptr;
std::string::append(&v21, v20, (size_t)v14);
if ( v19 )
{
operator delete[](v19);
v19 = nullptr;
}
if ( v20 )
{
operator delete[](v20);
v20 = nullptr;
}
v15 = v21;
v16 = v22;
v17 = (int)v23;
v21 = 0;
v22 = 0;
v23 = nullptr;
*a1 = v15;
a1[1] = v16;
a1[2] = v17;
std::string::~string((int)&v21);
return a1;
}