//
// sub_1004FE484 from 0x1004fe484 to 0x1004fe518 (148 bytes)
//
// 1 xrefs:
// > sub_100502CDC @ 0x100502e10
//
// 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_1004FE484(__int64 a1, unsigned int **a2)
{
__int64 v3; // x20
int v4; // w21
int v6; // w1
bool v7; // cc
int v8; // w0
v3 = *(_QWORD *)(a1 + 48);
v4 = *(_DWORD *)(v3 + 8);
if ( sub_1004FBC80(a2, 1) )
return -135;
if ( v4 < 2 )
{
v6 = 0;
}
else
{
v6 = 0;
do
{
++v6;
v7 = (unsigned int)v4 > 3;
v4 = (unsigned int)v4 >> 1;
}
while ( v7 );
}
v8 = sub_1004FBC80(a2, v6);
if ( v8 == -1 )
return -136;
else
return *(int *)(v3 + 4LL * *(unsigned __int8 *)(*(_QWORD *)(v3 + 32) + 2LL * v8));
}