//
// png_read_sig from 0x86c688 to 0x86c6fc (116 bytes)
//
// 1 xrefs:
// > png_read_info @ 0x8656dc
//
// 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:02:55 +0000
//
int __fastcall png_read_sig(int result, int a2)
{
unsigned int v2; // r5
int v3; // r7
int v4; // r4
v2 = *(unsigned __int8 *)(result + 541);
if ( v2 <= 7 )
{
v3 = a2 + 32;
v4 = result;
*(_DWORD *)(result + 900) = 17;
png_read_data(result);
*(_BYTE *)(v4 + 541) = 8;
result = png_sig_cmp(v3, v2, 8 - v2);
if ( result )
{
if ( v2 <= 3 )
{
if ( png_sig_cmp(v3, v2, 4 - v2) )
png_error(v4, "Not a PNG file");
}
png_error(v4, "PNG file corrupted by ASCII conversion");
}
if ( v2 <= 2 )
*(_DWORD *)(v4 + 308) |= 0x1000u;
}
return result;
}