//
// png_get_tRNS from 0xbce45c to 0xbce4d0 (116 bytes)
//
// 1 xrefs:
// > ??> @ 0x62e98
//
// 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_get_tRNS(__int64 a1, __int64 a2, _QWORD *a3, _DWORD *a4, _QWORD *a5)
{
__int64 result; // x0
if ( !a1 || !a2 )
return 0;
result = 0;
if ( (*(_DWORD *)(a2 + 8) & 0x10) != 0 )
{
if ( *(_BYTE *)(a2 + 37) == 3 )
{
if ( a3 )
{
result = 16;
*a3 = *(_QWORD *)(a2 + 184);
}
if ( a5 )
*a5 = a2 + 192;
}
else
{
if ( a5 )
{
result = 16;
*a5 = a2 + 192;
}
if ( a3 )
*a3 = 0;
}
if ( a4 )
{
result = 16;
*a4 = *(unsigned __int16 *)(a2 + 34);
}
}
return result;
}