//
// png_image_begin_read_from_stdio from 0xe4c318 to 0xe4c3a8 (144 bytes)
//
// 1 xrefs:
// > ??> @ 0xd8010
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:10:08 +0000
//
__int64 __fastcall png_image_begin_read_from_stdio(__int64 a1, __int64 a2)
{
const char *v2; // x1
if ( !a1 )
return 0;
if ( *(_DWORD *)(a1 + 8) != 1 )
{
v2 = "png_image_begin_read_from_stdio: incorrect PNG_IMAGE_VERSION";
return png_image_error(a1, (__int64)v2);
}
if ( !a2 )
{
v2 = "png_image_begin_read_from_stdio: invalid argument";
return png_image_error(a1, (__int64)v2);
}
if ( !(unsigned int)sub_E4BFB0((_QWORD *)a1) )
return 0;
*(_QWORD *)(**(_QWORD **)a1 + 320LL) = a2;
return png_safe_execute(a1, sub_E498D8, a1);
}