//
// png_set_read_fn from 0xbd65a0 to 0xbd65f8 (88 bytes)
//
// 4 xrefs:
// > cocos2d::CCImage::_initWithPngData @ 0xb0bf68
// > png_set_progressive_read_fn @ 0xbd02fc
// > png_create_read_struct_2 @ 0xbd3304
// > ??> @ 0x42288
//
// 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_set_read_fn(
__int64 result,
__int64 a2,
size_t (__fastcall *a3)(size_t result, void *ptr, size_t a3))
{
_QWORD *v3; // x19
if ( result )
{
*(_QWORD *)(result + 320) = a2;
if ( !a3 )
a3 = png_default_read_data;
v3 = (_QWORD *)result;
result = *(_QWORD *)(result + 304);
v3[39] = a3;
if ( result )
{
v3[38] = 0;
result = png_warning((__int64)v3, "Can't set both read_data_fn and write_data_fn in the same structure");
}
v3[91] = 0;
}
return result;
}