//
// sub_1800864F0 from 0x1800864f0 to 0x180086597 (167 bytes)
//
// 2 xrefs:
// > ??> @ 0x1801014e8
// > ??> @ 0x1801b56ac
//
// 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
//
// Hidden C++ exception states: #wind=1
void __fastcall sub_1800864F0(__int64 a1, const void *a2, size_t a3)
{
void **v4; // rdx
void *v5; // rcx
void *Block[2]; // [rsp+20h] [rbp-38h] BYREF
__int128 v7; // [rsp+30h] [rbp-28h]
*(_OWORD *)Block = 0;
v7 = 0;
sub_18000CE60(Block, a2, a3);
v4 = Block;
if ( *((_QWORD *)&v7 + 1) > 0xFu )
v4 = (void **)Block[0];
sub_180007CF0((_QWORD *)(a1 + 8), v4, v7);
if ( *((_QWORD *)&v7 + 1) > 0xFu )
{
v5 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v7 + 1) + 1LL) >= 0x1000 )
{
v5 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v5 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free_0(v5);
}
}