//
// png_set_compression_window_bits from 0x663120 to 0x663156 (54 bytes)
//
// 0 xrefs:
//
// 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 png_set_compression_window_bits(int result, int a2)
{
int v2; // r4
if ( result )
{
v2 = result;
if ( a2 > 15 )
{
result = png_warning(result, "Only compression windows <= 32k supported by PNG");
*(_DWORD *)(v2 + 396) = 15;
}
else if ( a2 <= 7 )
{
result = png_warning(result, "Only compression windows >= 256 supported by PNG");
*(_DWORD *)(v2 + 396) = 8;
}
else
{
*(_DWORD *)(result + 396) = a2;
}
}
return result;
}