//
// sub_1003ACE20 from 0x1003ace20 to 0x1003acf8c (364 bytes)
//
// 1 xrefs:
// > sub_1003AD0DC @ 0x1003ad120
//
// 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_1003ACE20(__int64 *a1, __int64 a2, void *a3, __int64 a4, unsigned int a5)
{
unsigned int v9; // w8
__int64 i; // x8
_QWORD v12[1282]; // [xsp+0h] [xbp-2850h] BYREF
unsigned int v13; // [xsp+2810h] [xbp-40h]
v12[1280] = a2;
v12[1281] = 0;
v9 = a5;
if ( a5 <= 8 )
{
v9 = a5;
if ( ((0x191u >> a5) & 1) != 0 )
v9 = dword_100646094[a5];
}
v13 = v9;
if ( (a4 & 2) != 0 && a5 != 9 )
sub_1003ACFA0(v12, 4294967279LL, 4294967227LL, 4294967231LL);
if ( (a4 & 8) == 0 )
{
if ( *a1 )
{
for ( i = *(_QWORD *)(*a1 + 32); i; i = *(_QWORD *)(i + 48) )
{
if ( (*(_DWORD *)i & 7) == 1 )
break;
if ( (*(_DWORD *)i & 7) == 6 )
goto LABEL_17;
}
}
sub_1003B0158((int)v12, "