//
// sub_C682F0 from 0xc682f0 to 0xc6839c (172 bytes)
//
// 1 xrefs:
// > sub_C68714 @ 0xc68cd0
//
// 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_C682F0(unsigned int *a1, __int64 a2, int a3)
{
__int64 v4; // x2
__int64 v7; // x23
int v8; // w22
v4 = *((_QWORD *)a1 + 19);
if ( v4 )
{
v7 = a2 + 360;
v8 = a3 + *(_DWORD *)(a2 + 32);
if ( a3 > 0 )
{
while ( 1 )
{
sub_CBADE0(v7, a1[2] + a1[4] - *(_DWORD *)(v7 + 60), v4 + (int)(*a1 * (*(_DWORD *)(v7 + 60) - a1[2])), *a1);
a3 -= (*(__int64 (__fastcall **)(__int64, _QWORD, _QWORD))(a2 + 488))(
a2,
(unsigned int)(v8 - a3),
(unsigned int)a3);
if ( a3 <= 0 )
break;
v4 = *((_QWORD *)a1 + 19);
}
}
}
return 0;
}