//
// sub_18007F6D0 from 0x18007f6d0 to 0x18007f743 (115 bytes)
//
// 4 xrefs:
// > sub_18007F9D0 @ 0x18007f9e2
// > sub_180080F40 @ 0x180080fc4
// > sub_1800810D0 @ 0x180081154
// > ??> @ 0x1801b4fec
//
// 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_18007F6D0(__int64 *a1, int a2)
{
__int64 v2; // rax
__int64 *v4; // rax
__int64 v5; // r8
__int64 *v6; // rdx
__int64 v8; // [rsp+30h] [rbp+8h] BYREF
v2 = a1[1];
if ( (unsigned __int64)(v2 + 64) <= 0x8000 )
{
v5 = *a1;
a1[1] = v2 + 64;
v6 = (__int64 *)(v2 + v5 + 48);
}
else
{
v4 = sub_18007F5E0((__int64)a1, 0x40u, &v8);
v5 = v8;
v6 = v4;
}
*v6 = v5 | (a2 - 1);
v6[1] = 0;
v6[2] = 0;
v6[3] = 0;
v6[4] = 0;
v6[5] = 0;
v6[6] = 0;
v6[7] = 0;
return v6;
}