//
// sub_F2DC4 from 0xf2dc4 to 0xf2e94 (208 bytes)
//
// 2 xrefs:
// > sub_F4A38 @ 0xf4a60
// > sub_F4A38 @ 0xf4aa8
//
// 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_F2DC4(__int64 a1, unsigned int a2)
{
int v2; // w11
int v3; // w8
int v4; // w10
unsigned __int8 *v5; // x12
int v6; // w11
if ( a2 > 0x20 )
return 0xFFFFFFFFLL;
v2 = *(_DWORD *)(a1 + 24);
v3 = *(_DWORD *)(a1 + 4);
v4 = v3 + a2;
if ( *(_DWORD *)a1 < v2 - 4 )
goto LABEL_6;
if ( *(_DWORD *)a1 > v2 - ((v4 + 7) >> 3) )
return 0xFFFFFFFFLL;
if ( !v4 )
return 0;
LABEL_6:
v5 = *(unsigned __int8 **)(a1 + 16);
v6 = *v5 >> v3;
if ( v4 >= 9 )
{
v6 |= v5[1] << (8 - v3);
if ( v4 >= 17 )
{
v6 |= v5[2] << (16 - v3);
if ( v4 >= 25 )
{
v6 |= v5[3] << (24 - v3);
if ( v3 )
{
if ( v4 >= 33 )
v6 |= v5[4] << -(char)v3;
}
}
}
}
return (unsigned int)v6 & dword_4EB68[a2];
}