//
// cocos2d::ZipUtils::ccInflateMemoryWithHint from 0x7fa884 to 0x7fa952 (206 bytes)
//
// 1 xrefs:
// > cocos2d::ZipUtils::ccInflateMemoryWithHint @ 0x7fa978
//
// 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::ccInflateMemoryWithHint(
cocos2d::ZipUtils *this,
unsigned __int8 *a2,
void **a3,
unsigned __int8 **a4,
unsigned int *a5,
unsigned int a6)
{
unsigned int *v7; // r5
char *v11; // r0
int result; // r0
int v13; // r0
int v14; // r4
void *v15; // r0
cocos2d::ZipUtils *v16; // [sp+4h] [bp-40h] BYREF
unsigned __int8 *v17; // [sp+8h] [bp-3Ch]
char *v18; // [sp+10h] [bp-34h]
unsigned int *v19; // [sp+14h] [bp-30h]
int v20; // [sp+24h] [bp-20h]
int v21; // [sp+28h] [bp-1Ch]
int v22; // [sp+2Ch] [bp-18h]
v7 = a5;
v11 = (char *)operator new[]((unsigned int)a5);
v16 = this;
v20 = 0;
v21 = 0;
v22 = 0;
v17 = a2;
v19 = a5;
*a3 = v11;
v18 = v11;
result = inflateInit2_(&v16, 47, "1.2.8", 56);
if ( !result )
{
while ( 1 )
{
v13 = inflate(&v16, 0);
v14 = v13;
if ( v13 == 1 )
break;
switch ( v13 )
{
case -5:
if ( v17 )
goto LABEL_8;
inflateEnd(&v16);
return -3;
case -4:
case -3:
goto LABEL_5;
case 2:
v14 = -3;
LABEL_5:
inflateEnd(&v16);
return v14;
default:
LABEL_8:
v15 = realloc(*a3, 2 * (_DWORD)v7);
*a3 = v15;
if ( !v15 )
{
inflateEnd(&v16);
return -4;
}
v19 = v7;
v18 = (char *)v7 + (_DWORD)v15;
v7 = (unsigned int *)(2 * (_DWORD)v7);
break;
}
}
*a4 = (unsigned __int8 *)((char *)v7 - (char *)v19);
return inflateEnd(&v16);
}
return result;
}