//
// inflateResetKeep from 0xcc28cc to 0xcc2948 (124 bytes)
//
// 2 xrefs:
// > inflateReset @ 0xcc2960
// > ??> @ 0x86208
//
// 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 inflateResetKeep(_QWORD *a1)
{
__int64 v1; // x1
int v2; // w2
if ( !a1 )
return 4294967294LL;
v1 = a1[7];
if ( !v1 )
return 4294967294LL;
*(_QWORD *)(v1 + 32) = 0;
v2 = *(_DWORD *)(v1 + 8);
a1[5] = 0;
a1[2] = 0;
a1[6] = 0;
if ( v2 )
a1[12] = v2 & 1;
*(_QWORD *)(v1 + 136) = v1 + 1360;
*(_QWORD *)(v1 + 104) = v1 + 1360;
*(_QWORD *)(v1 + 96) = v1 + 1360;
*(_DWORD *)v1 = 0;
*(_DWORD *)(v1 + 7136) = 1;
*(_DWORD *)(v1 + 4) = 0;
*(_DWORD *)(v1 + 12) = 0;
*(_DWORD *)(v1 + 20) = 0x8000;
*(_QWORD *)(v1 + 40) = 0;
*(_QWORD *)(v1 + 72) = 0;
*(_DWORD *)(v1 + 80) = 0;
*(_DWORD *)(v1 + 7140) = -1;
return 0;
}