//
// sub_904F88 from 0x904f88 to 0x905094 (268 bytes)
//
// 3 xrefs:
// > TIFFInitZIP @ 0x905e30
// > TIFFInitZIP @ 0x905e34
// > ??> @ 0x905f5c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:04:18 +0000
//
int __fastcall sub_904F88(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;
}
}