//
// sub_100642DA0 from 0x100642da0 to 0x100642deb (75 bytes)
//
// 1 xrefs:
// > sub_10063EA80 @ 0x10063ee77
//
// 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_100642DA0(__int64 a1, char a2)
{
__int64 v2; // rdx
__int64 result; // rax
v2 = *(_QWORD *)(a1 + 10248);
result = v2 - 2048;
if ( (unsigned __int64)(v2 - 2048) <= 0xFFFFFFFFFFFFF7FELL )
{
result = sub_10064B1F0(a1, a1, v2);
*(_QWORD *)(a1 + 10248) = 0;
v2 = 0;
}
*(_BYTE *)(a1 + v2) = a2;
++*(_QWORD *)(a1 + 10248);
return result;
}