//
// SongInfoLayer::init from 0x100600a60 to 0x100601aab (4171 bytes)
//
// 1 xrefs:
// > SongInfoLayer::create @ 0x10060080e
//
// 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
//
bool __fastcall SongInfoLayer::init(
__int64 a1,
__int64 a2,
__int64 a3,
const std::string *a4,
const std::string *a5,
const std::string *a6,
std::string *__str,
int a8,
const std::string *a9,
int a10)
{
bool result; // al
cocos2d::CCObject *v14; // rbx
cocos2d::extension::CCScale9Sprite *v15; // r12
const char *v16; // r15
cocos2d::CCLabelBMFont *v17; // r13
float *v18; // rax
cocos2d::CCString *v19; // rax
const char *CString; // rax
cocos2d::CCLabelBMFont *v21; // r15
__int64 v22; // rax
float *v23; // rax
double v24; // xmm0_8
cocos2d::CCSprite *v25; // rax
CCMenuItemSpriteExtra *v26; // rax
int v27; // r14d
int v28; // edx
int v29; // ecx
int v30; // r8d
int v31; // r9d
__int64 v32; // r14
cocos2d::CCSprite *v33; // r14
CCMenuItemSpriteExtra *v34; // r13
const cocos2d::CCPoint *v35; // r14
cocos2d::CCObject *v36; // rbx
unsigned int v37; // eax
ButtonSprite *v38; // rax
CCMenuItemSpriteExtra *v39; // r13
unsigned __int64 *v40; // r14
const char *data; // rdi
cocos2d::CCLabelBMFont *v42; // r13
unsigned __int64 *v43; // r12
const char *v44; // rdi
cocos2d::CCSprite *v45; // r14
ButtonSprite *v46; // rax
CCMenuItemSpriteExtra *v47; // r14
const cocos2d::CCPoint *v48; // r12
unsigned __int64 *v49; // r15
std::string *v50; // rsi
std::string::pointer v51; // rdi
int v52; // r13d
cocos2d::CCString *v53; // rax
const char *v54; // rax
const char *v55; // rsi
cocos2d::CCLabelBMFont *v56; // r14
unsigned __int64 *v57; // rbx
cocos2d::CCArray *v58; // r14
unsigned int v59; // eax
std::string::size_type size; // rax
const char *v61; // rdi
ButtonSprite *v62; // rax
CCMenuItemSpriteExtra *v63; // rbx
unsigned int v64; // eax
ButtonSprite *v65; // rax
CCMenuItemSpriteExtra *v66; // rbx
unsigned int v67; // edx
const char *v68; // r15
char *v69; // rbx
__int64 v70; // rdx
char *v71; // r12
void *v72; // rax
char *v73; // rax
ButtonSprite *v74; // rax
CCMenuItemSpriteExtra *v75; // r15
const cocos2d::CCPoint *v76; // rbx
const cocos2d::CCPoint *v77; // rsi
int m_customMenuSongID; // r15d
int v79; // r13d
cocos2d::CCObject *v80; // r14
CCMenuItemToggler *v81; // rbx
int m_customPracticeSongID; // ebx
int v83; // r15d
const cocos2d::CCPoint *v84; // r12
cocos2d::CCObject *v85; // r14
CCMenuItemToggler *v86; // r12
GameStatsManager *v87; // rax
bool isItemUnlocked; // al
cocos2d::CCObject *v89; // rbx
__int64 v90; // r14
__int64 v91; // r13
__int64 v92; // r14
CCMenuItemToggler *v93; // rdi
CCMenuItemSpriteExtra *v94; // rax
__int64 v95; // rax
CCMenuItemSpriteExtra *v96; // rax
__int64 v97; // rax
cocos2d::CCString *v98; // rax
const char *v99; // rax
cocos2d::CCLabelBMFont *v100; // r14
char v101; // [rsp+0h] [rbp-110h]
char v102; // [rsp+0h] [rbp-110h]
char v103; // [rsp+0h] [rbp-110h]
const std::string *v104; // [rsp+40h] [rbp-D0h]
const cocos2d::CCPoint *v105; // [rsp+48h] [rbp-C8h]
char v106; // [rsp+50h] [rbp-C0h] BYREF
char v107[15]; // [rsp+51h] [rbp-BFh] BYREF
void *__p; // [rsp+60h] [rbp-B0h]
char v109; // [rsp+68h] [rbp-A8h] BYREF
_BYTE v110[23]; // [rsp+69h] [rbp-A7h] BYREF
unsigned __int64 v111; // [rsp+80h] [rbp-90h] BYREF
_BYTE *v112; // [rsp+88h] [rbp-88h]
unsigned __int8 *v113; // [rsp+90h] [rbp-80h]
unsigned __int64 v114; // [rsp+98h] [rbp-78h] BYREF
CCMenuItemToggler *v115; // [rsp+A0h] [rbp-70h]
__int64 v116; // [rsp+A8h] [rbp-68h]
bool v117; // [rsp+B7h] [rbp-59h]
std::string v118; // [rsp+B8h] [rbp-58h] BYREF
float v119; // [rsp+D0h] [rbp-40h] BYREF
float v120; // [rsp+D4h] [rbp-3Ch]
unsigned __int64 v121; // [rsp+D8h] [rbp-38h] BYREF
char v122[8]; // [rsp+E0h] [rbp-30h]
double v123; // 0:xmm0_8.8
double v124; // 0:xmm0_8.8
double v125; // 0:xmm0_8.8
cocos2d::CCPoint v126; // 0:xmm1_8.8
cocos2d::CCRect v127; // 0:xmm0_8.8,8:xmm1_8.8
v116 = a3;
result = FLAlertLayer::init_1((FLAlertLayer *)a1, 150);
if ( !result )
return result;
v117 = result;
*(_QWORD *)v122 = a1;
std::string::operator=((std::string *)(a1 + 632), a4);
v104 = a5;
std::string::operator=((std::string *)(a1 + 656), a5);
v113 = (unsigned __int8 *)(a1 + 680);
std::string::operator=((std::string *)(a1 + 680), a6);
v112 = (_BYTE *)(a1 + 704);
std::string::operator=((std::string *)(a1 + 704), __str);
*(_DWORD *)(a1 + 728) = a8;
v14 = *(cocos2d::CCObject **)v122;
cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v119);
v127.origin = 0;
v127.size = 0;
sub_10028CC00((__int64)&v118, 0.0, 0.0, (__m128)0x42A00000u, (__m128)0x42A00000u);
v15 = cocos2d::extension::CCScale9Sprite::create_2("GJ_square01.png", v127);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int64))v15->setOpacity)(v15, 255);
sub_10028CBF0((float *)&v118, 420.0, 280.0);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, std::string *))v15->setContentSize)(v15, &v118);
(*(void (__fastcall **)(_QWORD, cocos2d::extension::CCScale9Sprite *, __int64))(**(_QWORD **)&v14[10].m_nTag + 448LL))(
*(_QWORD *)&v14[10].m_nTag,
v15,
0xFFFFFFFFLL);
sub_10028CBE0((float *)&v118, v119 * 0.5, v120 * 0.5);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, std::string *))v15->setPosition)(v15, &v118);
if ( (*(_BYTE *)a2 & 1) != 0 )
v16 = *(const char **)(a2 + 16);
else
v16 = (const char *)(a2 + 1);
v17 = cocos2d::CCLabelBMFont::create_3(v16, "bigFont.fnt");
(*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)&v14[10].m_nTag + 448LL))(
*(_QWORD *)&v14[10].m_nTag,
v17,
20);
sub_10028CBE0((float *)&v118, v119 * 0.5, (float)((float)(v120 * 0.5) + 140.0) + -40.0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v17->setPosition)(v17, &v118);
if ( *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v17->getContentSize)(v17) > 300.0 )
{
v18 = (float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v17->getContentSize)(v17);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v17->setScale)(v17, 300.0 / *v18);
}
v19 = (cocos2d::CCString *)sub_1007AB580("%s", v101);
CString = cocos2d::CCString::getCString(v19);
v21 = cocos2d::CCLabelBMFont::create_3(CString, "goldFont.fnt");
(*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)&v14[10].m_nTag + 448LL))(
*(_QWORD *)&v14[10].m_nTag,
v21,
20);
*(float *)&v115 = v119 * 0.5;
v22 = ((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v17->getPosition)(v17);
sub_10028CBE0((float *)&v118, *(float *)&v115, *(float *)(v22 + 4) + -35.0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v21->setPosition)(v21, &v118);
if ( *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v21->getContentSize)(v21) > 340.0 )
{
v23 = (float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v21->getContentSize)(v21);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v21->setScale)(v21, 340.0 / *v23);
}
v24 = ((double (__fastcall *)(cocos2d::CCLabelBMFont *))v21->getScale)(v21);
if ( *(float *)&v24 <= 0.80000001 )
((void (__fastcall *)(cocos2d::CCLabelBMFont *))v21->getScale)(v21);
((void (__fastcall *)(cocos2d::CCLabelBMFont *))v21->setScale)(v21);
v14[11].m_uID = -1;
v25 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
v26 = CCMenuItemSpriteExtra::create(
v25,
nullptr,
v14,
(cocos2d::SEL_MenuHandler)(unsigned __int64)SongInfoLayer::onClose);
v27 = (int)v26;
CCMenuItemSpriteExtra::setSizeMult(v26, 1.6);
v32 = sub_100792C50(v27, 0, v28, v29, v30, v31);
*(_QWORD *)&v14[9].m_unknown2 = v32;
sub_10028CBE0(
(float *)&v118,
(float)((float)(v119 * 0.5) + -210.0) + 10.0,
(float)((float)(v120 * 0.5) + 140.0) + -10.0);
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v32 + 184LL))(v32, &v118);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)&v14[10].m_nTag + 448LL))(
*(_QWORD *)&v14[10].m_nTag,
*(_QWORD *)&v14[9].m_unknown2,
10);
v33 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_BPMOnBtn_001.png");
((void (__fastcall *)(cocos2d::CCSprite *, float))v33->setScale)(v33, 0.80000001);
v34 = CCMenuItemSpriteExtra::create(
v33,
nullptr,
v14,
(cocos2d::SEL_MenuHandler)(unsigned __int64)SongInfoLayer::onBPM);
(*(void (__fastcall **)(_QWORD, CCMenuItemSpriteExtra *))(**(_QWORD **)&v14[9].m_unknown2 + 440LL))(
*(_QWORD *)&v14[9].m_unknown2,
v34);
v35 = *(const cocos2d::CCPoint **)&v14[9].m_unknown2;
sub_10028CBE0(
(float *)&v121,
(float)((float)(v119 * 0.5) + 210.0) + -23.0,
(float)((float)(v120 * 0.5) + -140.0) + 23.0);
*(cocos2d::CCPoint *)&v123 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v118, v35);
v36 = *(cocos2d::CCObject **)v122;
((void (__fastcall *)(CCMenuItemSpriteExtra *, std::string *, double))v34->setPosition)(v34, &v118, v123);
LODWORD(v115) = v36[13].__vftable;
if ( (int)v115 <= 10000000 )
{
v38 = ButtonSprite::create_1("Download Soundtrack", 220, 0, 0.60000002, 0, "bigFont.fnt", "GJ_button_01.png", 30.0);
v39 = CCMenuItemSpriteExtra::create(
v38,
nullptr,
v36,
(cocos2d::SEL_MenuHandler)(unsigned __int64)SongInfoLayer::onDownload);
(*(void (__fastcall **)(_QWORD, CCMenuItemSpriteExtra *))(**(_QWORD **)&v36[9].m_unknown2 + 440LL))(
*(_QWORD *)&v36[9].m_unknown2,
v39);
v105 = *(const cocos2d::CCPoint **)&v36[9].m_unknown2;
v40 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v21->getPosition)(v21);
sub_10028CBE0((float *)&v114, 0.0, -50.0);
sub_10028CCE0((double *)&v121, v40, &v114);
v36 = *(cocos2d::CCObject **)v122;
*(cocos2d::CCPoint *)&v124 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v118, v105);
((void (__fastcall *)(CCMenuItemSpriteExtra *, std::string *, double))v39->setPosition)(v39, &v118, v124);
goto LABEL_22;
}
v37 = (unsigned int)a9->__r_.__value_.__l.0;
if ( (v37 & 1) != 0 )
{
if ( !a9->__r_.__value_.__l.__size_ )
goto LABEL_22;
}
else if ( !(v37 >> 1) )
{
goto LABEL_22;
}
sub_1005FF920(&v118, a9);
if ( (*(_BYTE *)&v118.__r_.__value_.__s.0 & 1) != 0 )
data = v118.__r_.__value_.__l.__data_;
else
data = v118.__r_.__value_.__s.__data_;
v42 = cocos2d::CCLabelBMFont::create_3(data, "bigFont.fnt");
sub_10028CBE0((float *)&v121, 0.5, 1.0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v42->setAnchorPoint)(v42, &v121);
cocos2d::CCLabelBMFont::limitLabelWidth(v42, 320.0, 0.5, 0.0);
(*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)&v36[10].m_nTag + 448LL))(
*(_QWORD *)&v36[10].m_nTag,
v42,
10);
v43 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v21->getPosition)(v21);
sub_10028CBE0((float *)&v114, 0.0, -30.0);
sub_10028CCE0((double *)&v121, v43, &v114);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v42->setPosition)(v42, &v121);
if ( (*(_BYTE *)&v118.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v118.__r_.__value_.__l.__data_);
LABEL_22:
if ( a10 <= 0 )
{
v52 = (int)v115;
v53 = (cocos2d::CCString *)sub_1007AB580("More By %s", v102);
v54 = cocos2d::CCString::getCString(v53);
v55 = "goldFont.fnt";
if ( v52 < 10000001 )
v55 = "bigFont.fnt";
v56 = cocos2d::CCLabelBMFont::create_3(v54, v55);
(*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)&v36[10].m_nTag + 448LL))(
*(_QWORD *)&v36[10].m_nTag,
v56,
20);
v57 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v21->getPosition)(v21);
sub_10028CBE0((float *)&v121, 0.0, -110.0);
sub_10028CCE0((double *)&v118, v57, &v121);
v50 = &v118;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v56->setPosition)(v56, &v118);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v56->setScale)(v56, 0.5);
v58 = (cocos2d::CCArray *)sub_10071F9E0(v56, &v118);
v59 = (unsigned int)v104->__r_.__value_.__l.0;
if ( (v59 & 1) != 0 )
size = v104->__r_.__value_.__l.__size_;
else
size = v59 >> 1;
v36 = *(cocos2d::CCObject **)v122;
if ( size )
{
v61 = "Newgrounds";
if ( v52 >= 10000001 )
v61 = "Website";
v62 = ButtonSprite::create_1(v61, 80, 0, 0.60000002, 0, "bigFont.fnt", "GJ_button_01.png", 30.0);
v63 = CCMenuItemSpriteExtra::create(
v62,
nullptr,
v36,
(cocos2d::SEL_MenuHandler)(unsigned __int64)SongInfoLayer::onNG);
(*(void (__fastcall **)(_QWORD, CCMenuItemSpriteExtra *))(**(_QWORD **)(*(_QWORD *)v122 + 544LL) + 440LL))(
*(_QWORD *)(*(_QWORD *)v122 + 544LL),
v63);
v50 = (std::string *)v63;
v36 = *(cocos2d::CCObject **)v122;
sub_10071FCD0(v58, v50);
}
v64 = *v113;
if ( (v64 & 1) != 0 )
{
if ( !*(_QWORD *)&v36[12].m_nTag )
goto LABEL_45;
}
else if ( !(v64 >> 1) )
{
LABEL_45:
v67 = (unsigned __int8)*v112;
if ( (v67 & 1) != 0 )
{
if ( *(_QWORD *)&v36[12].m_unknown2 )
{
v118.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)16;
v68 = v118.__r_.__value_.__s.__data_;
strcpy(v118.__r_.__value_.__s.__data_, "Facebook");
v70 = *(_QWORD *)&v36[12].m_unknown2;
v69 = *(char **)&v36[12].m_uOrderOfArrival;
if ( v70 < 9 )
goto LABEL_59;
goto LABEL_51;
}
}
else if ( *v112 )
{
v118.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)16;
v68 = v118.__r_.__value_.__s.__data_;
strcpy(v118.__r_.__value_.__s.__data_, "Facebook");
v69 = (char *)&v36[12].m_uIndexInArray + 1;
v70 = v67 >> 1;
if ( v70 < 9 )
{
LABEL_59:
v74 = ButtonSprite::create_1(v68, 80, 0, 0.60000002, 0, "bigFont.fnt", "GJ_button_01.png", 30.0);
v36 = *(cocos2d::CCObject **)v122;
v75 = CCMenuItemSpriteExtra::create(
v74,
nullptr,
*(cocos2d::CCObject **)v122,
(cocos2d::SEL_MenuHandler)(unsigned __int64)SongInfoLayer::onFB);
(*(void (__fastcall **)(_QWORD, CCMenuItemSpriteExtra *))(**(_QWORD **)&v36[9].m_unknown2 + 440LL))(
*(_QWORD *)&v36[9].m_unknown2,
v75);
v50 = (std::string *)v75;
sub_10071FCD0(v58, v75);
if ( (*(_BYTE *)&v118.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v118.__r_.__value_.__l.__data_);
goto LABEL_61;
}
LABEL_51:
v71 = &v69[v70];
v72 = v69;
while ( 1 )
{
v73 = (char *)memchr(v72, 105, v70 - 8);
if ( !v73 )
goto LABEL_59;
if ( !(*(_QWORD *)v73 ^ 0x6172676174736E69LL | (unsigned __int8)v73[8] ^ 0x6DLL) )
{
if ( v73 != v71 && v73 - v69 != -1 )
{
std::string::assign(&v118, "Instagram");
if ( (*(_BYTE *)&v118.__r_.__value_.__s.0 & 1) != 0 )
v68 = v118.__r_.__value_.__l.__data_;
}
goto LABEL_59;
}
v72 = v73 + 1;
v70 = v71 - (_BYTE *)v72;
if ( v71 - (_BYTE *)v72 < 9 )
goto LABEL_59;
}
}
LABEL_61:
v51 = (std::string::pointer)v58;
if ( (unsigned int)sub_100720070(v58) )
{
v76 = *(const cocos2d::CCPoint **)(*(_QWORD *)v122 + 544LL);
v126.y = 0.0;
v126.x = (float)((float)(0.5 * v120) + -140.0) + 65.0;
sub_10028CBE0((float *)&v121, v119 * 0.5, v126.x);
v77 = v76;
v36 = *(cocos2d::CCObject **)v122;
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v118, v77);
v51 = (std::string::pointer)v58;
v50 = &v118;
GameToolbox::alignItemsHorisontally(v58, 20.0, v126, (bool)&v118);
}
goto LABEL_63;
}
v65 = ButtonSprite::create_1("YouTube", 80, 0, 0.60000002, 0, "bigFont.fnt", "GJ_button_01.png", 30.0);
v66 = CCMenuItemSpriteExtra::create(
v65,
nullptr,
v36,
(cocos2d::SEL_MenuHandler)(unsigned __int64)SongInfoLayer::onYT);
(*(void (__fastcall **)(_QWORD, CCMenuItemSpriteExtra *))(**(_QWORD **)(*(_QWORD *)v122 + 544LL) + 440LL))(
*(_QWORD *)(*(_QWORD *)v122 + 544LL),
v66);
v50 = (std::string *)v66;
v36 = *(cocos2d::CCObject **)v122;
sub_10071FCD0(v58, v50);
goto LABEL_45;
}
v118.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)30;
strcpy(v118.__r_.__value_.__s.__data_, "ncs_med_001.png");
if ( a10 == 2 )
{
std::string::assign(&v118, "chompo_med_001.png");
LODWORD(v116) = -1039138816;
if ( (*(_BYTE *)&v118.__r_.__value_.__s.0 & 1) != 0 )
{
v44 = v118.__r_.__value_.__l.__data_;
goto LABEL_29;
}
}
else
{
LODWORD(v116) = -1040187392;
}
v44 = v118.__r_.__value_.__s.__data_;
LABEL_29:
v45 = cocos2d::CCSprite::createWithSpriteFrameName(v44);
(*(void (__fastcall **)(_QWORD, cocos2d::CCSprite *, __int64))(**(_QWORD **)&v36[10].m_nTag + 448LL))(
*(_QWORD *)&v36[10].m_nTag,
v45,
11);
sub_10028CBE0(
(float *)&v121,
*(float *)&v116 + (float)((float)(v119 * 0.5) + 210.0),
(float)((float)(v120 * 0.5) + 140.0) + -18.0);
((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v45->setPosition)(v45, &v121);
v46 = ButtonSprite::create_1("Download Soundtrack", 220, 0, 0.60000002, 0, "bigFont.fnt", "GJ_button_01.png", 30.0);
v47 = CCMenuItemSpriteExtra::create(
v46,
nullptr,
v36,
(cocos2d::SEL_MenuHandler)(unsigned __int64)SongInfoLayer::onDownload);
(*(void (__fastcall **)(_QWORD, CCMenuItemSpriteExtra *))(**(_QWORD **)&v36[9].m_unknown2 + 440LL))(
*(_QWORD *)&v36[9].m_unknown2,
v47);
v48 = *(const cocos2d::CCPoint **)&v36[9].m_unknown2;
v49 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v21->getPosition)(v21);
sub_10028CBE0((float *)&v111, 0.0, -100.0);
sub_10028CCE0((double *)&v114, v49, &v111);
*(cocos2d::CCPoint *)&v125 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v121, v48);
v50 = (std::string *)&v121;
v51 = (std::string::pointer)v47;
((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *, double))v47->setPosition)(v47, &v121, v125);
if ( (*(_BYTE *)&v118.__r_.__value_.__s.0 & 1) != 0 )
{
v51 = v118.__r_.__value_.__l.__data_;
operator delete(v118.__r_.__value_.__l.__data_);
}
LABEL_63:
if ( SLODWORD(v36[13].__vftable) > 0 )
{
v116 = sub_10071F9E0(v51, v50);
sub_10028CBE0(
(float *)&v118,
(float)((float)(v119 * 0.5) + -210.0) + 20.0,
(float)((float)(v120 * 0.5) + -140.0) + 20.0);
v106 = 8;
strcpy(v107, "Menu");
m_customMenuSongID = GameManager::sharedState()->m_customMenuSongID;
v79 = (int)v36[13].__vftable;
v115 = *(CCMenuItemToggler **)&v36[9].m_unknown2;
sub_10028CC60(&v121, (double *)&v118);
v80 = *(cocos2d::CCObject **)&v36[10].m_nTag;
sub_10028CBE0((float *)&v114, 5.0, 1.0);
v81 = GameToolbox::createToggleButton(
(__int64)&v106,
(unsigned __int64)SongInfoLayer::onMenuMusic,
0,
m_customMenuSongID == v79,
(const cocos2d::CCPoint *)v115,
&v121,
0.69999999,
0.30000001,
80.0,
v36,
v80,
(float *)&v114,
"bigFont.fnt",
0,
0,
v116);
if ( (v106 & 1) != 0 )
operator delete(__p);
v115 = v81;
v109 = 16;
strcpy(v110, "Practice");
m_customPracticeSongID = GameManager::sharedState()->m_customPracticeSongID;
v83 = *(_DWORD *)(*(_QWORD *)v122 + 728LL);
v84 = *(const cocos2d::CCPoint **)(*(_QWORD *)v122 + 544LL);
sub_10028CBE0((float *)&v114, 0.0, 30.0);
sub_10028CCE0((double *)&v121, (unsigned __int64 *)&v118, &v114);
v85 = *(cocos2d::CCObject **)(*(_QWORD *)v122 + 576LL);
sub_10028CBE0((float *)&v111, 5.0, 1.0);
v86 = GameToolbox::createToggleButton(
(__int64)&v109,
(unsigned __int64)SongInfoLayer::onPracticeMusic,
0,
m_customPracticeSongID == v83,
v84,
&v121,
0.69999999,
0.30000001,
80.0,
*(cocos2d::CCObject **)v122,
v85,
(float *)&v111,
"bigFont.fnt",
0,
0,
v116);
if ( (v109 & 1) != 0 )
operator delete(*(void **)&v110[15]);
v87 = GameStatsManager::sharedState();
isItemUnlocked = GameStatsManager::isItemUnlocked(v87, GJItem, 16);
v89 = *(cocos2d::CCObject **)v122;
if ( !isItemUnlocked )
{
v90 = v116;
v91 = sub_1007200C0(v116, 1);
v92 = sub_1007200C0(v90, 3);
v93 = v115;
v115->m_notClickable = 1;
v86->m_notClickable = 1;
BYTE2(v121) = -106;
LOWORD(v121) = -26986;
v94 = CCMenuItemToggler::activeItem(v93);
v95 = ((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v94->getNormalImage)(v94);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v95 + 944LL))(v95, &v121);
v96 = CCMenuItemToggler::activeItem(v86);
v97 = ((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v96->getNormalImage)(v96);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v97 + 944LL))(v97, &v121);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v91 + 1056LL))(v91, &v121);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v92 + 1056LL))(v92, &v121);
}
if ( SLODWORD(v89[13].__vftable) > 0 )
{
v98 = (cocos2d::CCString *)sub_1007AB580("SongID: %i", v103);
v99 = cocos2d::CCString::getCString(v98);
v100 = cocos2d::CCLabelBMFont::create_3(v99, "bigFont.fnt");
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v100->setScale)(v100, 0.40000001);
(*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)&v89[10].m_nTag + 448LL))(
*(_QWORD *)&v89[10].m_nTag,
v100,
20);
sub_10028CBE0((float *)&v118, v119 * 0.5, (float)((float)(0.5 * v120) + -140.0) + 16.0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v100->setPosition)(v100, &v118);
}
}
return v117;
}