//
// sub_F2830 from 0xf2830 to 0xf2900 (208 bytes)
//
// 2 xrefs:
// > sub_EFF98 @ 0xf0064
// > sub_EFF98 @ 0xf0098
//
// 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_F2830(__int64 a1, __int64 a2, _QWORD *a3, __int64 a4)
{
__int64 result; // x0
int *v8; // x8
int v9; // w9
__int64 v10; // x8
int v11; // w0
if ( *(_QWORD *)(*(_QWORD *)(a4 + 8) + 32LL) && (unsigned int)sub_F2D80() )
{
result = 0;
*a3 = 0;
LABEL_4:
v8 = *(int **)a4;
v9 = 4;
LABEL_10:
*v8 = v9;
return result;
}
if ( !*a3
|| (v10 = *(_QWORD *)(a4 + 8), *(_DWORD *)(v10 + 4112)) && *(_DWORD *)(v10 + 6864) >= 0x15u
|| (v11 = (*(__int64 (__fastcall **)(__int64, __int64, _QWORD *, _QWORD))v10)(a4, a2, a3, *(_QWORD *)(v10 + 104)),
v11 == 2) )
{
v8 = *(int **)a4;
result = 0;
v9 = 7;
goto LABEL_10;
}
if ( !*a3 && (v11 == 1 || *(_QWORD *)(*(_QWORD *)(a4 + 8) + 32LL) && (unsigned int)sub_F2D80()) )
{
result = 0;
goto LABEL_4;
}
return 1;
}