//
// sub_1800E6350 from 0x1800e6350 to 0x1800e6444 (244 bytes)
//
// 5 xrefs:
// > sub_1800E1DB0 @ 0x1800e1ef2
// > ??> @ 0x18018d248
// > ??> @ 0x18018d25c
// > ??> @ 0x1801ffd8c
// > ??> @ 0x1801ffd98
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 10:54:17 +0000
//
__int64 __fastcall sub_1800E6350(_DWORD **a1, int a2)
{
void *v5; // rsi
__int64 v6; // rdx
__int64 v7; // rax
char v8; // [rsp+30h] [rbp-18h]
if ( a2 < *((_DWORD *)a1 + 2) )
return 28;
v5 = nullptr;
if ( a2 )
{
v6 = (unsigned int)(8 * a2);
if ( (unsigned int)(v6 - 1) > 0x3FFFFFFE )
return 38;
v8 = 1;
v5 = sub_1800B6530(
*((_QWORD *)off_1801AED20 + 52),
v6,
"C:\\buildagent1\\work\\570ad728b1678096\\core_api\\src\\fmod_memory.h",
243,
0,
0,
v8);
if ( !v5 )
return 38;
v7 = *((int *)a1 + 2);
if ( (_DWORD)v7 )
memmove(v5, *a1, 8 * v7);
}
if ( *((int *)a1 + 3) > 0 )
{
if ( *a1 )
sub_1800B6AA0(*((_QWORD *)off_1801AED20 + 52), *a1);
}
*a1 = v5;
*((_DWORD *)a1 + 3) = a2;
return 0;
}