//
// sub_F2C420 from 0xf2c420 to 0xf2c4cc (172 bytes)
//
// 3 xrefs:
// > VP8LGetInfo @ 0xee4ebc
// > sub_EE5110 @ 0xee51b0
// > sub_EE6264 @ 0xee62a0
//
// 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:12:50 +0000
//
__int64 __fastcall sub_F2C420(__int64 result, unsigned __int8 *a2, unsigned __int64 a3)
{
__int64 v3; // x3
__int64 v4; // x2
v3 = 8;
if ( a3 <= 8 )
v3 = a3;
*(_QWORD *)(result + 16) = a3;
*(_QWORD *)result = 0;
*(_DWORD *)(result + 32) = 0;
*(_DWORD *)(result + 36) = 0;
if ( v3 )
{
v4 = *a2;
if ( v3 != 1 )
{
v4 |= (unsigned __int64)a2[1] << 8;
if ( v3 != 2 )
{
v4 |= (unsigned __int64)a2[2] << 16;
if ( v3 != 3 )
{
v4 |= (unsigned __int64)a2[3] << 24;
if ( v3 != 4 )
{
v4 |= (unsigned __int64)a2[4] << 32;
if ( v3 != 5 )
{
v4 |= (unsigned __int64)a2[5] << 40;
if ( v3 != 6 )
{
v4 |= (unsigned __int64)a2[6] << 48;
if ( v3 == 8 )
v4 |= (unsigned __int64)a2[7] << 56;
}
}
}
}
}
}
}
else
{
v4 = 0;
}
*(_QWORD *)result = v4;
*(_QWORD *)(result + 24) = v3;
*(_QWORD *)(result + 8) = a2;
return result;
}