//
// png_read_finish_IDAT from 0x65f324 to 0x65f39a (118 bytes)
//
// 2 xrefs:
// > png_read_end @ 0x657356
// > png_read_finish_row @ 0x65f438
//
// 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
//
_DWORD *__fastcall png_read_finish_IDAT(_DWORD *result)
{
_DWORD *v1; // r5
int v2; // r3
v1 = result;
if ( (result[78] & 8) != 0 )
{
if ( result[80] != 1229209940 )
return result;
LABEL_7:
v1[81] = 0;
v1[82] = 0;
v1[80] = 0;
return (_DWORD *)png_crc_finish(v1, v1[127]);
}
result = (_DWORD *)png_read_IDAT_data(result, 0, 0);
v2 = v1[78];
v1[84] = 0;
if ( (v2 & 8) == 0 )
{
v1[78] = v2 | 8;
v1[77] |= 8u;
}
if ( v1[80] == 1229209940 )
goto LABEL_7;
return result;
}