//
// sub_F32C0 from 0xf32c0 to 0xf3390 (208 bytes)
//
// 2 xrefs:
// > sub_F8D74 @ 0xf8e20
// > sub_F9508 @ 0xf9598
//
// 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_F32C0(__int64 a1, __int64 a2, int a3)
{
int v3; // w8
__int64 v4; // x9
__int64 v8; // x10
int v9; // w9
unsigned int v10; // w21
__int64 v11; // x0
v3 = *(_DWORD *)(a2 + 8);
if ( (v3 & 0x80000000) == 0 )
{
v4 = *(int *)(a2 + 16);
if ( (_DWORD)v4 )
{
v8 = *(int *)(a2 + 12);
*(_DWORD *)(a2 + 12) = v8 - v4;
if ( (int)v8 - (int)v4 >= 1 )
{
memmove(*(void **)a2, (const void *)(*(_QWORD *)a2 + v4), v8 - v4);
v3 = *(_DWORD *)(a2 + 8);
}
*(_DWORD *)(a2 + 16) = 0;
}
v9 = *(_DWORD *)(a2 + 12);
if ( v3 - v9 >= a3 )
{
v11 = *(_QWORD *)a2;
return v11 + v9;
}
v10 = a3 + v9 + 4096;
if ( *(_QWORD *)a2 )
v11 = sub_9CEAC(a1, *(_QWORD *)a2, v10);
else
v11 = sub_9CDF4(a1, v10);
*(_QWORD *)a2 = 0;
if ( v11 )
{
v9 = *(_DWORD *)(a2 + 12);
*(_QWORD *)a2 = v11;
*(_DWORD *)(a2 + 8) = v10;
return v11 + v9;
}
sub_F328C(a1, a2);
}
return 0;
}