//
// SongInfoObject::getArtistNames from 0x100665800 to 0x100665dd5 (1493 bytes)
//
// 1 xrefs:
// > SongInfoLayer::create_2 @ 0x1006d79c2
//
// 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
//
std::string *__fastcall SongInfoObject::getArtistNames(std::string *this, __int64 a2)
{
std::string *v2; // rbx
unsigned int v3; // eax
__int64 v4; // rax
std::string::size_type size; // r12
std::string::size_type v6; // r13
void *v7; // rdi
__int64 v8; // rbx
unsigned __int64 v9; // r15
int v10; // eax
char *v11; // rax
__int64 *v12; // r15
__int64 v13; // rdi
__int64 v14; // rax
std::string::size_type v15; // rcx
char v16; // r8
std::string::size_type v17; // r9
std::string::size_type v18; // rax
std::string::size_type v19; // rax
unsigned int v20; // eax
unsigned __int64 v21; // rbx
unsigned __int64 v22; // rdi
__int64 **v23; // rax
const std::string::value_type *data; // rsi
__int64 *v25; // r11
__int64 v26; // rax
unsigned __int64 v27; // rax
char *v28; // rax
void **v29; // r14
void *v30; // rdi
void **v32; // rbx
void *v33[2]; // [rsp+0h] [rbp-B0h] BYREF
void *v34[2]; // [rsp+10h] [rbp-A0h]
int v35; // [rsp+20h] [rbp-90h]
std::string __str; // [rsp+30h] [rbp-80h] BYREF
int *v37; // [rsp+50h] [rbp-60h] BYREF
int v38; // [rsp+5Ch] [rbp-54h] BYREF
std::string __p; // [rsp+60h] [rbp-50h] BYREF
std::string *v40; // [rsp+80h] [rbp-30h]
v2 = this;
if ( (*(_BYTE *)(a2 + 344) & 1) != 0 )
{
sub_10001AD30(this, *(const void **)(a2 + 360), *(_QWORD *)(a2 + 352));
if ( !*(_QWORD *)(a2 + 512) )
return v2;
}
else
{
*this = *(std::string *)(a2 + 344);
if ( !*(_QWORD *)(a2 + 512) )
return v2;
}
*(_OWORD *)v34 = 0;
*(_OWORD *)v33 = 0;
v35 = 1065353216;
v3 = *(unsigned __int8 *)(a2 + 464);
if ( (v3 & 1) == 0 )
{
v40 = this;
if ( !(v3 >> 1) )
goto LABEL_29;
goto LABEL_9;
}
v4 = *(_QWORD *)(a2 + 472);
v40 = this;
if ( v4 )
{
LABEL_9:
memset(&__p, 0, sizeof(__p));
sub_10064E0E0((unsigned __int8 *)(a2 + 464), ",", (__int64)&__p);
size = __p.__r_.__value_.__l.__size_;
v6 = __p.__r_.__value_.__r.__words[0];
if ( __p.__r_.__value_.__l.__size_ == __p.__r_.__value_.__r.__words[0]
|| 0xAAAAAAAAAAAAAAABLL * ((__int64)(__p.__r_.__value_.__l.__size_ - __p.__r_.__value_.__r.__words[0]) >> 3) < 2 )
{
LABEL_10:
v2 = v40;
if ( v6 )
{
v7 = (void *)v6;
if ( size != v6 )
{
do
{
if ( (*(_BYTE *)(size - 24) & 1) != 0 )
operator delete(*(void **)(size - 8));
size -= 24LL;
}
while ( size != v6 );
v7 = (void *)__p.__r_.__value_.__r.__words[0];
}
__p.__r_.__value_.__l.__size_ = v6;
operator delete(v7);
}
goto LABEL_29;
}
v8 = 40;
v9 = 0;
while ( 1 )
{
if ( (*(_BYTE *)(v6 + v8 - 40) & 1) != 0 )
{
v10 = atoi(*(const char **)(v6 + v8 - 24));
v38 = v10;
if ( (*(_BYTE *)(v6 + v8 - 16) & 1) == 0 )
{
LABEL_22:
__str = *(std::string *)(v8 + v6 - 16);
goto LABEL_23;
}
}
else
{
v10 = atoi((const char *)(v8 + v6 - 39));
v38 = v10;
if ( (*(_BYTE *)(v6 + v8 - 16) & 1) == 0 )
goto LABEL_22;
}
sub_10001AD30(&__str, *(const void **)(v6 + v8), *(_QWORD *)(v6 + v8 - 8));
v10 = v38;
LABEL_23:
if ( v10 > 0 && v10 != 10004636 )
{
v37 = &v38;
v11 = sub_1000E8600((float *)v33, &v38, (__int64)&unk_100A0E145, &v37);
std::string::operator=((std::string *)v11 + 1, &__str);
}
if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__str.__r_.__value_.__l.__data_);
v9 += 2LL;
size = __p.__r_.__value_.__l.__size_;
v6 = __p.__r_.__value_.__r.__words[0];
v8 += 48;
if ( v9 >= 0xAAAAAAAAAAAAAAABLL
* ((__int64)(__p.__r_.__value_.__l.__size_ - __p.__r_.__value_.__r.__words[0]) >> 3) )
goto LABEL_10;
}
}
LABEL_29:
v12 = *(__int64 **)(a2 + 504);
if ( v12 )
{
while ( 1 )
{
LODWORD(v37) = *((_DWORD *)v12 + 4);
if ( (_DWORD)v37 != 10004636 )
break;
LABEL_31:
v12 = (__int64 *)*v12;
if ( !v12 )
goto LABEL_82;
}
memset(&__p, 0, sizeof(__p));
v13 = *(_QWORD *)(MusicDownloadManager::sharedState() + 448);
if ( v13 )
{
v14 = cocos2d::CCDictionary::objectForKey_1(v13, (int)v37);
if ( v14 )
std::string::operator=(&__p, (const std::string *)(v14 + 64));
}
v15 = *(_BYTE *)&__p.__r_.__value_.__l.0 >> 1;
v16 = *(_BYTE *)&__p.__r_.__value_.__s.0 & 1;
v17 = __p.__r_.__value_.__l.__size_;
v18 = __p.__r_.__value_.__l.__size_;
if ( (*(_BYTE *)&__p.__r_.__value_.__s.0 & 1) == 0 )
v18 = *(_BYTE *)&__p.__r_.__value_.__l.0 >> 1;
if ( v18 || !v33[1] )
{
LABEL_39:
v19 = v17;
if ( !v16 )
v19 = v15;
if ( !v19 )
goto LABEL_54;
v20 = (unsigned int)v2->__r_.__value_.__l.0;
if ( (v20 & 1) != 0 )
{
if ( !v2->__r_.__value_.__l.__size_ )
goto LABEL_51;
}
else if ( !(v20 >> 1) )
{
LABEL_51:
data = __p.__r_.__value_.__s.__data_;
if ( v16 )
{
data = __p.__r_.__value_.__l.__data_;
v15 = v17;
}
std::string::append(v2, data, v15);
v16 = *(_BYTE *)&__p.__r_.__value_.__s.0 & 1;
LABEL_54:
if ( v16 )
operator delete(__p.__r_.__value_.__l.__data_);
goto LABEL_31;
}
std::string::append(v2, ", ");
v17 = __p.__r_.__value_.__l.__size_;
v16 = *(_BYTE *)&__p.__r_.__value_.__s.0 & 1;
v15 = *(_BYTE *)&__p.__r_.__value_.__l.0 >> 1;
goto LABEL_51;
}
v21 = (0x101010101010101LL
* (((((unsigned __int64)v33[1] - (((unsigned __int64)v33[1] >> 1) & 0x5555555555555555LL))
& 0x3333333333333333LL)
+ ((((unsigned __int64)v33[1] - (((unsigned __int64)v33[1] >> 1) & 0x5555555555555555LL)) >> 2)
& 0x3333333333333333LL)
+ (((((unsigned __int64)v33[1] - (((unsigned __int64)v33[1] >> 1) & 0x5555555555555555LL))
& 0x3333333333333333LL)
+ ((((unsigned __int64)v33[1] - (((unsigned __int64)v33[1] >> 1) & 0x5555555555555555LL)) >> 2)
& 0x3333333333333333LL)) >> 4))
& 0xF0F0F0F0F0F0F0FLL)) >> 56;
if ( v21 <= 1 )
{
v22 = (int)v37 & ((unsigned __int64)v33[1] - 1);
v23 = *((__int64 ***)v33[0] + v22);
if ( !v23 )
goto LABEL_81;
LABEL_60:
v25 = *v23;
if ( *v23 )
{
if ( (unsigned int)v21 < 2 )
{
v2 = v40;
while ( 1 )
{
v26 = v25[1];
if ( v26 == (int)v37 )
{
if ( *((_DWORD *)v25 + 4) == (_DWORD)v37 )
goto LABEL_79;
}
else if ( (((unsigned __int64)v33[1] - 1) & v26) != v22 )
{
goto LABEL_39;
}
v25 = (__int64 *)*v25;
if ( !v25 )
goto LABEL_39;
}
}
v2 = v40;
while ( 1 )
{
v27 = v25[1];
if ( v27 == (int)v37 )
{
if ( *((_DWORD *)v25 + 4) == (_DWORD)v37 )
{
LABEL_79:
__str.__r_.__value_.__r.__words[0] = (std::string::size_type)&v37;
v28 = sub_1000E8600((float *)v33, (int *)&v37, (__int64)&unk_100A0E145, &__str);
std::string::operator=(&__p, (const std::string *)v28 + 1);
v17 = __p.__r_.__value_.__l.__size_;
v16 = *(_BYTE *)&__p.__r_.__value_.__s.0 & 1;
v15 = *(_BYTE *)&__p.__r_.__value_.__l.0 >> 1;
goto LABEL_39;
}
}
else
{
if ( (void *)v27 < v33[1] )
goto LABEL_75;
if ( ((unsigned __int64)v33[1] | v27) >> 32 )
{
v27 %= (unsigned __int64)v33[1];
LABEL_75:
if ( v27 != v22 )
goto LABEL_39;
goto LABEL_70;
}
if ( (unsigned int)v27 % LODWORD(v33[1]) != v22 )
goto LABEL_39;
}
LABEL_70:
v25 = (__int64 *)*v25;
if ( !v25 )
goto LABEL_39;
}
}
LABEL_81:
v2 = v40;
goto LABEL_39;
}
v22 = (int)v37;
if ( v33[1] <= (void *)(int)v37 )
{
if ( !(((unsigned __int64)v33[1] | (int)v37) >> 32) )
{
v22 = (unsigned int)v37 % LODWORD(v33[1]);
v23 = *((__int64 ***)v33[0] + v22);
if ( !v23 )
goto LABEL_81;
goto LABEL_60;
}
v22 = (int)v37 % (unsigned __int64)v33[1];
}
v23 = *((__int64 ***)v33[0] + v22);
if ( !v23 )
goto LABEL_81;
goto LABEL_60;
}
LABEL_82:
v29 = (void **)v34[0];
if ( v34[0] )
{
do
{
v32 = (void **)*v29;
if ( ((_BYTE)v29[3] & 1) != 0 )
operator delete(v29[5]);
operator delete(v29);
v29 = v32;
}
while ( v32 );
}
v30 = v33[0];
v33[0] = nullptr;
if ( v30 )
operator delete(v30);
return v40;
}