//
// SongInfoObject::createWithCoder from 0x100664a50 to 0x1006651f5 (1957 bytes)
//
// 1 xrefs:
// > GJObjectDecoder::getDecodedObject @ 0x1008037f2
//
// 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::createWithCoder(__int64 a1, double a2)
{
double FloatForKey; // xmm0_8
int v3; // r14d
int v4; // r13d
unsigned __int8 BoolForKey; // bl
int v6; // r15d
double v7; // xmm0_8
char *v8; // r14
__int64 v9; // r15
__int64 i; // r13
__int64 v11; // r15
std::string::size_type v12; // r13
std::string *v13; // rbx
__int64 j; // r14
unsigned int v15; // eax
unsigned int v16; // eax
char v17; // al
std::string __str; // [rsp+28h] [rbp-1C8h] BYREF
unsigned __int8 *v20; // [rsp+40h] [rbp-1B0h]
__int16 v21; // [rsp+48h] [rbp-1A8h] BYREF
unsigned __int64 v22; // [rsp+50h] [rbp-1A0h]
void *v23; // [rsp+58h] [rbp-198h]
std::string v24; // [rsp+60h] [rbp-190h] BYREF
__int16 v25; // [rsp+78h] [rbp-178h] BYREF
unsigned __int64 v26; // [rsp+80h] [rbp-170h]
void *v27; // [rsp+88h] [rbp-168h]
__int128 v28; // [rsp+90h] [rbp-160h] BYREF
void *__p; // [rsp+A0h] [rbp-150h]
__int128 v30; // [rsp+B0h] [rbp-140h] BYREF
void *v31; // [rsp+C0h] [rbp-130h]
__int128 v32; // [rsp+D0h] [rbp-120h] BYREF
void *v33; // [rsp+E0h] [rbp-110h]
__int128 v34; // [rsp+F0h] [rbp-100h] BYREF
void *v35; // [rsp+100h] [rbp-F0h]
__int128 v36; // [rsp+108h] [rbp-E8h] BYREF
__int64 v37; // [rsp+118h] [rbp-D8h]
__int128 v38; // [rsp+120h] [rbp-D0h] BYREF
void *v39; // [rsp+130h] [rbp-C0h]
__int128 v40; // [rsp+138h] [rbp-B8h] BYREF
void *v41; // [rsp+148h] [rbp-A8h]
__int128 v42; // [rsp+150h] [rbp-A0h] BYREF
void *v43; // [rsp+160h] [rbp-90h]
__int128 v44; // [rsp+168h] [rbp-88h] BYREF
void *v45; // [rsp+178h] [rbp-78h]
unsigned __int8 *v46; // [rsp+180h] [rbp-70h]
unsigned int v47; // [rsp+188h] [rbp-68h]
unsigned int IntegerForKey; // [rsp+18Ch] [rbp-64h]
_BYTE v49[96]; // [rsp+190h] [rbp-60h] BYREF
IntegerForKey = DS_Dictionary::getIntegerForKey(a1, "1");
DS_Dictionary::getStringForKey(&v38, a1, "2", a2);
DS_Dictionary::getStringForKey(&v40, a1, "4", a2);
v47 = DS_Dictionary::getIntegerForKey(a1, "3");
FloatForKey = DS_Dictionary::getFloatForKey(a1, "5");
LODWORD(v46) = LODWORD(FloatForKey);
v3 = DS_Dictionary::getIntegerForKey(a1, "9");
DS_Dictionary::getStringForKey(&v42, a1, "10", FloatForKey);
v4 = DS_Dictionary::getIntegerForKey(a1, "11");
DS_Dictionary::getStringForKey(&v44, a1, "12", FloatForKey);
BoolForKey = DS_Dictionary::getBoolForKey(a1, "13");
v6 = DS_Dictionary::getIntegerForKey(a1, "14");
if ( (v38 & 1) != 0 )
{
sub_10001AD30(&v28, v39, *((unsigned __int64 *)&v38 + 1));
}
else
{
__p = v39;
v28 = v38;
}
if ( (v40 & 1) != 0 )
{
sub_10001AD30(&v30, v41, *((unsigned __int64 *)&v40 + 1));
}
else
{
v31 = v41;
v30 = v40;
}
if ( (v42 & 1) != 0 )
{
sub_10001AD30(&v32, v43, *((unsigned __int64 *)&v42 + 1));
}
else
{
v33 = v43;
v32 = v42;
}
if ( (v44 & 1) != 0 )
{
sub_10001AD30(&v34, v45, *((unsigned __int64 *)&v44 + 1));
}
else
{
v35 = v45;
v34 = v44;
}
*(_QWORD *)&v7 = (unsigned int)v46;
v8 = SongInfoObject::create(IntegerForKey, &v28, &v30, v47, &v32, v4, *(float *)&v46, &v34, BoolForKey, v6, v3);
if ( (v34 & 1) != 0 )
{
operator delete(v35);
if ( (v32 & 1) == 0 )
{
LABEL_15:
if ( (v30 & 1) == 0 )
goto LABEL_16;
goto LABEL_43;
}
}
else if ( (v32 & 1) == 0 )
{
goto LABEL_15;
}
operator delete(v33);
if ( (v30 & 1) == 0 )
{
LABEL_16:
if ( (v28 & 1) == 0 )
goto LABEL_18;
goto LABEL_17;
}
LABEL_43:
operator delete(v31);
if ( (v28 & 1) != 0 )
LABEL_17:
operator delete(__p);
LABEL_18:
DS_Dictionary::getStringForKey(&__str, a1, "15", v7);
std::string::operator=((std::string *)(v8 + 464), &__str);
if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__str.__r_.__value_.__l.__data_);
DS_Dictionary::getStringForKey(v49, a1, "17", v7);
v46 = (unsigned __int8 *)(v8 + 528);
std::string::operator=((std::string *)v8 + 22, (const std::string *)v49);
v9 = *((_QWORD *)v8 + 72);
for ( i = *((_QWORD *)v8 + 73); i != v9; i -= 56 )
{
if ( (*(_BYTE *)(i - 24) & 1) != 0 )
operator delete(*(void **)(i - 8));
if ( (*(_BYTE *)(i - 48) & 1) != 0 )
operator delete(*(void **)(i - 32));
}
*((_QWORD *)v8 + 73) = v9;
sub_10065DF30(v49, (__int64)(v8 + 576));
if ( (v49[0] & 1) != 0 )
operator delete(*(void **)&v49[16]);
DS_Dictionary::getStringForKey(v49, a1, "18", v7);
v20 = (unsigned __int8 *)(v8 + 552);
std::string::operator=((std::string *)v8 + 23, (const std::string *)v49);
v11 = (__int64)(v8 + 600);
v12 = *((_QWORD *)v8 + 75);
v13 = (std::string *)v8;
for ( j = *((_QWORD *)v8 + 76); j != v12; j -= 56 )
{
if ( (*(_BYTE *)(j - 24) & 1) != 0 )
operator delete(*(void **)(j - 8));
if ( (*(_BYTE *)(j - 48) & 1) != 0 )
operator delete(*(void **)(j - 32));
}
v13[25].__r_.__value_.__l.__size_ = v12;
sub_10065DF30(v49, v11);
if ( (v49[0] & 1) != 0 )
operator delete(*(void **)&v49[16]);
v15 = *v46;
if ( (v15 & 1) != 0 )
{
if ( v13[22].__r_.__value_.__l.__size_ )
goto LABEL_87;
}
else if ( v15 >> 1 )
{
goto LABEL_87;
}
v16 = *v20;
if ( (v16 & 1) != 0 )
{
if ( v13[23].__r_.__value_.__l.__size_ )
goto LABEL_87;
}
else if ( v16 >> 1 )
{
goto LABEL_87;
}
DS_Dictionary::getStringForKey(&v21, a1, "6", v7);
DS_Dictionary::getStringForKey(&v24, a1, "16", v7);
DS_Dictionary::getStringForKey(&v25, a1, "7", v7);
if ( (v21 & 1) != 0 )
{
if ( v22 < 2 )
goto LABEL_60;
}
else if ( (unsigned __int8)v21 >> 1 < 2uLL )
{
goto LABEL_60;
}
memset(&v49[8], 0, 48);
*(_DWORD *)v49 = IntegerForKey;
*(_DWORD *)&v49[4] = 1;
std::operator+(&v36, "https://www.youtube.com/watch?v=", &v21);
if ( (v49[32] & 1) != 0 )
operator delete(*(void **)&v49[48]);
*(_QWORD *)&v49[48] = v37;
*(_OWORD *)&v49[32] = v36;
sub_10065D9C0(v13, (__int64)v49);
if ( (v49[32] & 1) != 0 )
operator delete(*(void **)&v49[48]);
if ( (v49[8] & 1) != 0 )
operator delete(*(void **)&v49[24]);
LABEL_60:
if ( (*(_BYTE *)&v24.__r_.__value_.__s.0 & 1) != 0 )
{
if ( v24.__r_.__value_.__l.__size_ < 2 )
goto LABEL_70;
}
else if ( *(_BYTE *)&v24.__r_.__value_.__l.0 >> 1 < 2uLL )
{
goto LABEL_70;
}
memset(v49, 0, 56);
*(_DWORD *)v49 = IntegerForKey;
cocos2d::ZipUtils::urlDecode(&v36, &v24);
if ( (v49[32] & 1) != 0 )
operator delete(*(void **)&v49[48]);
*(_QWORD *)&v49[48] = v37;
*(_OWORD *)&v49[32] = v36;
*(_DWORD *)&v49[4] = MusicDownloadManager::linkTypeForURL((std::string *)&v49[32]);
sub_10065D9C0(v13, (__int64)v49);
if ( (v49[32] & 1) != 0 )
operator delete(*(void **)&v49[48]);
if ( (v49[8] & 1) != 0 )
operator delete(*(void **)&v49[24]);
LABEL_70:
v17 = v25 & 1;
if ( (v25 & 1) != 0 )
{
if ( v26 < 2 )
goto LABEL_81;
LABEL_74:
memset(&v49[8], 0, 48);
*(_DWORD *)v49 = v47;
*(_DWORD *)&v49[4] = 1;
std::operator+(&v36, "https://www.youtube.com/channel/", &v25);
if ( (v49[32] & 1) != 0 )
operator delete(*(void **)&v49[48]);
*(_QWORD *)&v49[48] = v37;
*(_OWORD *)&v49[32] = v36;
sub_100665460(v13, v49);
if ( (v49[32] & 1) != 0 )
operator delete(*(void **)&v49[48]);
if ( (v49[8] & 1) != 0 )
operator delete(*(void **)&v49[24]);
v17 = v25 & 1;
goto LABEL_81;
}
if ( (unsigned __int8)v25 >> 1 >= 2uLL )
goto LABEL_74;
LABEL_81:
if ( v17 )
operator delete(v27);
if ( (*(_BYTE *)&v24.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v24.__r_.__value_.__l.__data_);
if ( (v21 & 1) != 0 )
operator delete(v23);
LABEL_87:
if ( (v44 & 1) != 0 )
{
operator delete(v45);
if ( (v42 & 1) == 0 )
{
LABEL_89:
if ( (v40 & 1) == 0 )
goto LABEL_90;
LABEL_95:
operator delete(v41);
if ( (v38 & 1) == 0 )
return v13;
goto LABEL_91;
}
}
else if ( (v42 & 1) == 0 )
{
goto LABEL_89;
}
operator delete(v43);
if ( (v40 & 1) != 0 )
goto LABEL_95;
LABEL_90:
if ( (v38 & 1) != 0 )
LABEL_91:
operator delete(v39);
return v13;
}