//
// gzrewind from 0x7408e0 to 0x740950 (112 bytes)
//
// 1 xrefs:
// > gzseek64 @ 0x7409d4
//
// 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 gzrewind(_BOOL4 *a1)
{
int v1; // r2
bool v2; // zf
_BOOL4 v3; // r5
void *v5; // r0
int v6; // r3
if ( !a1 )
return -1;
if ( a1[3] != 7247 )
return -1;
v1 = a1[19];
v2 = v1 == 0;
if ( v1 )
v2 = v1 == -5;
v3 = !v2;
if ( !v2 || lseek(a1[4], a1[12], v3) == -1 )
return -1;
v5 = (void *)a1[20];
v6 = a1[3];
*a1 = v3;
if ( v6 == 7247 )
{
a1[13] = v3;
a1[14] = v3;
a1[11] = v3;
}
a1[18] = 0;
if ( v5 )
{
if ( a1[19] != -4 )
free(v5);
a1[20] = 0;
}
a1[19] = 0;
a1[2] = 0;
a1[22] = 0;
return 0;
}