//
// deflateResetKeep from 0x739330 to 0x7393aa (122 bytes)
//
// 1 xrefs:
// > deflateReset @ 0x7393b0
//
// 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
//
int __fastcall deflateResetKeep(_DWORD *a1)
{
_DWORD *v1; // r5
int v3; // r2
int v4; // r1
bool v5; // zf
bool v6; // nf
unsigned int v7; // r0
if ( !a1 )
return -2;
v1 = (_DWORD *)a1[7];
if ( v1 && a1[8] && a1[9] )
{
a1[5] = 0;
a1[2] = 0;
a1[6] = 0;
a1[11] = 2;
v3 = v1[6];
v4 = v1[2];
v5 = v3 == 0;
v6 = v3 < 0;
v1[5] = 0;
if ( v3 < 0 )
{
v3 = -v3;
v1[6] = v3;
}
v1[4] = v4;
if ( v6 || !v5 )
{
v1[1] = 42;
if ( v3 == 2 )
{
v7 = crc32(0, nullptr, 0);
goto LABEL_12;
}
}
else
{
v1[1] = 113;
}
v7 = adler32(0, nullptr, 0);
LABEL_12:
a1[12] = v7;
v1[10] = 0;
sub_73F9B0(v1);
return 0;
}
return -2;
}