//
// inflateBackInit_ from 0xcbfff4 to 0xcc00f4 (256 bytes)
//
// 1 xrefs:
// > ??> @ 0x82518
//
// 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 inflateBackInit_(_QWORD *a1, int a2, __int64 a3, _BYTE *a4, int a5)
{
__int64 (__fastcall *v8)(); // x3
__int64 v9; // x0
__int64 v10; // x0
__int64 v11; // x1
__int64 result; // x0
__int64 v13; // x1
if ( !a4 || *a4 != 49 || a5 != 112 )
return 4294967290LL;
if ( !a1 || !a3 || (unsigned int)(a2 - 8) > 7 )
return 4294967294LL;
v8 = (__int64 (__fastcall *)())a1[8];
a1[6] = 0;
if ( v8 )
{
v9 = a1[10];
if ( a1[9] )
goto LABEL_9;
}
else
{
v13 = a1[9];
v8 = sub_CC835C;
a1[10] = 0;
a1[8] = sub_CC835C;
v9 = 0;
if ( v13 )
goto LABEL_9;
}
a1[9] = sub_CC8364;
LABEL_9:
v10 = ((__int64 (__fastcall *)(__int64, __int64, __int64))v8)(v9, 1, 7152);
v11 = v10;
if ( !v10 )
return 4294967292LL;
a1[7] = v10;
*(_DWORD *)(v10 + 20) = 0x8000;
result = 0;
*(_DWORD *)(v11 + 48) = a2;
*(_DWORD *)(v11 + 52) = 1 << a2;
*(_QWORD *)(v11 + 64) = a3;
*(_DWORD *)(v11 + 60) = 0;
*(_DWORD *)(v11 + 56) = 0;
return result;
}