//
// png_read_finish_IDAT from 0xbe2cbc to 0xbe2d54 (152 bytes)
//
// 3 xrefs:
// > png_read_end @ 0xbd5b00
// > png_read_finish_row @ 0xbe3068
// > ??> @ 0xbc160
//
// 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
//
__int64 __fastcall png_read_finish_IDAT(__int64 a1)
{
__int64 result; // x0
int v3; // w0
int v4; // w1
if ( (*(_DWORD *)(a1 + 360) & 8) != 0
|| (png_read_IDAT_data(a1, 0, 0), *(_QWORD *)(a1 + 400) = 0, v3 = *(_DWORD *)(a1 + 360), (v3 & 8) != 0) )
{
result = 1229209940;
if ( *(_DWORD *)(a1 + 368) == 1229209940 )
{
LABEL_6:
*(_QWORD *)(a1 + 376) = 0;
*(_DWORD *)(a1 + 384) = 0;
*(_DWORD *)(a1 + 368) = 0;
return png_crc_finish((_DWORD *)a1, *(_DWORD *)(a1 + 656));
}
}
else
{
v4 = *(_DWORD *)(a1 + 356);
*(_DWORD *)(a1 + 360) = v3 | 8;
*(_DWORD *)(a1 + 356) = v4 | 8;
result = 1229209940;
if ( *(_DWORD *)(a1 + 368) == 1229209940 )
goto LABEL_6;
}
return result;
}