//
// sub_1800862C0 from 0x1800862c0 to 0x180086365 (165 bytes)
//
// 3 xrefs:
// > sub_180081AE0 @ 0x18008206b
// > sub_180085CA0 @ 0x180085e8c
// > ??> @ 0x1801b567c
//
// 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_1800862C0(__int64 a1, char a2, char a3, char a4, char a5, unsigned __int8 a6)
{
__int64 v8; // rcx
v8 = *(_QWORD *)(a1 + 10248);
if ( (unsigned __int64)(v8 + 5) > 0x800 )
{
sub_180080D10(a1, a1, v8);
v8 = 0;
*(_QWORD *)(a1 + 10248) = 0;
}
*(_BYTE *)(v8 + a1) = a2;
*(_BYTE *)(*(_QWORD *)(a1 + 10248) + a1 + 1) = a3;
*(_BYTE *)(*(_QWORD *)(a1 + 10248) + a1 + 2) = a4;
*(_BYTE *)(*(_QWORD *)(a1 + 10248) + a1 + 3) = a5;
*(_BYTE *)(*(_QWORD *)(a1 + 10248) + a1 + 4) = a6;
*(_QWORD *)(a1 + 10248) += 5LL;
return a6;
}