//
// png_set_read_fn from 0x657a90 to 0x657ac6 (54 bytes)
//
// 3 xrefs:
// > cocos2d::CCImage::_initWithPngData @ 0x5e1b3a
// > png_set_progressive_read_fn @ 0x65326c
// > png_create_read_struct_2 @ 0x655628
//
// 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_set_read_fn(
_DWORD *result,
int a2,
size_t (__fastcall *a3)(size_t result, void *ptr, size_t a3))
{
int v3; // r3
_DWORD *v4; // r4
if ( result )
{
result[72] = a2;
if ( !a3 )
a3 = png_default_read_data;
v3 = result[70];
v4 = result;
result[71] = a3;
if ( v3 )
{
result[70] = 0;
result = (_DWORD *)png_warning((int)result, "Can't set both read_data_fn and write_data_fn in the same structure");
}
v4[143] = 0;
}
return result;
}