//
// MusicDownloadManager::filterMusicByArtistID from 0x10065e800 to 0x10065ea1f (543 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: pc, 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:34:55 +0000
//
__int64 __fastcall MusicDownloadManager::filterMusicByArtistID(__int64 a1, int a2, __int64 a3)
{
__int64 v5; // r14
unsigned int *v6; // rax
__int64 *v7; // r12
unsigned __int64 v8; // r13
__int64 v9; // rsi
unsigned __int64 v10; // rdi
unsigned __int64 v11; // r9
unsigned __int64 v12; // rcx
__int64 **v13; // rax
__int64 *v14; // r8
unsigned __int64 v15; // rdi
unsigned __int64 v16; // rax
__int64 v17; // rax
v5 = sub_1007FE900(a1);
if ( a3 )
{
v6 = *(unsigned int **)(a3 + 56);
if ( *v6 )
{
v7 = *((__int64 **)v6 + 2);
v8 = (unsigned __int64)&v7[*v6 - 1];
do
{
v9 = *v7;
if ( !*v7 )
return v5;
if ( *(_DWORD *)(v9 + 392) == a2 )
{
LABEL_4:
sub_1007FEBF0(v5, v9);
goto LABEL_5;
}
v10 = *(_QWORD *)(v9 + 496);
if ( !v10 )
goto LABEL_5;
v11 = (0x101010101010101LL
* ((((v10 - ((v10 >> 1) & 0x5555555555555555LL)) & 0x3333333333333333LL)
+ (((v10 - ((v10 >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL)
+ ((((v10 - ((v10 >> 1) & 0x5555555555555555LL)) & 0x3333333333333333LL)
+ (((v10 - ((v10 >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL)) >> 4))
& 0xF0F0F0F0F0F0F0FLL)) >> 56;
if ( v11 > 1 )
{
v12 = a2;
if ( v10 > a2 )
goto LABEL_15;
if ( (v10 | a2) >> 32 )
{
v12 = a2 % v10;
LABEL_15:
v13 = *(__int64 ***)(*(_QWORD *)(v9 + 488) + 8 * v12);
if ( !v13 )
goto LABEL_5;
goto LABEL_16;
}
v12 = a2 % (unsigned int)v10;
v13 = *(__int64 ***)(*(_QWORD *)(v9 + 488) + 8 * v12);
if ( !v13 )
goto LABEL_5;
}
else
{
v12 = a2 & (v10 - 1);
v13 = *(__int64 ***)(*(_QWORD *)(v9 + 488) + 8 * v12);
if ( !v13 )
goto LABEL_5;
}
LABEL_16:
v14 = *v13;
if ( *v13 )
{
if ( (unsigned int)v11 < 2 )
{
v15 = v10 - 1;
while ( 1 )
{
v17 = v14[1];
if ( v17 == a2 )
{
if ( *((_DWORD *)v14 + 4) == a2 )
goto LABEL_4;
}
else if ( (v15 & v17) != v12 )
{
goto LABEL_5;
}
v14 = (__int64 *)*v14;
if ( !v14 )
goto LABEL_5;
}
}
while ( 1 )
{
v16 = v14[1];
if ( v16 == a2 )
{
if ( *((_DWORD *)v14 + 4) == a2 )
goto LABEL_4;
goto LABEL_20;
}
if ( v16 < v10 )
goto LABEL_25;
if ( (v10 | v16) >> 32 )
break;
if ( (unsigned int)v16 % (unsigned int)v10 != v12 )
goto LABEL_5;
LABEL_20:
v14 = (__int64 *)*v14;
if ( !v14 )
goto LABEL_5;
}
v16 %= v10;
LABEL_25:
if ( v16 != v12 )
goto LABEL_5;
goto LABEL_20;
}
LABEL_5:
++v7;
}
while ( (unsigned __int64)v7 <= v8 );
}
}
return v5;
}