//
// png_write_chunk_end from 0x664154 to 0x66417e (42 bytes)
//
// 27 xrefs:
// > png_write_chunk @ 0x6641f0
// > png_write_IHDR @ 0x664374
// > png_write_PLTE @ 0x66454a
// > png_compress_IDAT @ 0x6646b0
// > png_compress_IDAT @ 0x6647fc
// > png_write_IEND @ 0x664910
// > png_write_gAMA_fixed @ 0x66498a
// > png_write_sRGB @ 0x664a00
// > png_write_iCCP @ 0x664b18
// > png_write_sPLT @ 0x664cb6
// > png_write_sBIT @ 0x664d8c
// > png_write_cHRM_fixed @ 0x664e7c
// > png_write_tRNS @ 0x664f40
// > png_write_tRNS @ 0x664fa2
// > png_write_tRNS @ 0x665026
// > png_write_bKGD @ 0x6650d6
// > png_write_bKGD @ 0x665154
// > png_write_bKGD @ 0x6651d6
// > png_write_hIST @ 0x6652ac
// > png_write_tEXt @ 0x665366
// > png_write_zTXt @ 0x6654a4
// > png_write_iTXt @ 0x66564a
// > png_write_oFFs @ 0x665856
// > png_write_pCAL @ 0x6659a4
// > png_write_sCAL_s @ 0x665ae2
// > png_write_pHYs @ 0x665b86
// > png_write_tIME @ 0x665c34
//
// 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
//
int __fastcall png_write_chunk_end(int result)
{
int v1; // r4
int v2; // r1
_BYTE v3[8]; // [sp+4h] [bp-8h] BYREF
if ( result )
{
v1 = result;
v2 = *(_DWORD *)(result + 512);
*(_DWORD *)(result + 900) = 130;
png_save_uint_32(v3, v2);
return png_write_data(v1);
}
return result;
}