//
// png_write_chunk_data from 0x66412c to 0x664154 (40 bytes)
//
// 49 xrefs:
// > png_write_chunk @ 0x6641ea
// > png_write_IHDR @ 0x66436e
// > png_write_PLTE @ 0x664540
// > png_compress_IDAT @ 0x6646aa
// > png_compress_IDAT @ 0x6647f6
// > png_write_IEND @ 0x66490a
// > png_write_gAMA_fixed @ 0x664984
// > png_write_sRGB @ 0x6649fa
// > png_write_iCCP @ 0x664adc
// > png_write_iCCP @ 0x664afc
// > png_write_sPLT @ 0x664bf2
// > png_write_sPLT @ 0x664bfe
// > png_write_sPLT @ 0x664c64
// > png_write_sBIT @ 0x664d86
// > png_write_cHRM_fixed @ 0x664e76
// > png_write_tRNS @ 0x664f3a
// > png_write_tRNS @ 0x664f9c
// > png_write_tRNS @ 0x665020
// > png_write_bKGD @ 0x6650d0
// > png_write_bKGD @ 0x66514e
// > png_write_bKGD @ 0x6651d0
// > png_write_hIST @ 0x6652a2
// > png_write_tEXt @ 0x665350
// > png_write_tEXt @ 0x665360
// > png_write_tEXt @ 0x665382
// > png_write_zTXt @ 0x665464
// > png_write_zTXt @ 0x665488
// > png_write_iTXt @ 0x665624
// > png_write_iTXt @ 0x66562e
// > png_write_iTXt @ 0x66563a
// > png_write_iTXt @ 0x665644
// > png_write_iTXt @ 0x665726
// > png_write_iTXt @ 0x665730
// > png_write_iTXt @ 0x66573c
// > png_write_iTXt @ 0x665760
// > png_write_oFFs @ 0x665850
// > png_write_pCAL @ 0x665938
// > png_write_pCAL @ 0x66595e
// > png_write_pCAL @ 0x665968
// > png_write_pCAL @ 0x665992
// > png_write_pCAL @ 0x6659ba
// > png_write_pCAL @ 0x6659e0
// > png_write_pCAL @ 0x6659ea
// > png_write_pCAL @ 0x665a0c
// > png_write_pCAL @ 0x665a32
// > png_write_pCAL @ 0x665a3c
// > png_write_sCAL_s @ 0x665adc
// > png_write_pHYs @ 0x665b80
// > png_write_tIME @ 0x665c2e
//
// 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_write_chunk_data(_DWORD *result, int a2, int a3)
{
bool v3; // zf
_DWORD *v5; // r6
if ( result )
{
v3 = a2 == 0;
if ( a2 )
v3 = a3 == 0;
if ( !v3 )
{
v5 = result;
png_write_data((int)result);
return png_calculate_crc(v5, a2, a3);
}
}
return result;
}