//
// png_write_gAMA_fixed from 0xbec004 to 0xbec0e8 (228 bytes)
//
// 2 xrefs:
// > png_write_info_before_PLTE @ 0xbe6ce0
// > ??> @ 0x87198
//
// 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_write_gAMA_fixed(_DWORD *a1, int a2)
{
_BYTE v4[8]; // [xsp+48h] [xbp+48h] BYREF
_BYTE v5[4]; // [xsp+50h] [xbp+50h] BYREF
_BYTE v6[4]; // [xsp+54h] [xbp+54h] BYREF
png_save_uint_32(v4, a2);
if ( a1 )
{
a1[313] = 34;
png_save_uint_32(v5, 4);
png_save_uint_32(v6, 1732332865);
png_write_data((__int64)a1);
a1[148] = 1732332865;
png_reset_crc((__int64)a1);
png_calculate_crc(a1, (__int64)v6, 4);
a1[313] = 66;
png_write_chunk_data((__int64)a1, (__int64)v4, 4);
png_write_chunk_end((__int64)a1);
}
return _stack_chk_guard;
}