//
// sub_1800DCB70 from 0x1800dcb70 to 0x1800dcbf6 (134 bytes)
//
// 3 xrefs:
// > sub_1800DC940 @ 0x1800dc9c0
// > sub_1800DCFC0 @ 0x1800dcfe9
// > ??> @ 0x1801ff5ac
//
// 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:14 +0000
//
__int64 __fastcall sub_1800DCB70(__int64 a1)
{
int v1; // edx
const void *v3; // r9
int v4; // r8d
int v5; // edx
int v6; // edx
int v7; // edx
int v8; // eax
__int64 v9; // rcx
v1 = *(_DWORD *)(a1 + 40);
if ( (unsigned int)(v1 - 1) > 4 )
return 0;
v3 = *(const void **)(a1 + 368);
if ( !v3 )
return 0;
v4 = *(_DWORD *)(a1 + 104);
v5 = v1 - 1;
if ( v5 )
{
v6 = v5 - 1;
if ( !v6 )
{
v8 = 16;
goto LABEL_11;
}
v7 = v6 - 1;
if ( !v7 )
{
v8 = 24;
goto LABEL_11;
}
if ( (unsigned int)(v7 - 1) <= 1 )
{
v8 = 32;
goto LABEL_11;
}
}
v8 = 8;
LABEL_11:
v9 = *(unsigned int *)(a1 + 384);
if ( (_DWORD)v9 )
{
memmove((void *)(*(_QWORD *)(a1 + 352) + v9), v3, (unsigned int)(v8 * v4));
*(_DWORD *)(a1 + 384) = 0;
}
return 0;
}