//
// sub_1003BC110 from 0x1003bc110 to 0x1003bc1e4 (212 bytes)
//
// 2 xrefs:
// > GameManager::dataLoaded @ 0x1003b9350
// > EditorWindowPopup::onClose @ 0x1004dacbc
//
// This function is hookable on this platform (idp: arm, 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 11:03:59 +0000
//
char *__fastcall sub_1003BC110(__int64 a1, int *a2, __int64 a3, _DWORD **a4)
{
__int64 v6; // x9
_QWORD *v7; // x22
int v8; // w8
_QWORD *v9; // x20
int v10; // w9
char *v11; // x23
v7 = (_QWORD *)(a1 + 8);
v6 = *(_QWORD *)(a1 + 8);
if ( v6 )
{
v8 = *a2;
while ( 1 )
{
while ( 1 )
{
v9 = (_QWORD *)v6;
v10 = *(_DWORD *)(v6 + 28);
if ( v8 >= v10 )
break;
v6 = *v9;
v7 = v9;
if ( !*v9 )
goto LABEL_10;
}
if ( v10 >= v8 )
break;
v6 = v9[1];
if ( !v6 )
{
v7 = v9 + 1;
goto LABEL_10;
}
}
}
else
{
v9 = (_QWORD *)(a1 + 8);
LABEL_10:
v11 = (char *)operator new(0x40u);
*((_DWORD *)v11 + 7) = **a4;
*((_OWORD *)v11 + 2) = 0u;
*((_OWORD *)v11 + 3) = 0u;
*((_DWORD *)v11 + 12) = 1065353216;
*(_QWORD *)(v11 + 52) = 0;
v11[60] = 0;
sub_10000A0F0((__int64 **)a1, (__int64)v9, v7, v11);
return v11;
}
return (char *)v9;
}