//
// png_read_chunk_header from 0xe5809c to 0xe58160 (196 bytes)
//
// 4 xrefs:
// > png_read_info @ 0xe49518
// > png_read_end @ 0xe4ba04
// > png_read_IDAT_data @ 0xe58c94
// > ??> @ 0xe3428
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:10:19 +0000
//
__int64 __fastcall png_read_chunk_header(_DWORD *a1)
{
unsigned int uint_31; // w22
unsigned __int8 v4[4]; // [xsp+30h] [xbp+30h] BYREF
unsigned int v5; // [xsp+34h] [xbp+34h] BYREF
a1[313] = 33;
png_read_data((__int64)a1);
uint_31 = png_get_uint_31((__int64)a1, v4);
a1[148] = _byteswap_ulong(v5);
png_reset_crc((__int64)a1);
png_calculate_crc(a1, (__int64)&v5, 4);
png_check_chunk_name((__int64)a1, a1[148]);
a1[313] = 65;
return uint_31;
}