//
// MusicChangelogPopup::buildContent from 0x1009576b0 to 0x10095833a (3210 bytes)
//
// 1 xrefs:
// > ??> @ 0x100bc9c28
//
// 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:38:41 +0000
//
__m128 __fastcall MusicChangelogPopup::buildContent(__int64 a1, __int64 a2, float a3)
{
__int64 v3; // r14
unsigned int v4; // r13d
void *v5; // rbx
__m128 v6; // xmm0
__m128 v7; // xmm0
__int64 v8; // rax
__int64 v9; // r12
float v10; // xmm0_4
__m128 v11; // xmm1
__int64 v12; // rdi
int v13; // eax
unsigned int v14; // ebx
unsigned int v15; // esi
__int64 v16; // rdi
char *v17; // rax
const std::string::value_type *CString; // rax
__int64 v19; // r14
unsigned int v20; // r8d
__int64 v21; // rax
__int64 v22; // r8
__int64 v23; // rsi
_BYTE *v24; // rdx
__int64 v25; // rsi
unsigned __int64 v26; // r9
unsigned int v27; // ebx
unsigned __int64 v28; // rbx
__int64 v29; // r12
std::string::size_type v30; // rbx
char *data; // r14
unsigned __int64 v32; // r15
size_t v33; // r13
unsigned __int64 v34; // r15
std::string::size_type v35; // rax
char v36; // bl
std::string::size_type size; // r13
__int64 v38; // r8
_OWORD *v39; // r12
const void *v40; // rsi
signed __int64 v41; // r12
unsigned __int64 v42; // r15
_QWORD *v43; // rax
unsigned __int64 v44; // rbx
__int64 v45; // rbx
unsigned __int64 v46; // r15
std::string *v47; // r14
char *v48; // r15
std::string::pointer v49; // rbx
void *v50; // rbx
char *v51; // r14
void *v52; // rdi
unsigned int v53; // esi
__int64 v54; // rax
unsigned __int64 v55; // rsi
_BYTE *v56; // rdx
unsigned __int64 v57; // rdi
void **v58; // rbx
void **v59; // r15
unsigned __int64 v60; // r14
std::string::size_type v61; // rdx
const std::string::value_type *v62; // r15
unsigned int v63; // eax
__int64 v64; // rbx
char *v65; // rdi
const char *v66; // rdi
__int64 v67; // r15
int v68; // eax
__int64 v69; // rbx
__int64 v70; // rcx
__int64 v71; // r15
unsigned int v72; // edx
void **v73; // rdi
char v74; // al
std::string *v75; // rax
const std::string::value_type *v76; // rsi
std::string::size_type v77; // rdx
__int64 v78; // rax
__int64 MusicArtistForID; // rax
std::string::pointer v80; // rdi
void *v81; // rbx
std::string::pointer v82; // rdi
void *v83; // rbx
__m128 v84; // xmm0
__int64 v86; // [rsp+8h] [rbp-138h]
unsigned __int64 v87; // [rsp+10h] [rbp-130h]
void *v88; // [rsp+18h] [rbp-128h]
__int64 v89; // [rsp+20h] [rbp-120h]
__int64 v90; // [rsp+28h] [rbp-118h]
float v92; // [rsp+38h] [rbp-108h]
float v93; // [rsp+3Ch] [rbp-104h]
std::string v94; // [rsp+40h] [rbp-100h] BYREF
std::string v95; // [rsp+60h] [rbp-E0h] BYREF
__int64 v96; // [rsp+78h] [rbp-C8h]
unsigned int v97; // [rsp+80h] [rbp-C0h]
int v98; // [rsp+84h] [rbp-BCh]
int v99; // [rsp+88h] [rbp-B8h]
float v100; // [rsp+8Ch] [rbp-B4h]
std::string __s; // [rsp+90h] [rbp-B0h] BYREF
char *v102; // [rsp+A8h] [rbp-98h]
void **v103; // [rsp+B0h] [rbp-90h]
__m128 v104; // [rsp+C0h] [rbp-80h]
__int64 v105; // [rsp+D0h] [rbp-70h]
__int64 v106; // [rsp+D8h] [rbp-68h]
void *__src[2]; // [rsp+E0h] [rbp-60h] BYREF
void *v108; // [rsp+F0h] [rbp-50h]
std::string __dst; // [rsp+F8h] [rbp-48h] BYREF
signed int v110; // [rsp+114h] [rbp-2Ch]
v100 = a3;
v96 = a2;
v3 = a1;
if ( (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 664)) )
{
v92 = (float)(v100 + -35.0) * 0.60000002;
v93 = v100 + -41.0;
v104 = 0;
v4 = 0;
while ( 1 )
{
v8 = sub_1007FEFE0(*(_QWORD *)(v3 + 664), v4);
if ( v8 )
{
v9 = v8;
v10 = sub_10096F160(v3, v96, *(unsigned int *)(v8 + 56), *(unsigned int *)(v8 + 60), *(double *)v104.i64, v100);
v11 = v104;
v11.f32[0] = v104.f32[0] - v10;
v104 = v11;
v12 = *(_QWORD *)(v9 + 72);
if ( v12 && (v13 = sub_1007FEF90(v12), (v99 = v13) != 0) )
{
if ( v13 > 0 )
{
v14 = 0;
v97 = v4;
v89 = v9;
do
{
v15 = v14;
v98 = *(_DWORD *)(sub_1007FEFE0(*(_QWORD *)(v9 + 72), v14) + 56);
memset(&v94, 0, sizeof(v94));
while ( 1 )
{
v16 = *(_QWORD *)(v9 + 72);
v110 = v15;
v106 = sub_1007FEFE0(v16, v15);
if ( *(_DWORD *)(v106 + 56) != v98 )
break;
if ( (*(_BYTE *)&v94.__r_.__value_.__s.0 & 1) == 0 )
{
if ( !(*(_BYTE *)&v94.__r_.__value_.__l.0 >> 1) )
goto LABEL_20;
LABEL_19:
std::string::append(&v94, ", ");
goto LABEL_20;
}
if ( v94.__r_.__value_.__l.__size_ )
goto LABEL_19;
LABEL_20:
v17 = sub_10088E820("+%i", *(_DWORD *)(v106 + 60));
CString = (const std::string::value_type *)cocos2d::CCString::getCString((__int64)v17);
std::string::append(&v94, CString);
memset(&v95, 0, sizeof(v95));
*(_OWORD *)__src = 0;
v108 = nullptr;
v19 = v106;
v20 = *(unsigned __int8 *)(v106 + 64);
if ( (v20 & 1) != 0 )
{
v21 = *(_QWORD *)(v106 + 80);
v22 = *(_QWORD *)(v106 + 72);
v90 = v106 + 65;
v86 = v22;
if ( v22 )
goto LABEL_22;
}
else
{
v22 = v20 >> 1;
v21 = v106 + 65;
v90 = v106 + 65;
v86 = v22;
if ( v22 )
{
LABEL_22:
v23 = v22;
v24 = (_BYTE *)v21;
while ( *v24 != 46 )
{
++v24;
if ( !--v23 )
{
v24 = (_BYTE *)(v21 + v22);
break;
}
}
v25 = (__int64)&v24[-v21];
if ( v24 == (_BYTE *)(v21 + v22) )
v25 = -1;
goto LABEL_31;
}
}
v25 = -1;
LABEL_31:
v26 = 0;
do
{
v27 = *(unsigned __int8 *)(v19 + 64);
if ( (v27 & 1) != 0 )
{
v28 = *(_QWORD *)(v19 + 72);
if ( v28 < v26 )
LABEL_152:
sub_100056810();
v29 = *(_QWORD *)(v19 + 80);
}
else
{
v28 = v27 >> 1;
v29 = v90;
if ( v26 > v28 )
goto LABEL_152;
}
v30 = v28 - v26;
if ( v30 >= v25 - v26 )
v30 = v25 - v26;
if ( v30 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v105 = v25;
if ( v30 >= 0x17 )
{
v32 = v26;
v33 = (v30 | 7) + 1;
if ( (v30 | 7) == 0x17 )
v33 = 26;
data = (char *)operator new(v33);
__dst.__r_.__value_.__r.__words[2] = (std::string::size_type)data;
__dst.__r_.__value_.__r.__words[0] = v33 | 1;
__dst.__r_.__value_.__l.__size_ = v30;
v26 = v32;
LABEL_47:
v34 = v26;
memmove(data, (const void *)(v26 + v29), v30);
v26 = v34;
goto LABEL_48;
}
__dst.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v30);
data = __dst.__r_.__value_.__s.__data_;
if ( v30 )
goto LABEL_47;
LABEL_48:
data[v30] = 0;
v35 = *(_BYTE *)&__dst.__r_.__value_.__l.0 >> 1;
v36 = *(_BYTE *)&__dst.__r_.__value_.__s.0 & 1;
size = __dst.__r_.__value_.__l.__size_;
if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) != 0 )
v35 = __dst.__r_.__value_.__l.__size_;
v19 = v106;
v38 = v105;
if ( !v35 && v26 == v86 )
goto LABEL_65;
v39 = __src[1];
if ( __src[1] < v108 )
{
if ( v36 )
{
v44 = v26;
sub_10001AD30(
(_QWORD *)__src[1],
__dst.__r_.__value_.__l.__data_,
__dst.__r_.__value_.__l.__size_);
v26 = v44;
v38 = v105;
}
else
{
*((_QWORD *)__src[1] + 2) = __dst.__r_.__value_.__l.__data_;
*v39 = *(_OWORD *)&__dst.__r_.__value_.__l.0;
}
__src[1] = (char *)v39 + 24;
LABEL_65:
v45 = -1;
if ( v38 == -1 )
goto LABEL_66;
goto LABEL_76;
}
v40 = __src[0];
v41 = (char *)__src[1] - (char *)__src[0];
v42 = 0xAAAAAAAAAAAAAAABLL * (((char *)__src[1] - (char *)__src[0]) >> 3) + 1;
if ( v42 > 0xAAAAAAAAAAAAAAALL )
sub_100056A70();
if ( 0x5555555555555556LL * ((signed __int64)((__int64)v108 - (unsigned __int64)__src[0]) >> 3) > v42 )
v42 = 0x5555555555555556LL * ((signed __int64)((__int64)v108 - (unsigned __int64)__src[0]) >> 3);
if ( 0xAAAAAAAAAAAAAAABLL * ((signed __int64)((__int64)v108 - (unsigned __int64)__src[0]) >> 3) >= 0x555555555555555LL )
v42 = 0xAAAAAAAAAAAAAAALL;
v103 = __src;
v87 = v26;
if ( v42 )
{
if ( v42 > 0xAAAAAAAAAAAAAAALL )
sub_10001ADB0();
v88 = __src[0];
v43 = operator new(24 * v42);
v40 = v88;
}
else
{
v43 = nullptr;
}
__s.__r_.__value_.__r.__words[0] = (std::string::size_type)v43;
v47 = (std::string *)&v43[v41 >> 3];
__s.__r_.__value_.__r.__words[2] = (std::string::size_type)v47;
__s.__r_.__value_.__l.__size_ = (std::string::size_type)v47;
v48 = (char *)&v43[3 * v42];
v102 = v48;
if ( v36 )
{
sub_10001AD30(&v43[v41 >> 3], __dst.__r_.__value_.__l.__data_, size);
v49 = __s.__r_.__value_.__l.__data_;
v47 = (std::string *)__s.__r_.__value_.__l.__size_;
v40 = __src[0];
v48 = v102;
v41 = (char *)__src[1] - (char *)__src[0];
}
else
{
*v47 = __dst;
v49 = (std::string::pointer)&v43[v41 >> 3];
}
v50 = v49 + 24;
v51 = (char *)v47 - v41;
memcpy(v51, v40, v41);
v52 = __src[0];
__src[0] = v51;
__src[1] = v50;
v108 = v48;
if ( v52 )
operator delete(v52);
__src[1] = v50;
v19 = v106;
v38 = v105;
v26 = v87;
v45 = -1;
if ( v105 == -1 )
{
LABEL_66:
v4 = v97;
v9 = v89;
goto LABEL_67;
}
LABEL_76:
v53 = *(unsigned __int8 *)(v19 + 64);
v4 = v97;
v9 = v89;
if ( (v53 & 1) != 0 )
{
v54 = *(_QWORD *)(v19 + 80);
v55 = *(_QWORD *)(v19 + 72);
v26 = v38 + 1;
if ( v55 <= v38 + 1 )
goto LABEL_67;
}
else
{
v55 = v53 >> 1;
v54 = v90;
v26 = v38 + 1;
if ( v55 <= v38 + 1 )
goto LABEL_67;
}
v56 = (_BYTE *)(v54 + v26);
v57 = v55 + ~v38;
while ( *v56 != 46 )
{
++v56;
if ( !--v57 )
{
v56 = (_BYTE *)(v54 + v55);
break;
}
}
v45 = (__int64)&v56[-v54];
if ( v56 == (_BYTE *)(v54 + v55) )
v45 = -1;
LABEL_67:
if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) != 0 )
{
v46 = v26;
operator delete(__dst.__r_.__value_.__l.__data_);
v26 = v46;
v38 = v105;
}
v25 = v45;
}
while ( v38 != -1 );
v58 = (void **)__src[0];
v59 = (void **)__src[1];
if ( __src[1] != __src[0] )
{
v60 = 0;
do
{
v63 = LOBYTE(v58[3 * v60]);
if ( (v63 & 1) != 0 )
{
if ( v58[3 * v60 + 1] )
{
LABEL_96:
v64 = MusicDownloadManager::sharedState();
v65 = (char *)__src[0] + 24 * v60;
if ( (*v65 & 1) != 0 )
v66 = *((const char **)v65 + 2);
else
v66 = v65 + 1;
v67 = v64;
v68 = atoi(v66);
v69 = v64 + 472;
v70 = *(_QWORD *)(v67 + 472);
if ( !v70 )
goto LABEL_106;
v71 = v69;
do
{
if ( *(_DWORD *)(v70 + 32) >= v68 )
v71 = v70;
v70 = *(_QWORD *)(v70 + 8LL * (*(_DWORD *)(v70 + 32) < v68));
}
while ( v70 );
if ( v71 == v69 || v68 < *(_DWORD *)(v71 + 32) )
LABEL_106:
v71 = v69;
if ( v71 == MusicDownloadManager::sharedState() + 472 )
goto LABEL_91;
if ( (*(_BYTE *)&v95.__r_.__value_.__s.0 & 1) != 0 )
{
if ( !v95.__r_.__value_.__l.__size_ )
goto LABEL_113;
LABEL_112:
std::string::append(&v95, ", ");
}
else if ( *(_BYTE *)&v95.__r_.__value_.__l.0 >> 1 )
{
goto LABEL_112;
}
LABEL_113:
v72 = *(unsigned __int8 *)(v71 + 40);
if ( (v72 & 1) != 0 )
{
v61 = *(_QWORD *)(v71 + 48);
v62 = *(const std::string::value_type **)(v71 + 56);
}
else
{
v62 = (const std::string::value_type *)(v71 + 41);
v61 = v72 >> 1;
}
std::string::append(&v95, v62, v61);
}
}
else if ( v63 >> 1 )
{
goto LABEL_96;
}
LABEL_91:
++v60;
v58 = (void **)__src[0];
v59 = (void **)__src[1];
}
while ( v60 < 0xAAAAAAAAAAAAAAABLL * (((char *)__src[1] - (char *)__src[0]) >> 3) );
}
if ( v58 )
{
v73 = v58;
if ( v59 != v58 )
{
do
{
if ( (*(_BYTE *)(v59 - 3) & 1) != 0 )
operator delete(*(v59 - 1));
v59 -= 3;
}
while ( v59 != v58 );
v73 = (void **)__src[0];
}
__src[1] = v58;
operator delete(v73);
}
v74 = *(_BYTE *)&v95.__r_.__value_.__s.0 & 1;
if ( (*(_BYTE *)&v95.__r_.__value_.__s.0 & 1) != 0 )
{
v3 = a1;
if ( !v95.__r_.__value_.__l.__size_ )
goto LABEL_135;
LABEL_127:
std::operator+(&__dst, " (", &v95);
v75 = std::string::append(&__dst, ")");
__s = *v75;
*(_OWORD *)&v75->__r_.__value_.__l.0 = 0;
v75->__r_.__value_.__r.__words[2] = 0;
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) != 0 )
{
v76 = __s.__r_.__value_.__l.__data_;
v77 = __s.__r_.__value_.__l.__size_;
}
else
{
v77 = *(_BYTE *)&__s.__r_.__value_.__l.0 >> 1;
v76 = __s.__r_.__value_.__s.__data_;
}
std::string::append(&v94, v76, v77);
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__dst.__r_.__value_.__l.__data_);
v74 = *(_BYTE *)&v95.__r_.__value_.__s.0 & 1;
goto LABEL_135;
}
v3 = a1;
if ( *(_BYTE *)&v95.__r_.__value_.__l.0 >> 1 )
goto LABEL_127;
LABEL_135:
if ( v74 )
operator delete(v95.__r_.__value_.__l.__data_);
v15 = v110 + 1;
if ( v110 + 1 >= v99 )
goto LABEL_138;
}
v15 = v110;
LABEL_138:
v110 = v15;
__s.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)14;
strcpy(__s.__r_.__value_.__s.__data_, "Unknown");
v78 = MusicDownloadManager::sharedState();
MusicArtistForID = MusicDownloadManager::getMusicArtistForID(v78, v98);
if ( MusicArtistForID )
std::string::operator=(&__s, (const std::string *)(MusicArtistForID + 64));
std::string::append(&__s, ":");
v80 = __s.__r_.__value_.__s.__data_;
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) != 0 )
v80 = __s.__r_.__value_.__l.__data_;
v81 = cocos2d::CCLabelBMFont::create_3((__int64)v80, (__int64)"chatFont.fnt");
(*(void (__fastcall **)(void *, float))(*(_QWORD *)v81 + 160LL))(v81, 0.64999998);
cocos2d::CCLabelBMFont::limitLabelWidth((__int64)v81, v92, (__m128)0x3F266666u, (__m128)0x3EB33333u);
sub_100278250((float *)&__dst, 0.0, 0.5);
(*(void (__fastcall **)(void *, std::string *))(*(_QWORD *)v81 + 296LL))(v81, &__dst);
*(float *)&v106 = v104.f32[0] + -8.0;
sub_100278250((float *)&__dst, 22.0, v104.f32[0] + -8.0);
(*(void (__fastcall **)(void *, std::string *))(*(_QWORD *)v81 + 184LL))(v81, &__dst);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v96 + 456LL))(v96, v81);
(*(void (__fastcall **)(std::string *, void *))(*(_QWORD *)v81 + 336LL))(&__dst, v81);
v82 = v94.__r_.__value_.__s.__data_;
if ( (*(_BYTE *)&v94.__r_.__value_.__s.0 & 1) != 0 )
v82 = v94.__r_.__value_.__l.__data_;
LODWORD(v105) = __dst.__r_.__value_.__l.0;
v83 = cocos2d::CCLabelBMFont::create_3((__int64)v82, (__int64)"chatFont.fnt");
(*(void (__fastcall **)(void *, float))(*(_QWORD *)v83 + 160LL))(v83, 0.60000002);
__dst.__r_.__value_.__s.__data_[1] = -76;
*(_WORD *)&__dst.__r_.__value_.__l.0 = -19276;
(*(void (__fastcall **)(void *, std::string *))(*(_QWORD *)v83 + 1072LL))(v83, &__dst);
cocos2d::CCLabelBMFont::limitLabelWidth(
(__int64)v83,
v93 - *(float *)&v105,
(__m128)0x3F19999Au,
(__m128)0x3E800000u);
sub_100278250((float *)&__dst, 0.0, 0.5);
(*(void (__fastcall **)(void *, std::string *))(*(_QWORD *)v83 + 296LL))(v83, &__dst);
sub_100278250((float *)&__dst, (float)(*(float *)&v105 + 22.0) + 6.0, *(float *)&v106);
(*(void (__fastcall **)(void *, std::string *))(*(_QWORD *)v83 + 184LL))(v83, &__dst);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v96 + 456LL))(v96, v83);
v84 = v104;
v84.f32[0] = v104.f32[0] + -16.0;
v104 = v84;
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) != 0 )
{
operator delete(__s.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v94.__r_.__value_.__s.0 & 1) != 0 )
goto LABEL_148;
}
else if ( (*(_BYTE *)&v94.__r_.__value_.__s.0 & 1) != 0 )
{
LABEL_148:
operator delete(v94.__r_.__value_.__l.__data_);
}
v14 = v110;
}
while ( v110 < v99 );
}
}
else
{
v5 = cocos2d::CCLabelBMFont::create_3((__int64)"(no new songs)", (__int64)"chatFont.fnt");
(*(void (__fastcall **)(void *, float))(*(_QWORD *)v5 + 160LL))(v5, 0.55000001);
memset(&__s, 150, 3);
(*(void (__fastcall **)(void *, std::string *))(*(_QWORD *)v5 + 1072LL))(v5, &__s);
sub_100278250((float *)&__s, 0.0, 0.5);
(*(void (__fastcall **)(void *, std::string *))(*(_QWORD *)v5 + 296LL))(v5, &__s);
sub_100278250((float *)&__s, 22.0, v104.f32[0] + -7.0);
(*(void (__fastcall **)(void *, std::string *))(*(_QWORD *)v5 + 184LL))(v5, &__s);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v96 + 456LL))(v96, v5);
v6 = v104;
v6.f32[0] = v104.f32[0] + -14.0;
v104 = v6;
}
v7 = v104;
v7.f32[0] = v104.f32[0] + -10.0;
v104 = v7;
}
if ( ++v4 >= (unsigned int)sub_1007FEF90(*(_QWORD *)(v3 + 664)) )
return _mm_xor_ps(v104, (__m128)xmmword_100A035F0);
}
}
v104 = 0;
return _mm_xor_ps(v104, (__m128)xmmword_100A035F0);
}