//
// sub_F8F88 from 0xf8f88 to 0xf9114 (396 bytes)
//
// 1 xrefs:
// > sub_F8D74 @ 0xf8f7c
//
// 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_F8F88(__int64 a1, __int64 a2)
{
_QWORD *v2; // x19
__int64 v3; // x0
__int64 v4; // x1
int v5; // w8
__int64 v6; // x20
__int64 v7; // x21
int v8; // w24
__int64 v9; // x0
void (__fastcall *v10)(_QWORD, _QWORD, __int64); // x8
__int64 v11; // x22
int v12; // w0
__int64 v13; // x0
__int64 v14; // x1
__int64 v15; // x2
__int64 v16; // x3
__int64 v17; // x0
__int64 v18; // x1
__int64 *v19; // x8
__int64 v20; // x9
unsigned int v21; // w23
int v23; // [xsp+14h] [xbp-3Ch] BYREF
__int64 v24; // [xsp+18h] [xbp-38h] BYREF
if ( *(_DWORD *)(a2 + 128) == 1 )
{
v3 = sub_FAFAC();
*(_DWORD *)(v4 + 128) = 2;
if ( !v5 )
{
v21 = 0;
*((_DWORD *)v2 + 32) = 3;
return v21;
}
v6 = v3;
v7 = *(_QWORD *)v2[10];
v24 = -1;
v8 = *((_DWORD *)v2 + 126);
v23 = v8;
v9 = sub_FA864(v3, v2, v2[13]);
v10 = (void (__fastcall *)(_QWORD, _QWORD, __int64))v2[99];
if ( v10 && v2[101] )
{
v11 = v9;
v10(*v2, 0, 2);
v12 = ((__int64 (__fastcall *)(_QWORD))v2[101])(*v2);
v2[2] = v12;
v2[3] = v12;
if ( v12 != -1 )
{
v13 = sub_FA954(v6, v2, v2[11] + 8LL, *(unsigned int *)(v2[11] + 4LL), &v23, &v24);
if ( v13 < 0 )
{
v21 = v13;
if ( !(_DWORD)v13 )
return v21;
}
else
{
v17 = sub_FB070(v13, v14, v15, v16, v2[2], v24);
if ( (sub_FAAB0(v17, v18, 0, v7) & 0x80000000) != 0 )
{
v21 = -128;
}
else
{
*(_QWORD *)v2[9] = 0;
*(_DWORD *)v2[11] = v8;
*(_QWORD *)v2[10] = v7;
v19 = (__int64 *)v2[12];
v20 = v19[1] - v11;
*v19 = v11;
v19[1] = v20;
v21 = sub_F91D8(v6, v2, v7);
if ( !v21 )
return v21;
}
}
goto LABEL_13;
}
}
else
{
v2[2] = -1;
v2[3] = -1;
}
v21 = -131;
LABEL_13:
sub_FAFC0();
return v21;
}
return (unsigned int)-131;
}