//
// sub_CBABC0 from 0xcbabc0 to 0xcbac50 (144 bytes)
//
// 2 xrefs:
// > sub_C65BCC @ 0xc65d68
// > WebPPictureARGBToYUVADithered @ 0xca9f90
//
// 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_CBABC0(_DWORD *a1, float a2)
{
__int64 result; // x0
memcpy(a1 + 2, &unk_F58A10, 0xDCu);
*a1 = 0;
a1[1] = 31;
if ( a2 < 0.0 )
{
a1[57] = 0;
return 0;
}
else
{
result = 256;
if ( a2 <= 1.0 )
{
result = (unsigned int)(float)(a2 * 256.0);
a1[57] = result;
}
else
{
a1[57] = 256;
}
}
return result;
}