//
// png_check_chunk_name from 0xbe1e50 to 0xbe1edc (140 bytes)
//
// 3 xrefs:
// > png_push_read_chunk @ 0xbcf3a4
// > png_read_chunk_header @ 0xbe1f6c
// > ??> @ 0x68e08
//
// 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_check_chunk_name(__int64 result, unsigned int a2)
{
unsigned int v2; // w1
if ( (unsigned int)(unsigned __int8)a2 - 91 <= 5
|| (unsigned int)(unsigned __int8)a2 - 65 > 0x39
|| (unsigned int)BYTE1(a2) - 91 <= 5
|| (unsigned int)BYTE1(a2) - 65 > 0x39
|| (unsigned int)BYTE2(a2) - 91 <= 5
|| (unsigned int)BYTE2(a2) - 65 > 0x39
|| (v2 = HIBYTE(a2), v2 - 91 <= 5)
|| v2 - 65 > 0x39 )
{
png_chunk_error(result, "invalid chunk type");
}
return result;
}