//
// sub_1004B86F8 from 0x1004b86f8 to 0x1004b872c (52 bytes)
//
// 3 xrefs:
// > sub_100446834 @ 0x100446864
// > sub_1004BA5BC @ 0x1004ba60c
// > sub_1004BA680 @ 0x1004ba6d0
//
// 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_1004B86F8(__int64 a1)
{
int v1; // w8
__int64 v2; // x9
__int64 v3; // x10
v1 = *(_DWORD *)(a1 + 8);
v3 = *(int *)(a1 + 24);
v2 = *(int *)(a1 + 28);
*(_DWORD *)(a1 + 28) = (v1 + (int)v2) % *(_DWORD *)(a1 + 16);
*(_DWORD *)(a1 + 44) += v1;
return *(_QWORD *)a1 + v3 * v2;
}