//
// png_get_pCAL from 0x651cb4 to 0x651d48 (148 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_pCAL(
int a1,
int a2,
_DWORD *a3,
_DWORD *a4,
_DWORD *a5,
_DWORD *a6,
_DWORD *a7,
_DWORD *a8,
_DWORD *a9)
{
bool v9; // zf
int result; // r0
bool v11; // zf
bool v12; // zf
bool v13; // zf
char v14; // r0
v9 = a1 == 0;
if ( a1 )
v9 = a2 == 0;
if ( v9 )
return 0;
result = *(_DWORD *)(a2 + 8) & 0x400;
if ( result )
{
v11 = a3 == nullptr;
if ( a3 )
v11 = a4 == nullptr;
if ( v11 )
{
return 0;
}
else
{
v12 = a5 == nullptr;
if ( a5 )
v12 = a6 == nullptr;
if ( v12 )
{
return 0;
}
else
{
v13 = a7 == nullptr;
if ( a7 )
v13 = a8 == nullptr;
v14 = !v13;
if ( a9 )
result = v14 & 1;
else
result = 0;
if ( result )
{
*a3 = *(_DWORD *)(a2 + 208);
*a4 = *(_DWORD *)(a2 + 212);
*a5 = *(_DWORD *)(a2 + 216);
*a6 = *(unsigned __int8 *)(a2 + 228);
*a7 = *(unsigned __int8 *)(a2 + 229);
*a8 = *(_DWORD *)(a2 + 220);
*a9 = *(_DWORD *)(a2 + 224);
return 1024;
}
}
}
}
return result;
}