//
// cocos2d::ZipUtils::ccInflateMemoryWithHint from 0x1800a7330 to 0x1800a7484 (340 bytes)
//
// 6 xrefs:
// > cocos2d::ZipUtils::ccInflateMemory @ 0x1800a72fe
// > cocos2d::ZipUtils::ccInflateMemoryWithHint @ 0x1800a74ab
// > cocos2d::ZipUtils::decompressString2 @ 0x1800a7950
// > cocos2d::ZipUtils::decompressString @ 0x1800a7bc5
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c1dc4
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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 11:22:16 +0000
//
__int64 __fastcall cocos2d::ZipUtils::ccInflateMemoryWithHint(
unsigned __int8 *a1,
int a2,
unsigned __int8 **a3,
unsigned int *a4,
signed int a5)
{
signed int v5; // esi
unsigned __int8 *v10; // rax
__int64 result; // rax
__int64 v12; // rdx
unsigned int i; // ebx
unsigned __int8 *v14; // rax
__int64 v15; // rdx
unsigned __int8 *v16; // [rsp+20h] [rbp-68h] BYREF
int v17; // [rsp+28h] [rbp-60h]
unsigned __int8 *v18; // [rsp+30h] [rbp-58h]
signed int v19; // [rsp+38h] [rbp-50h]
__int64 v20; // [rsp+50h] [rbp-38h]
__int64 v21; // [rsp+58h] [rbp-30h]
__int64 v22; // [rsp+60h] [rbp-28h]
v5 = a5;
v10 = (unsigned __int8 *)sub_1800E4C6C(a5);
*a3 = v10;
v20 = 0;
v21 = 0;
v22 = 0;
v16 = a1;
v17 = a2;
v18 = v10;
v19 = a5;
result = inflateInit2_(&v16, 47, "1.3.0", 88);
if ( !(_DWORD)result )
{
for ( i = inflate(&v16, 0); i != 1; i = inflate(&v16, 0) )
{
if ( i == -5 )
{
if ( !v17 )
{
inflateEnd(&v16, v12);
return 4294967293LL;
}
}
else
{
if ( i + 4 <= 1 )
goto LABEL_7;
if ( i == 2 )
{
i = -3;
LABEL_7:
inflateEnd(&v16, v12);
return i;
}
}
v14 = (unsigned __int8 *)realloc(*a3, 2 * v5);
*a3 = v14;
if ( !v14 )
{
inflateEnd(&v16, v15);
return 4294967292LL;
}
v19 = v5;
v18 = &v14[v5];
v5 *= 2;
}
*a4 = v5 - v19;
return inflateEnd(&v16, v12);
}
return result;
}