//
// sub_1800E23F0 from 0x1800e23f0 to 0x1800e24fd (269 bytes)
//
// 2 xrefs:
// > sub_1800BC0F0 @ 0x1800bc68b
// > ??> @ 0x1801ff9f0
//
// 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_1800E23F0(__int64 a1, __int64 a2)
{
char v2; // si
__int64 v5; // rax
__int64 v6; // r8
__int64 v7; // r10
int v8; // r9d
int v9; // eax
__int64 result; // rax
v2 = 0;
if ( a1 )
{
sub_1801021C0(a1, 17);
v2 = 1;
}
v5 = *(int *)(a1 + 74208);
v6 = *(int *)(a2 + 32);
v7 = 8 * v5 - 8;
v8 = v5 - 1;
*(_QWORD *)(8 * v6 + *(_QWORD *)(a1 + 74200)) = *(_QWORD *)(*(_QWORD *)(a1 + 74200) + v7);
*(_DWORD *)(*(_QWORD *)(8 * v6 + *(_QWORD *)(a1 + 74200)) + 32LL) = v6;
if ( (int)v5 - 1 >= 0 )
{
v9 = *(_DWORD *)(a1 + 74208);
if ( v8 < v9 )
{
if ( v9 - v8 - 1 > 0 )
{
memmove(
(void *)(v7 + *(_QWORD *)(a1 + 74200)),
(const void *)(v7 + *(_QWORD *)(a1 + 74200) + 8),
8LL * (v9 - v8 - 1));
v9 = *(_DWORD *)(a1 + 74208);
}
*(_DWORD *)(a1 + 74208) = v9 - 1;
}
}
if ( v2 )
sub_180102300(a1, 17);
LOBYTE(v6) = 1;
result = sub_1800F2C00(a1 + 1824, *(_QWORD *)(a2 + 16), v6);
if ( !(_DWORD)result )
{
sub_1800B6AA0(*((_QWORD *)off_1801AED20 + 52), (_DWORD *)a2);
return 0;
}
return result;
}