//
// SongInfoObject::getArtistLinks from 0x96358c to 0x9638a8 (796 bytes)
//
// 3 xrefs:
// > sub_741684 @ 0x7416b0
// > SongInfoLayer::create @ 0x9064c0
// > ??> @ 0x8e498
//
// 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:34 +0000
//
__int64 *__usercall SongInfoObject::getArtistLinks@(__int64 *__return_ptr a1@, SongInfoObject *this@)
{
MusicDownloadManager *v3; // x0
__int64 *v5; // x2
__int64 v6; // x1
int v8; // w5
__int64 v9; // x0
__int64 v10; // x2
__int64 v11; // x3
int *v12; // x2
__int64 v13; // x0
int v14; // t1
cocos2d::CCString *v15; // x0
char *CString; // x0
__int64 v17; // x20
char v18; // w0
size_t v19; // x3
char v20; // w1
size_t v21; // x3
MusicDownloadManager *v22; // x0
__int64 MusicArtistForID; // x0
int v24; // [xsp+40h] [xbp+40h] BYREF
int v25; // [xsp+44h] [xbp+44h]
__int64 v26; // [xsp+48h] [xbp+48h]
size_t v27; // [xsp+50h] [xbp+50h]
void *v28; // [xsp+58h] [xbp+58h]
__int64 v29; // [xsp+60h] [xbp+60h] BYREF
size_t v30; // [xsp+68h] [xbp+68h]
void *v31; // [xsp+70h] [xbp+70h]
__int64 v32; // [xsp+78h] [xbp+78h]
v3 = (MusicDownloadManager *)(&loc_98967C + 3);
a1[1] = 0;
a1[2] = 0;
v5 = (__int64 *)((char *)this + 600);
v6 = _stack_chk_guard;
*a1 = 0;
v32 = v6;
if ( *((int *)this + 79) <= 9999999 )
{
if ( a1 != v5 )
std::vector::assign(a1, *((_QWORD *)this + 75), *((_QWORD *)this + 76));
v8 = *((_BYTE *)this + 344) & 1;
if ( (*((_BYTE *)this + 344) & 1) != 0 )
v9 = *((_QWORD *)this + 44);
else
v9 = *((_BYTE *)this + 344) >> 1;
if ( v9 )
{
v10 = *a1;
v11 = 0x6DB6DB6DB6DB6DB7LL * ((a1[1] - *a1) >> 3);
if ( v11 )
{
if ( *(_DWORD *)(v10 + 4) == 2 )
return a1;
v12 = (int *)(v10 + 60);
v13 = 0;
while ( ++v13 != v11 )
{
v14 = *v12;
v12 += 14;
if ( v14 == 2 )
return a1;
}
}
v24 = *((_DWORD *)this + 98);
v26 = 0;
v27 = 0;
v28 = nullptr;
v29 = 0;
v30 = 0;
v31 = nullptr;
v25 = 2;
if ( v8 )
v15 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"https://%s.newgrounds.com/audio",
*((const char **)this + 45));
else
v15 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"https://%s.newgrounds.com/audio",
(const char *)this + 345);
CString = (char *)cocos2d::CCString::getCString(v15);
std::string::assign(&v29, CString);
v17 = a1[1];
if ( v17 == a1[2] )
{
std::vector::__push_back_slow_path(a1, (__int64)&v24);
}
else
{
if ( v17 )
{
*(_DWORD *)v17 = v24;
*(_QWORD *)(v17 + 8) = 0;
*(_DWORD *)(v17 + 4) = v25;
*(_QWORD *)(v17 + 16) = 0;
v18 = v26;
*(_QWORD *)(v17 + 24) = 0;
if ( (v18 & 1) != 0 )
{
std::string::__init((__int64 *)(v17 + 8), v28, v27);
}
else
{
v19 = v27;
*(_QWORD *)(v17 + 8) = v26;
*(_QWORD *)(v17 + 16) = v19;
*(_QWORD *)(v17 + 24) = v28;
}
*(_QWORD *)(v17 + 32) = 0;
*(_QWORD *)(v17 + 40) = 0;
v20 = v29;
*(_QWORD *)(v17 + 48) = 0;
if ( (v20 & 1) != 0 )
{
std::string::__init((__int64 *)(v17 + 32), v31, v30);
}
else
{
v21 = v30;
*(_QWORD *)(v17 + 32) = v29;
*(_QWORD *)(v17 + 40) = v21;
*(_QWORD *)(v17 + 48) = v31;
}
v17 = a1[1];
}
a1[1] = v17 + 56;
}
if ( (v29 & 1) != 0 )
operator delete(v31);
if ( (v26 & 1) != 0 )
operator delete(v28);
}
}
else if ( a1 == v5
|| (std::vector::assign(a1, *((_QWORD *)this + 75), *((_QWORD *)this + 76)),
v3 = (MusicDownloadManager *)a1[1],
(MusicDownloadManager *)*a1 == v3) )
{
v22 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v3);
MusicArtistForID = MusicDownloadManager::getMusicArtistForID(v22, *((_DWORD *)this + 98));
if ( MusicArtistForID && a1 != (__int64 *)(MusicArtistForID + 88) )
std::vector::assign(
a1,
*(_QWORD *)(MusicArtistForID + 88),
*(_QWORD *)(MusicArtistForID + 96));
}
return a1;
}