//
// SongInfoObject::getArtistLinks from 0x100666320 to 0x10066653f (543 bytes)
//
// 2 xrefs:
// > sub_10023D740 @ 0x10023d757
// > SongInfoLayer::create_2 @ 0x1006d77e0
//
// 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:58 +0000
//
__int64 __fastcall SongInfoObject::getArtistLinks(__int64 a1, __int64 a2)
{
__int64 v3; // rax
__int64 v4; // rdi
__int64 v5; // rax
unsigned int v6; // eax
__int64 v7; // rdx
__int64 v8; // rcx
unsigned __int64 v9; // rcx
_DWORD *v10; // rdx
__int64 v11; // r8
unsigned __int64 v12; // rdi
bool v13; // zf
__int64 v14; // rax
const std::string::value_type *CString; // rax
int v17; // [rsp+0h] [rbp-50h] BYREF
__int128 v18; // [rsp+8h] [rbp-48h]
void *v19[7]; // [rsp+18h] [rbp-38h] BYREF
*(_OWORD *)a1 = 0;
*(_QWORD *)(a1 + 16) = 0;
v3 = a2 + 600;
if ( *(int *)(a2 + 316) < 10000000 )
{
if ( v3 != a1 )
sub_10066D860(
a1,
*(_QWORD *)(a2 + 600),
*(_QWORD *)(a2 + 608),
0x6DB6DB6DB6DB6DB7LL * ((__int64)(*(_QWORD *)(a2 + 608) - *(_QWORD *)(a2 + 600)) >> 3));
v6 = *(unsigned __int8 *)(a2 + 344);
if ( (v6 & 1) != 0 )
{
if ( !*(_QWORD *)(a2 + 352) )
return a1;
}
else if ( !(v6 >> 1) )
{
return a1;
}
v7 = *(_QWORD *)a1;
v8 = *(_QWORD *)(a1 + 8) - *(_QWORD *)a1;
if ( !v8 )
goto LABEL_20;
v9 = 0x6DB6DB6DB6DB6DB7LL * (v8 >> 3);
if ( *(_DWORD *)(v7 + 4) != 2 )
{
v10 = (_DWORD *)(v7 + 60);
v11 = 1;
do
{
v12 = v11;
if ( (v9 == 0) + v9 == v11 )
break;
++v11;
v13 = *v10 == 2;
v10 += 14;
}
while ( !v13 );
if ( v12 >= v9 )
{
LABEL_20:
memset(v19, 0, 32);
v18 = 0;
v14 = sub_10088E820("https://%s.newgrounds.com/audio", *(_DWORD *)(a2 + 392));
CString = (const std::string::value_type *)cocos2d::CCString::getCString(v14);
std::string::assign((std::string *)&v19[1], CString);
sub_10065D550(a1, (__int64)&v17);
if ( ((__int64)v19[1] & 1) != 0 )
operator delete(v19[3]);
if ( (v18 & 1) != 0 )
operator delete(v19[0]);
}
}
}
else if ( v3 == a1
|| (sub_10066D860(
a1,
*(_QWORD *)(a2 + 600),
*(_QWORD *)(a2 + 608),
0x6DB6DB6DB6DB6DB7LL * ((__int64)(*(_QWORD *)(a2 + 608) - *(_QWORD *)(a2 + 600)) >> 3)),
*(_QWORD *)a1 == *(_QWORD *)(a1 + 8)) )
{
v4 = *(_QWORD *)(MusicDownloadManager::sharedState() + 448);
if ( v4 )
{
v5 = cocos2d::CCDictionary::objectForKey_1(v4, *(int *)(a2 + 392));
if ( v5 )
{
if ( v5 + 88 != a1 )
sub_10066D860(
a1,
*(_QWORD *)(v5 + 88),
*(_QWORD *)(v5 + 96),
0x6DB6DB6DB6DB6DB7LL * ((__int64)(*(_QWORD *)(v5 + 96) - *(_QWORD *)(v5 + 88)) >> 3));
}
}
}
return a1;
}