//
// sub_1800860B0 from 0x1800860b0 to 0x180086116 (102 bytes)
//
// 8 xrefs:
// > sub_180081AE0 @ 0x180081bd5
// > sub_180081AE0 @ 0x180081c2a
// > sub_180081AE0 @ 0x180081d21
// > sub_180081AE0 @ 0x18008200a
// > sub_180081AE0 @ 0x1800820a1
// > sub_180081AE0 @ 0x1800820d9
// > sub_180081AE0 @ 0x1800820e9
// > ??> @ 0x1801b564c
//
// 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_1800860B0(__int64 a1, char a2)
{
__int64 v4; // rcx
__int64 result; // rax
v4 = *(_QWORD *)(a1 + 10248);
result = v4 + 1;
if ( (unsigned __int64)(v4 + 1) <= 0x800 )
{
*(_BYTE *)(v4 + a1) = a2;
}
else
{
sub_180080D10(a1, a1, v4);
result = 0;
*(_QWORD *)(a1 + 10248) = 0;
*(_BYTE *)a1 = a2;
}
++*(_QWORD *)(a1 + 10248);
return result;
}