//
// png_handle_as_unknown from 0xe3c818 to 0xe3c8a0 (136 bytes)
//
// 5 xrefs:
// > png_chunk_unknown_handling @ 0xe3c8d0
// > png_write_info_before_PLTE @ 0xe5cf24
// > png_write_info @ 0xe5d1ec
// > png_write_end @ 0xe5d588
// > ??> @ 0xb6e00
//
// 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:01 +0000
//
__int64 __fastcall png_handle_as_unknown(__int64 a1, void *a2)
{
int v2; // w19
unsigned int v3; // w2
unsigned __int64 v4; // x21
unsigned __int8 *v6; // x19
if ( !a1 || !a2 )
return 0;
v2 = *(_DWORD *)(a1 + 1084);
v3 = 0;
if ( v2 )
{
v4 = *(_QWORD *)(a1 + 1088);
v6 = (unsigned __int8 *)(v4 + (unsigned int)(5 * v2));
while ( 1 )
{
v6 -= 5;
if ( !memcmp(a2, v6, 4u) )
break;
if ( v4 >= (unsigned __int64)v6 )
return 0;
}
return v6[4];
}
return v3;
}