//
// MusicDownloadManager::isCustomSFXInScope from 0x95f830 to 0x95f944 (276 bytes)
//
// 2 xrefs:
// > MusicDownloadManager::rebuildCustomSFXMappings @ 0x97a998
// > ??> @ 0xa4620
//
// 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 12:57:31 +0000
//
__int64 __fastcall MusicDownloadManager::isCustomSFXInScope(MusicDownloadManager *a1, __int64 a2, __int64 a3)
{
unsigned int v5; // w3
__int64 v7; // x0
__int64 CustomSFXObject; // x0
int v9; // w20
__int64 **v10; // x21
__int64 *v11; // x1
int v12; // w3
int v13; // w2
int v15; // [xsp+40h] [xbp+40h] BYREF
int v16; // [xsp+44h] [xbp+44h] BYREF
if ( !*(_QWORD *)(a3 + 16) )
return 0;
v15 = -1;
v7 = std::__tree::__count_unique(a3, &v15);
v5 = 1;
if ( v7 )
return v5;
v16 = 1;
if ( std::__tree::__count_unique(a3, &v16) )
return 1;
CustomSFXObject = MusicDownloadManager::getCustomSFXObject(a1, *(_DWORD *)(a2 + 60));
if ( CustomSFXObject )
{
v9 = 0;
v10 = (__int64 **)(a3 + 8);
while ( 1 )
{
v11 = *v10;
if ( *v10 )
break;
LABEL_12:
++v9;
CustomSFXObject = MusicDownloadManager::getCustomSFXObject(a1, *(_DWORD *)(CustomSFXObject + 60));
if ( !CustomSFXObject || v9 > 99 )
return 0;
}
v12 = *(_DWORD *)(CustomSFXObject + 76);
while ( 1 )
{
while ( 1 )
{
v13 = *((_DWORD *)v11 + 7);
if ( v12 >= v13 )
break;
v11 = (__int64 *)*v11;
if ( !v11 )
goto LABEL_12;
}
if ( v12 <= v13 )
return 1;
v11 = (__int64 *)v11[1];
if ( !v11 )
goto LABEL_12;
}
}
return 0;
}