//
// cocos2d::ZipUtils::ccInflateGZipFile from 0xb2a9c4 to 0xb2aaa0 (220 bytes)
//
// 2 xrefs:
// > cocos2d::CCTexturePVR::initWithContentsOfFile @ 0xb37ddc
// > ??> @ 0x80610
//
// 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 cocos2d::ZipUtils::ccInflateGZipFile(cocos2d::ZipUtils *this, char *a2, unsigned __int8 **a3)
{
__int64 v4; // x23
unsigned int v5; // w21
unsigned int v6; // w19
unsigned int v7; // w20
char *v8; // x0
char *v9; // x1
bool v10; // cc
int v11; // w0
v4 = gzopen(this, "rb", a3);
if ( !v4 )
return 0xFFFFFFFFLL;
v5 = 0x80000;
v6 = 0x80000;
v7 = 0;
v8 = (char *)malloc(0x80000u);
v9 = v8;
while ( 1 )
{
*(_QWORD *)a2 = v8;
v11 = gzread(v4, &v9[v7]);
if ( v11 < 0 )
{
LABEL_7:
free(*(void **)a2);
*(_QWORD *)a2 = 0;
return 0xFFFFFFFFLL;
}
if ( !v11 )
break;
v10 = v6 > v11;
v6 *= 2;
v5 += v6;
v7 += v11;
if ( v10 )
break;
v8 = (char *)realloc(*(void **)a2, v5);
v9 = v8;
if ( !v8 )
goto LABEL_7;
}
gzclose(v4);
return v7;
}