//
// sub_10057ABFC from 0x10057abfc to 0x10057ac90 (148 bytes)
//
// 4 xrefs:
// > sub_100554D5C @ 0x100554dd4
// > sub_100575DC0 @ 0x100575ec4
// > sub_100578294 @ 0x10057837c
// > sub_100579A34 @ 0x100579b20
//
// 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_10057ABFC(_QWORD *a1)
{
_QWORD *v2; // x20
__int64 result; // x0
__int64 v4; // x9
__int64 v5; // x1
__int64 v6; // [xsp+8h] [xbp-18h] BYREF
v2 = a1 + 5;
result = sub_100552950(a1[11], *(_DWORD *)(a1[11] + 464LL), a1[5] + a1[7] - a1[6], a1[6], &v6);
if ( !(_DWORD)result )
{
v4 = a1[6];
if ( v4 == v6 )
{
off_10085DEB8((void *)a1[5]);
v2[1] = 0;
v2[2] = 0;
*v2 = 0;
a1[8] = sub_100548F0C();
a1[9] = v5;
}
else
{
a1[6] = v4 - v6;
}
return 0;
}
return result;
}