//
// png_set_write_fn from 0xbe6324 to 0xbe6370 (76 bytes)
//
// 2 xrefs:
// > png_create_write_struct_2 @ 0xbe753c
// > ??> @ 0x7f170
//
// 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
//
_QWORD *__fastcall png_set_write_fn(
_QWORD *result,
__int64 a2,
size_t (__fastcall *a3)(size_t result, void *ptr, size_t a3),
__int64 (__fastcall *a4)(__int64 result))
{
__int64 v4; // x1
if ( result )
{
result[40] = a2;
if ( !a3 )
a3 = png_default_write_data;
result[38] = a3;
if ( !a4 )
a4 = png_default_flush;
v4 = result[39];
result[91] = a4;
if ( v4 )
{
result[39] = 0;
return (_QWORD *)png_warning(
(__int64)result,
"Can't set both read_data_fn and write_data_fn in the same structure");
}
}
return result;
}