//
// sub_1004BE268 from 0x1004be268 to 0x1004be2e8 (128 bytes)
//
// 0 xrefs:
//
// 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_1004BE268(__int64 a1)
{
int v1; // w8
const void *v3; // x1
unsigned int v4; // w8
int v5; // w8
__int64 v6; // x9
v1 = *(_DWORD *)(a1 + 40);
if ( (unsigned int)(v1 - 1) <= 4 )
{
v3 = *(const void **)(a1 + 368);
if ( v3 )
{
v4 = v1 - 2;
if ( v4 <= 3 )
{
v5 = dword_1006488E0[v4];
v6 = *(unsigned int *)(a1 + 384);
if ( !(_DWORD)v6 )
return 0;
goto LABEL_7;
}
v5 = 8;
v6 = *(unsigned int *)(a1 + 384);
if ( (_DWORD)v6 )
{
LABEL_7:
memcpy((void *)(*(_QWORD *)(a1 + 352) + v6), v3, (unsigned int)(v5 * *(_DWORD *)(a1 + 104)));
*(_DWORD *)(a1 + 384) = 0;
}
}
}
return 0;
}