//
// sub_6F53C8 from 0x6f53c8 to 0x6f54d4 (268 bytes)
//
// 3 xrefs:
// > TIFFInitZIP @ 0x6f6270
// > TIFFInitZIP @ 0x6f6274
// > ??> @ 0x6f639c
//
// 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 sub_6F53C8(int a1)
{
int v4; // [sp+Ch] [bp-8h]
v4 = *(_DWORD *)(a1 + 576);
if ( !v4 )
_assert2();
if ( (*(_DWORD *)(v4 + 124) & 2) != 0 )
{
j_deflateEnd(v4 + 64);
*(_DWORD *)(v4 + 124) = 0;
}
if ( j_inflateInit_(v4 + 64, "1.2.3", 56) )
{
TIFFErrorExt(*(_DWORD *)(a1 + 628), (int)"ZIPSetupDecode", "%s", *(const char **)(v4 + 88));
return 0;
}
else
{
*(_DWORD *)(v4 + 124) |= 1u;
return 1;
}
}