//
// sub_858CC from 0x858cc to 0x85904 (56 bytes)
//
// 1 xrefs:
// > sub_83E04 @ 0x848f8
//
// 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_858CC(__int64 a1, int *a2)
{
__int64 v2; // x8
__int64 v3; // x9
int v4; // w10
v2 = *a2;
v3 = *(_QWORD *)(a1 + 16) + 16 * v2;
v4 = *(_DWORD *)(v3 + 4);
*(_QWORD *)(v3 + 8) = 0;
*a2 = v4;
*(_DWORD *)(v3 + 4) = *(_DWORD *)(a1 + 32);
LODWORD(v3) = *(_DWORD *)(a1 + 36);
*(_DWORD *)(a1 + 32) = v2;
*(_DWORD *)(a1 + 36) = v3 - 1;
return 0;
}