//
// SongInfoObject::getArtistNames from 0x45b5cc to 0x45b7e4 (536 bytes)
//
// 1 xrefs:
// > CustomSongWidget::onMore @ 0x3dd458
//
// 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
//
SongInfoObject *__fastcall SongInfoObject::getArtistNames(SongInfoObject *this, _DWORD *a2)
{
unsigned int v4; // r0
int *v5; // r8
size_t v6; // r4
int v7; // r3
unsigned int i; // r4
_DWORD *v9; // r0
_DWORD *j; // r4
MusicDownloadManager *v11; // r0
MusicArtistObject *MusicArtistForID; // r1
_DWORD *v13; // r2
_DWORD *v14; // r2
int v15; // r3
_DWORD *v16; // r0
char *v18; // [sp+Ch] [bp-38h] BYREF
int v19; // [sp+10h] [bp-34h] BYREF
char *v20; // [sp+14h] [bp-30h] BYREF
int v21; // [sp+18h] [bp-2Ch]
int v22; // [sp+1Ch] [bp-28h]
int *v23; // [sp+20h] [bp-24h] BYREF
unsigned int v24; // [sp+24h] [bp-20h]
int v25; // [sp+28h] [bp-1Ch]
int v26; // [sp+2Ch] [bp-18h]
_DWORD v27[2]; // [sp+30h] [bp-14h] BYREF
int v28; // [sp+38h] [bp-Ch] BYREF
sub_775C20(this);
if ( a2[88] )
{
v25 = 0;
v26 = 0;
v27[0] = 1065353216;
v27[1] = 0;
v4 = sub_773A14(v27, 10);
v24 = v4;
if ( v4 == 1 )
{
v28 = 0;
v5 = &v28;
}
else
{
if ( v4 >= 0x40000000 )
sub_772FB4(v4);
v6 = 4 * v4;
v5 = (int *)operator new(4 * v4);
memset(v5, 0, v6);
}
v7 = a2[84];
v23 = v5;
if ( *(_DWORD *)(v7 - 12) )
{
v20 = nullptr;
v21 = 0;
v22 = 0;
sub_45A6C8(a2 + 84, ",", (int)&v20);
if ( (unsigned int)(v21 - (_DWORD)v20) > 7 )
{
for ( i = 0; i < (v21 - (int)v20) >> 2; i += 2 )
{
v18 = (char *)atoi(*(const char **)&v20[4 * i]);
sub_775C20(&v19);
if ( (int)v18 > 0 && v18 != " not right" )
{
v9 = std::__detail::_Map_base,std::allocator>,std::__detail::_Select1st,std::equal_to,std::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits,true>::operator[](
&v23,
(unsigned int *)&v18);
sub_775D40(v9, &v19);
}
sub_774008(&v19);
}
}
std::vector::~vector((void **)&v20);
}
for ( j = (_DWORD *)a2[87]; j; j = (_DWORD *)*j )
{
v19 = j[1];
if ( (char *)v19 != " not right" )
{
v20 = (char *)&unk_ACDDA8;
v11 = MusicDownloadManager::sharedState();
MusicArtistForID = MusicDownloadManager::getMusicArtistForID(v11, v19);
if ( MusicArtistForID )
sub_775D40(&v20, &MusicArtistForID->m_artistName);
if ( !*(_DWORD *)&v20[-12] )
{
v13 = (_DWORD *)v23[v19 % v24];
if ( v13 )
{
v14 = (_DWORD *)*v13;
if ( v14 )
{
v15 = *(_DWORD *)&v20[-12];
do
{
if ( v19 == v14[1] )
{
++v15;
}
else if ( v15 )
{
goto LABEL_35;
}
v14 = (_DWORD *)*v14;
}
while ( v14 && v14[1] % v24 == v19 % v24 );
if ( !v15 )
goto LABEL_23;
LABEL_35:
v16 = std::__detail::_Map_base,std::allocator>,std::__detail::_Select1st,std::equal_to,std::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits,true>::operator[](
&v23,
(unsigned int *)&v19);
sub_775D40(&v20, v16);
}
}
}
LABEL_23:
if ( *(_DWORD *)&v20[-12] )
{
if ( this->__vftable[-1].removeAllComponents )
sub_774544((int)this, ", ");
sub_77441C(this, &v20);
}
sub_774008(&v20);
}
}
std::_Hashtable,std::allocator>,std::__detail::_Select1st,std::equal_to,std::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits>::~_Hashtable((int)&v23);
}
return this;
}