//
// cocos2d::ZipUtils::ccInflateCCZFile from 0x7faaf4 to 0x7fac16 (290 bytes)
//
// 1 xrefs:
// > cocos2d::CCTexturePVR::initWithContentsOfFile @ 0x80352e
//
// 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:14 +0000
//
int __fastcall cocos2d::ZipUtils::ccInflateCCZFile(cocos2d::ZipUtils *this, char *a2, unsigned __int8 **a3, int a4)
{
int v6; // r0
unsigned int *v7; // r0
unsigned int *v8; // r4
void *v9; // r0
int v10; // r8
unsigned int v12; // r2
size_t v13; // r5
int v15; // [sp+4h] [bp-Ch] BYREF
_DWORD v16[2]; // [sp+8h] [bp-8h] BYREF
v16[0] = a3;
v16[1] = a4;
v15 = 0;
v6 = cocos2d::CCFileUtils::sharedFileUtils(this);
v7 = (unsigned int *)(*(int (__fastcall **)(int, cocos2d::ZipUtils *, const char *, int *, cocos2d::ZipUtils *))(*(_DWORD *)v6 + 16))(
v6,
this,
"rb",
&v15,
this);
v8 = v7;
if ( !v7 || !v15 )
return -1;
if ( *v7 == 559563587 )
{
if ( ((unsigned __int16)(*((_WORD *)v7 + 3) << 8) | HIBYTE(*((unsigned __int16 *)v7 + 3))) > 2
|| (unsigned __int16)(*((_WORD *)v7 + 2) << 8) | HIBYTE(*((unsigned __int16 *)v7 + 2)) )
{
goto LABEL_7;
}
}
else
{
if ( *v7 != 1884963651 )
{
LABEL_8:
operator delete[](v7);
return -1;
}
if ( (unsigned __int16)(*((_WORD *)v7 + 3) << 8) | HIBYTE(*((unsigned __int16 *)v7 + 3))
|| (v12 = *((unsigned __int16 *)v7 + 2), (unsigned __int16)((_WORD)v12 << 8) | (v12 >> 8)) )
{
LABEL_7:
v7 = v8;
goto LABEL_8;
}
cocos2d::ZipUtils::ccDecodeEncodedPvr(v7 + 3, (unsigned int *)((unsigned int)(v15 - 12) >> 2), v12);
}
v13 = bswap32(v8[3]);
v9 = malloc(v13);
*(_DWORD *)a2 = v9;
if ( !v9 )
goto LABEL_7;
v16[0] = v13;
v10 = uncompress(v9, v16, v8 + 4, v15 - 16);
operator delete[](v8);
if ( v10 )
{
free(*(void **)a2);
*(_DWORD *)a2 = 0;
return -1;
}
return v13;
}