//
// png_image_begin_read_from_stdio from 0x867834 to 0x867882 (78 bytes)
//
// 0 xrefs:
//
// 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:48 +0000
//
int __fastcall png_image_begin_read_from_stdio(_DWORD *a1, int a2)
{
const char *v2; // r1
if ( !a1 )
return 0;
if ( a1[1] != 1 )
{
v2 = "png_image_begin_read_from_stdio: incorrect PNG_IMAGE_VERSION";
return png_image_error((int)a1, (int)v2);
}
if ( !a2 )
{
v2 = "png_image_begin_read_from_stdio: invalid argument";
return png_image_error((int)a1, (int)v2);
}
if ( !sub_867600(a1) )
return 0;
*(_DWORD *)(*(_DWORD *)*a1 + 288) = a2;
return png_safe_execute((int)a1, sub_8659E4, (int)a1);
}