//
// png_get_iCCP from 0xbcdf5c to 0xbcdfcc (112 bytes)
//
// 1 xrefs:
// > ??> @ 0x97a88
//
// 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_iCCP(__int64 a1, __int64 a2, _QWORD *a3, _DWORD *a4, _QWORD *a5, _DWORD *a6)
{
int v6; // w6
__int64 result; // x0
if ( !a1 || !a2 )
return 0;
v6 = *(_DWORD *)(a2 + 8);
result = v6 & 0x1000;
if ( (v6 & 0x1000) == 0 )
return result;
if ( !a3 || !a4 || !a5 || !a6 )
return 0;
result = 4096;
*a3 = *(_QWORD *)(a2 + 128);
*a5 = *(_QWORD *)(a2 + 136);
*a6 = (*(unsigned __int8 *)(*(_QWORD *)(a2 + 136) + 1LL) << 16)
+ (**(unsigned __int8 **)(a2 + 136) << 24)
+ *(unsigned __int8 *)(*(_QWORD *)(a2 + 136) + 3LL)
+ (*(unsigned __int8 *)(*(_QWORD *)(a2 + 136) + 2LL) << 8);
*a4 = 0;
return result;
}