//
// png_get_PLTE from 0x651e90 to 0x651ec2 (50 bytes)
//
// 0 xrefs:
//
// 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
//
int __fastcall png_get_PLTE(int a1, int a2, _DWORD *a3, _DWORD *a4)
{
bool v4; // zf
int result; // r0
v4 = a1 == 0;
if ( a1 )
v4 = a2 == 0;
if ( v4 )
return 0;
result = (*(_DWORD *)(a2 + 8) >> 3) & 1;
if ( !a3 )
result = 0;
if ( result )
{
*a3 = *(_DWORD *)(a2 + 16);
*a4 = *(unsigned __int16 *)(a2 + 20);
return 8;
}
return result;
}