//
// inflateInit2_ from 0xf38bd4 to 0xf38cdc (264 bytes)
//
// 12 xrefs:
// > cocos2d::ZipUtils::ccInflateMemoryWithHint @ 0xd99f6c
// > cocos2d::unzOpenCurrentFile3 @ 0xd9f964
// > sub_E140FC @ 0xe1418c
// > sub_E14404 @ 0xe14544
// > sub_E14404 @ 0xe14584
// > sub_E3A9D0 @ 0xe3ab5c
// > sub_E3AE50 @ 0xe3afe4
// > sub_E54808 @ 0xe548b4
// > sub_E54B1C @ 0xe54ccc
// > inflateInit_ @ 0xf38cec
// > sub_F3F03C @ 0xf3f140
// > ??> @ 0x94468
//
// This function is hookable on this platform (idp: arm, 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 13:12:59 +0000
//
__int64 __fastcall inflateInit2_(_QWORD *a1, int a2, _BYTE *a3, int a4)
{
__int64 (__fastcall *v4)(); // x3
__int64 v5; // x2
__int64 v8; // x0
__int64 v9; // x20
unsigned int v10; // w21
__int64 result; // x0
if ( !a3 || *a3 != 49 || a4 != 112 )
return 4294967290LL;
if ( !a1 )
return 4294967294LL;
v4 = (__int64 (__fastcall *)())a1[8];
a1[6] = 0;
if ( v4 )
{
v5 = a1[10];
}
else
{
a1[10] = 0;
v4 = sub_F3E51C;
v5 = 0;
a1[8] = sub_F3E51C;
}
if ( !a1[9] )
a1[9] = sub_F3E524;
v8 = ((__int64 (__fastcall *)(__int64, __int64, __int64))v4)(v5, 1, 7152);
v9 = v8;
if ( !v8 )
return 4294967292LL;
a1[7] = v8;
*(_QWORD *)(v8 + 64) = 0;
v10 = inflateReset2((__int64)a1, a2);
result = 0;
if ( v10 )
{
((void (__fastcall *)(_QWORD, __int64))a1[9])(a1[10], v9);
a1[7] = 0;
return v10;
}
return result;
}