//
// sub_CB6260 from 0xcb6260 to 0xcb630c (172 bytes)
//
// 3 xrefs:
// > VP8LGetInfo @ 0xc6ecfc
// > sub_C6EF50 @ 0xc6eff0
// > sub_C700A4 @ 0xc700e0
//
// 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 sub_CB6260(__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;
}