//
// sub_1000FE7D8 from 0x1000fe7d8 to 0x1000fe898 (192 bytes)
//
// 14 xrefs:
// > CustomSongWidget::updateWithMultiAssets @ 0x1000fd694
// > CustomSongWidget::updateWithMultiAssets @ 0x1000fd73c
// > CustomSongWidget::downloadAssetFinished @ 0x1000fe2a0
// > SetupTriggerPopup::valueChanged @ 0x1001307cc
// > SetupTriggerPopup::toggleLimitValue @ 0x1001337c4
// > PlayerObject::switchedDirTo @ 0x100227dd4
// > PlayerObject::switchedDirTo @ 0x100227e04
// > PlayerObject::pushButton @ 0x100227ef8
// > PlayerObject::releaseButton @ 0x100228d78
// > PlayerObject::enablePlayerControls @ 0x10022c98c
// > PlayerObject::enablePlayerControls @ 0x10022c9bc
// > PlayerObject::enablePlayerControls @ 0x10022ca00
// > PlayerObject::touchedObject @ 0x10022e648
// > PlayerObject::touchedObject @ 0x10022e670
//
// 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
//
_DWORD *__fastcall sub_1000FE7D8(__int64 a1, int *a2, __int64 a3, _DWORD **a4)
{
__int64 v6; // x9
_QWORD *v7; // x22
int v8; // w8
_QWORD *v9; // x20
int v10; // w9
_DWORD *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 = operator new(0x28u);
v11[7] = **a4;
*((_BYTE *)v11 + 32) = 0;
sub_10000A0F0((__int64 **)a1, (__int64)v9, v7, v11);
return v11;
}
return v9;
}