//
// CustomSongWidget::init from 0x1401692e0 to 0x14016a6e4 (5124 bytes)
//
// 2 xrefs:
// > CustomSongWidget::create @ 0x140169286
// > ??> @ 0x140918074
//
// 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 11:27:28 +0000
//
// Hidden C++ exception states: #wind=3
bool __fastcall CustomSongWidget::init(
__int64 a1,
cocos2d::CCObject *a2,
__int64 a3,
char a4,
char a5,
char a6,
char a7,
char a8,
char a9,
int a10,
char a11,
char a12)
{
bool result; // al
cocos2d::CCObject *v17; // rcx
bool v18; // al
__int64 v19; // rax
char v20; // cl
int v21; // eax
float v22; // xmm10_4
int v23; // eax
float v24; // xmm9_4
__int64 v25; // rax
_QWORD *v26; // rdi
__int64 v27; // rdx
__int64 v28; // rbx
__int64 v29; // rax
__int64 v30; // rax
__int64 v31; // rcx
__int64 v32; // rax
cocos2d::CCTouchDispatcher *v33; // rax
__int64 v34; // rcx
__int64 v35; // rax
__int64 v36; // rax
const char *v37; // rdx
struct cocos2d::CCLabelBMFont *v38; // rax
struct cocos2d::CCSprite *v39; // rax
int v40; // ebx
cocos2d::CCObject *v41; // rax
struct cocos2d::CCSprite *v42; // rax
int v43; // ebx
cocos2d::CCObject *v44; // rax
struct cocos2d::CCSprite *v45; // rbx
cocos2d::CCObject *v46; // rax
struct cocos2d::CCSprite *v47; // rax
int v48; // ebx
cocos2d::CCObject *v49; // rax
int v50; // eax
cocos2d::CCObject *v51; // rax
struct cocos2d::CCSprite *v52; // rbx
cocos2d::CCObject *v53; // rax
cocos2d::CCObject *v54; // r12
cocos2d::CCObject *v55; // rax
struct cocos2d::CCSprite *v56; // rax
int v57; // ebx
cocos2d::CCObject *v58; // rax
__int64 v59; // rsi
float v60; // xmm9_4
float v61; // xmm10_4
__int64 v62; // rbx
__int64 v63; // rdi
__int64 v64; // rax
__int64 v65; // rax
struct cocos2d::CCSprite *v66; // rbx
cocos2d::CCObject *v67; // rax
__int64 v68; // rax
__int64 *v69; // rcx
__int64 v70; // rdi
float v71; // xmm6_4
float *v72; // rax
__int64 v73; // rbx
__int64 v74; // rax
struct cocos2d::CCSprite *v75; // rax
struct cocos2d::CCSprite *v76; // rax
cocos2d::CCTexture2D *v77; // rax
__int64 v78; // rdi
__int64 v79; // rbx
__int64 v80; // rax
__int64 v81; // rdi
__int64 v82; // rbx
__int64 v83; // rax
__int64 v84; // rdi
__int64 v85; // rbx
__int64 v86; // rax
__int64 v87; // rdi
__int64 v88; // rbx
__int64 v89; // rax
__int64 v90; // rdi
__int64 v91; // rbx
__int64 v92; // rax
__int64 v93; // rdi
__int64 v94; // rbx
__int64 v95; // rax
__int64 v96; // rsi
float v97; // xmm10_4
__int64 v98; // rbx
__int64 v99; // rdi
__int64 v100; // rax
__int64 v101; // rax
__int64 v102; // rsi
__int64 v103; // rbx
__int64 v104; // rdi
__int64 v105; // rax
__int64 v106; // rax
__int64 v107; // rdi
__int64 v108; // rbx
__int64 v109; // rax
__int64 v110; // rdi
__int64 v111; // rbx
__int64 v112; // rax
__int64 v113; // rax
__int64 v114; // rdi
__int64 v115; // rbx
__int64 v116; // rax
__int64 v117; // rdi
__int64 v118; // rbx
__int64 v119; // rax
__int64 v120; // rdi
__int64 v121; // rbx
__int64 v122; // rax
__int64 v123; // rdx
__int64 v124; // rdi
__int64 v125; // rbx
__int64 v126; // rax
__int64 v127; // rsi
__int64 v128; // rbx
__int64 v129; // rdi
__int64 v130; // rax
__int64 v131; // rax
__int64 v132; // rax
__int64 v133; // rbx
__int64 v134; // rax
__int64 v135; // rdi
__int64 v136; // rbx
__int64 v137; // rax
struct cocos2d::CCSprite *v138; // rax
int v139; // ebx
cocos2d::CCObject *v140; // rax
__int64 v141; // rax
__int64 v142; // rbx
__int64 v143; // rax
__int64 v144; // rdi
__int64 v145; // rbx
__int64 v146; // rax
__int64 v147; // rdi
__int64 v148; // rbx
__int64 v149; // rax
__int64 v150; // rax
__int64 v151; // rbx
__int64 v152; // rax
__int64 v153; // rax
__int64 v154; // rax
__int64 v155; // rdx
__int64 v156; // rdi
__int64 v157; // rbx
__int64 v158; // rax
struct cocos2d::CCSprite *v159; // rdi
cocos2d::CCTexture2D *v160; // rax
__int64 v161; // rbx
__int64 v162; // rax
__int64 v163; // rbx
__int64 v164; // rax
__int64 v165; // rbx
__int64 v166; // rax
const char *v167; // rcx
struct cocos2d::CCSprite *v168; // rax
__int64 v169; // rdi
__int64 v170; // rbx
__int64 v171; // rax
__int64 v172; // rdi
__int64 v173; // rbx
__int64 v174; // rax
__int64 v175; // rax
__int64 v176; // rbx
__int64 v177; // rax
__int64 v178; // rdi
__int64 v179; // rbx
__int64 v180; // rax
__int64 v181; // rcx
cocos2d::CCObject *v182; // rax
cocos2d::CCObject *v183; // rcx
__int64 v184; // rcx
__int64 v185; // rcx
void *v186; // [rsp+58h] [rbp-B0h] BYREF
_QWORD v187[2]; // [rsp+60h] [rbp-A8h] BYREF
int v188; // [rsp+70h] [rbp-98h] BYREF
_DWORD v189[4]; // [rsp+78h] [rbp-90h] BYREF
result = cocos2d::CCNode::init((cocos2d::CCNode *)a1);
if ( result )
{
if ( *(cocos2d::CCObject **)(a1 + 336) != a2 )
{
if ( a2 )
cocos2d::CCObject::retain(a2);
v17 = *(cocos2d::CCObject **)(a1 + 336);
if ( v17 )
cocos2d::CCObject::release(v17);
*(_QWORD *)(a1 + 336) = a2;
}
*(_QWORD *)(a1 + 488) = a3;
*(_BYTE *)(a1 + 496) = a4;
*(_BYTE *)(a1 + 497) = a5;
*(_BYTE *)(a1 + 500) = a7;
*(_BYTE *)(a1 + 544) = a12;
*(_BYTE *)(a1 + 498) = a6;
*(_BYTE *)(a1 + 501) = a9;
v18 = a11 && a9;
*(_BYTE *)(a1 + 502) = v18;
if ( a10 == 1 )
*(_BYTE *)(a1 + 496) = 0;
v19 = cocos2d::CCDirector::sharedDirector(v17);
cocos2d::CCDirector::getWinSize(v19, &v188);
v20 = *(_BYTE *)(a1 + 501);
v21 = 300;
if ( v20 )
v21 = 320;
v22 = (float)v21;
v23 = 90;
if ( v20 )
v23 = 50;
v24 = (float)v23;
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v187, 0.0, 0.0, 80.0, 80.0);
v26 = (_QWORD *)cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v25);
LOBYTE(v27) = -1;
(*(void (__fastcall **)(_QWORD *, __int64))(v26[40] + 40LL))(v26 + 40, v27);
v28 = *v26;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v186, v22, v24);
(*(void (__fastcall **)(_QWORD *, __int64))(v28 + 312))(v26, v29);
(*(void (__fastcall **)(__int64, _QWORD *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v26, 4294967294LL);
if ( a8 )
(*(void (__fastcall **)(_QWORD *, _QWORD))(*v26 + 336LL))(v26, 0);
v30 = cocos2d::CCMenu::create();
*(_QWORD *)(a1 + 344) = v30;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v30);
v32 = cocos2d::CCDirector::sharedDirector(v31);
v33 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v32 + 144LL))(v32);
if ( cocos2d::CCTouchDispatcher::isUsingForcePrio(v33) )
{
v35 = cocos2d::CCDirector::sharedDirector(v34);
v36 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v35 + 144LL))(v35);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 344) + 944LL))(
*(_QWORD *)(a1 + 344),
(unsigned int)(*(_DWORD *)(v36 + 128) - 1));
}
*(_QWORD *)(a1 + 352) = cocos2d::CCLabelBMFont::create("Song Title", (const char *)&qword_140704F78);
*(_QWORD *)(a1 + 360) = cocos2d::CCLabelBMFont::create("Artist Name", "goldFont.fnt");
v37 = (const char *)&qword_140704F78;
if ( *(_BYTE *)(a1 + 501) )
v37 = "chatFont.fnt";
*(_QWORD *)(a1 + 368) = cocos2d::CCLabelBMFont::create("Song ID", v37);
v38 = cocos2d::CCLabelBMFont::create("Error", (const char *)&qword_140704F78);
*(_QWORD *)(a1 + 376) = v38;
LOWORD(v186) = 13055;
BYTE2(v186) = 25;
(**((void (__fastcall ***)(__int64, void **))v38 + 46))((__int64)v38 + 368, &v186);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 376) + 336LL))(*(_QWORD *)(a1 + 376), 0);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 464LL))(a1, *(_QWORD *)(a1 + 352));
if ( !*(_BYTE *)(a1 + 501) )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 464LL))(a1, *(_QWORD *)(a1 + 360));
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 464LL))(a1, *(_QWORD *)(a1 + 368));
(*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)a1 + 456LL))(a1, *(_QWORD *)(a1 + 376), 2);
v39 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_downloadBtn_001.png");
v40 = (int)v39;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v39 + 160LL))(v39);
v41 = CCMenuItemSpriteExtra::create(v40, 0, a1, (__int64)CustomSongWidget::onDownload);
*(_QWORD *)(a1 + 384) = v41;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 344) + 464LL))(*(_QWORD *)(a1 + 344), v41);
*(_DWORD *)(*(_QWORD *)(a1 + 384) + 372LL) = 1066192077;
v42 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_cancelDownloadBtn_001.png");
v43 = (int)v42;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v42 + 160LL))(v42);
v44 = CCMenuItemSpriteExtra::create(v43, 0, a1, (__int64)CustomSongWidget::onCancelDownload);
*(_QWORD *)(a1 + 392) = v44;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 344) + 464LL))(*(_QWORD *)(a1 + 344), v44);
*(_DWORD *)(*(_QWORD *)(a1 + 392) + 372LL) = 1066192077;
v45 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_trashBtn_001.png");
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v45 + 160LL))(v45);
v46 = CCMenuItemSpriteExtra::create((int)v45, 0, a1, (__int64)CustomSongWidget::onDelete);
*(_QWORD *)(a1 + 432) = v46;
if ( a10 == 1 )
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v46 + 64LL))(v46, 4294966297LL);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 344) + 464LL))(
*(_QWORD *)(a1 + 344),
*(_QWORD *)(a1 + 432));
*(_DWORD *)(*(_QWORD *)(a1 + 432) + 372LL) = 1066192077;
v47 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_selectSongBtn_001.png");
v48 = (int)v47;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v47 + 160LL))(v47);
v49 = CCMenuItemSpriteExtra::create(v48, 0, a1, (__int64)CustomSongWidget::onSelect);
*(_QWORD *)(a1 + 400) = v49;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 344) + 464LL))(*(_QWORD *)(a1 + 344), v49);
*(_DWORD *)(*(_QWORD *)(a1 + 400) + 372LL) = 1066192077;
v50 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_getSongInfoBtn_001.png");
v51 = CCMenuItemSpriteExtra::create(v50, 0, a1, (__int64)CustomSongWidget::onGetSongInfo);
*(_QWORD *)(a1 + 408) = v51;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 344) + 464LL))(*(_QWORD *)(a1 + 344), v51);
*(_DWORD *)(*(_QWORD *)(a1 + 408) + 372LL) = 1066192077;
v52 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_playMusicBtn_001.png");
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v52 + 160LL))(v52);
v53 = CCMenuItemSpriteExtra::create((int)v52, 0, a1, (__int64)CustomSongWidget::onPlayback);
*(_QWORD *)(a1 + 416) = v53;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 344) + 464LL))(*(_QWORD *)(a1 + 344), v53);
v186 = operator new(0x2C8u);
v54 = (cocos2d::CCObject *)ButtonSprite::ButtonSprite((__int64)v186);
if ( v54 )
{
if ( ButtonSprite::init_1(
(__int64)v54,
(__int64)"More",
220,
0,
1058642330,
0,
&qword_140704F78,
(__int64)"GJ_button_01.png",
1103626240) )
{
cocos2d::CCObject::autorelease(v54);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v54 + 8LL))(v54, 1);
v54 = nullptr;
}
}
v55 = CCMenuItemSpriteExtra::create((int)v54, 0, a1, (__int64)CustomSongWidget::onMore);
*(_QWORD *)(a1 + 424) = v55;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 344) + 464LL))(*(_QWORD *)(a1 + 344), v55);
v56 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png");
v57 = (int)v56;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v56 + 160LL))(v56);
v58 = CCMenuItemSpriteExtra::create(v57, 0, a1, (__int64)CustomSongWidget::onInfo);
*(_QWORD *)(a1 + 440) = v58;
*((_DWORD *)v58 + 93) = 1067030938;
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 344) + 464LL))(
*(_QWORD *)(a1 + 344),
*(_QWORD *)(a1 + 440));
v59 = **(_QWORD **)(a1 + 440);
v60 = v24 * 0.5;
v61 = v22 * 0.5;
v62 = *(_QWORD *)(a1 + 344);
v63 = *(_QWORD *)(a1 + 440);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v186, v61 - 14.0, (float)(v60 - 14.0) - 1.0);
cocos2d::CCNode::convertToNodeSpace(v62, v187, v64);
(*(void (__fastcall **)(__int64, __int64))(v59 + 184))(v63, v65);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 440) + 336LL))(*(_QWORD *)(a1 + 440), 0);
v66 = cocos2d::CCSprite::createWithSpriteFrameName("statInfoIcon_001.png");
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v66 + 160LL))(v66);
v67 = CCMenuItemSpriteExtra::create((int)v66, 0, a1, (__int64)CustomSongWidget::onUsage);
*(_QWORD *)(a1 + 536) = v67;
*((_DWORD *)v67 + 93) = 1067030938;
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 344) + 464LL))(
*(_QWORD *)(a1 + 344),
*(_QWORD *)(a1 + 536));
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 536) + 336LL))(*(_QWORD *)(a1 + 536), 0);
v68 = *(_QWORD *)(a1 + 424);
if ( *(_BYTE *)(a1 + 501) )
{
*(_DWORD *)(v68 + 372) = 1063675494;
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 424) + 464LL))(
*(_QWORD *)(a1 + 424),
*(_QWORD *)(a1 + 360));
v69 = *(__int64 **)(a1 + 360);
v70 = *v69;
v71 = *(float *)((*(__int64 (__fastcall **)(__int64 *))(*v69 + 320))(v69) + 4) * 0.5;
v72 = (float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 360) + 320LL))(*(_QWORD *)(a1 + 360));
v73 = *(_QWORD *)(a1 + 360);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v187, *v72 * 0.5, v71);
(*(void (__fastcall **)(__int64, __int64))(v70 + 184))(v73, v74);
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v54 + 336LL))(v54, 0);
}
else
{
*(_DWORD *)(v68 + 372) = 1066192077;
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 424) + 160LL))(*(_QWORD *)(a1 + 424));
*(_DWORD *)(*(_QWORD *)(a1 + 424) + 404LL) = 1060320051;
}
v75 = cocos2d::CCSprite::create("slidergroove.png");
*(_QWORD *)(a1 + 456) = v75;
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v75, 3);
v76 = cocos2d::CCSprite::create("sliderBar.png");
*(_QWORD *)(a1 + 464) = v76;
v189[0] = 9729;
v189[1] = 9729;
v189[2] = 10497;
v189[3] = 10497;
v77 = (cocos2d::CCTexture2D *)(*(__int64 (__fastcall **)(__int64))(*((_QWORD *)v76 + 43) + 16LL))((__int64)v76 + 344);
cocos2d::CCTexture2D::setTexParameters(v77, (struct cocos2d::_ccTexParams *)v189);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 456) + 456LL))(
*(_QWORD *)(a1 + 456),
*(_QWORD *)(a1 + 464),
0xFFFFFFFFLL);
v78 = **(_QWORD **)(a1 + 464);
v79 = *(_QWORD *)(a1 + 464);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v187, 0.0, 0.0);
(*(void (__fastcall **)(__int64, __int64))(v78 + 288))(v79, v80);
v81 = **(_QWORD **)(a1 + 464);
v82 = *(_QWORD *)(a1 + 464);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v187, 2.0, 4.0);
(*(void (__fastcall **)(__int64, __int64))(v81 + 184))(v82, v83);
v84 = **(_QWORD **)(a1 + 352);
v85 = *(_QWORD *)(a1 + 352);
if ( *(_BYTE *)(a1 + 501) )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v187, 0.0, 0.5);
(*(void (__fastcall **)(__int64, __int64))(v84 + 288))(v85, v113);
v114 = **(_QWORD **)(a1 + 352);
v115 = *(_QWORD *)(a1 + 352);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v187, 10.0 - v61, v60 - 16.0);
(*(void (__fastcall **)(__int64, __int64))(v114 + 184))(v115, v116);
v117 = **(_QWORD **)(a1 + 368);
v118 = *(_QWORD *)(a1 + 368);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v187, 11.0 - v61, v60 - 34.0);
(*(void (__fastcall **)(__int64, __int64))(v117 + 184))(v118, v119);
v120 = **(_QWORD **)(a1 + 368);
v121 = *(_QWORD *)(a1 + 368);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v187, 0.0, 0.5);
(*(void (__fastcall **)(__int64, __int64))(v120 + 288))(v121, v122);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 368) + 160LL))(*(_QWORD *)(a1 + 368));
(**(void (__fastcall ***)(__int64, void *))(*(_QWORD *)(a1 + 368) + 368LL))(
*(_QWORD *)(a1 + 368) + 368LL,
&unk_140702F78);
LOBYTE(v123) = -56;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)(*(_QWORD *)(a1 + 368) + 368LL) + 40LL))(
*(_QWORD *)(a1 + 368) + 368LL,
v123);
v124 = **(_QWORD **)(a1 + 376);
v125 = *(_QWORD *)(a1 + 376);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v187, 0.0, 0.5);
(*(void (__fastcall **)(__int64, __int64))(v124 + 288))(v125, v126);
v127 = **(_QWORD **)(a1 + 384);
v128 = *(_QWORD *)(a1 + 344);
v129 = *(_QWORD *)(a1 + 384);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v187, v61 - 20.0, 0.0);
cocos2d::CCNode::convertToNodeSpace(v128, &v186, v130);
(*(void (__fastcall **)(__int64, __int64))(v127 + 184))(v129, v131);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v187, -32.0, 0.0);
v133 = v132;
v134 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 384) + 200LL))(*(_QWORD *)(a1 + 384));
cocos2d::CCPoint::operator+(v134, &v186, v133);
(*(void (__fastcall **)(_QWORD, void **))(**(_QWORD **)(a1 + 400) + 184LL))(*(_QWORD *)(a1 + 400), &v186);
v135 = **(_QWORD **)(a1 + 416);
v136 = *(_QWORD *)(a1 + 416);
v137 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 384) + 200LL))(*(_QWORD *)(a1 + 384));
(*(void (__fastcall **)(__int64, __int64))(v135 + 184))(v136, v137);
if ( *(_BYTE *)(a1 + 502) )
{
v138 = cocos2d::CCSprite::createWithSpriteFrameName("gj_heartOff_001.png");
v139 = (int)v138;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v138 + 160LL))(v138);
v140 = CCMenuItemSpriteExtra::create(v139, 0, a1, (__int64)CustomSongWidget::onToggleFavorite);
*(_QWORD *)(a1 + 448) = v140;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 344) + 464LL))(
*(_QWORD *)(a1 + 344),
v140);
*(_DWORD *)(*(_QWORD *)(a1 + 448) + 372LL) = 1066192077;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v187, -32.0, 0.0);
v142 = v141;
v143 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 400) + 200LL))(*(_QWORD *)(a1 + 400));
cocos2d::CCPoint::operator+(v143, &v186, v142);
(*(void (__fastcall **)(_QWORD, void **))(**(_QWORD **)(a1 + 448) + 184LL))(*(_QWORD *)(a1 + 448), &v186);
}
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 456) + 136LL))(*(_QWORD *)(a1 + 456));
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 456) + 120LL))(*(_QWORD *)(a1 + 456));
v144 = **(_QWORD **)(a1 + 376);
v145 = *(_QWORD *)(a1 + 376);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v187, 0.5, 0.5);
(*(void (__fastcall **)(__int64, __int64))(v144 + 288))(v145, v146);
v147 = **(_QWORD **)(a1 + 376);
v148 = *(_QWORD *)(a1 + 376);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v187, 0.0, 3.0 - v60);
(*(void (__fastcall **)(__int64, __int64))(v147 + 184))(v148, v149);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v187, 0.0, -0.5);
v151 = v150;
v152 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 376) + 200LL))(*(_QWORD *)(a1 + 376));
cocos2d::CCPoint::operator+(v152, &v186, v151);
(*(void (__fastcall **)(_QWORD, void **))(**(_QWORD **)(a1 + 456) + 184LL))(*(_QWORD *)(a1 + 456), &v186);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v187, 0.0, 0.0, 86.0, 86.0);
v154 = cocos2d::extension::CCScale9Sprite::create("GJ_squareB_01.png", v153);
*(_QWORD *)(a1 + 480) = v154;
LOBYTE(v155) = -1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)(v154 + 320) + 40LL))(v154 + 320, v155);
v156 = **(_QWORD **)(a1 + 480);
v157 = *(_QWORD *)(a1 + 480);
v158 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 456) + 200LL))(*(_QWORD *)(a1 + 456));
(*(void (__fastcall **)(__int64, __int64))(v156 + 184))(v157, v158);
(*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)a1 + 456LL))(a1, *(_QWORD *)(a1 + 480), 1);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 480) + 336LL))(*(_QWORD *)(a1 + 480), 0);
v159 = cocos2d::CCSprite::create("sliderBar.png");
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 456) + 456LL))(
*(_QWORD *)(a1 + 456),
v159,
4294967294LL);
v160 = (cocos2d::CCTexture2D *)(*(__int64 (__fastcall **)(__int64))(*((_QWORD *)v159 + 43) + 16LL))((__int64)v159 + 344);
cocos2d::CCTexture2D::setTexParameters(v160, (struct cocos2d::_ccTexParams *)v189);
v161 = *(_QWORD *)v159;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v187, 0.0, 0.0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v161 + 288))(v159, v162);
v163 = *(_QWORD *)v159;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v187, 2.0, 4.0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v163 + 184))(v159, v164);
memset(&v186, 50, 3);
(**((void (__fastcall ***)(__int64, void **))v159 + 40))((__int64)v159 + 320, &v186);
v165 = *(_QWORD *)v159;
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v187, 0.0, 0.0, *(float *)(*(_QWORD *)(a1 + 456) + 432LL) - 4.0, 8.0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v165 + 992))(v159, v166);
}
else
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v187, 0.0, 0.5);
(*(void (__fastcall **)(__int64, __int64))(v84 + 288))(v85, v86);
v87 = **(_QWORD **)(a1 + 360);
v88 = *(_QWORD *)(a1 + 360);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v187, 0.0, 0.5);
(*(void (__fastcall **)(__int64, __int64))(v87 + 288))(v88, v89);
v90 = **(_QWORD **)(a1 + 376);
v91 = *(_QWORD *)(a1 + 376);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v187, 0.0, 0.5);
(*(void (__fastcall **)(__int64, __int64))(v90 + 288))(v91, v92);
v93 = **(_QWORD **)(a1 + 368);
v94 = *(_QWORD *)(a1 + 368);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v187, 0.0, 0.5);
(*(void (__fastcall **)(__int64, __int64))(v93 + 288))(v94, v95);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 368) + 160LL))(*(_QWORD *)(a1 + 368));
v96 = **(_QWORD **)(a1 + 384);
v97 = v61 - 23.0;
v98 = *(_QWORD *)(a1 + 344);
v99 = *(_QWORD *)(a1 + 384);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v187, v97, (float)(23.0 - v60) + 2.0);
cocos2d::CCNode::convertToNodeSpace(v98, &v186, v100);
(*(void (__fastcall **)(__int64, __int64))(v96 + 184))(v99, v101);
v102 = **(_QWORD **)(a1 + 416);
v103 = *(_QWORD *)(a1 + 344);
v104 = *(_QWORD *)(a1 + 416);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v187, v97, (float)(v60 - 23.0) - 1.0);
cocos2d::CCNode::convertToNodeSpace(v103, &v186, v105);
(*(void (__fastcall **)(__int64, __int64))(v102 + 184))(v104, v106);
v107 = **(_QWORD **)(a1 + 400);
v108 = *(_QWORD *)(a1 + 400);
v109 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 384) + 200LL))(*(_QWORD *)(a1 + 384));
(*(void (__fastcall **)(__int64, __int64))(v107 + 184))(v108, v109);
v110 = **(_QWORD **)(a1 + 408);
v111 = *(_QWORD *)(a1 + 408);
v112 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 384) + 200LL))(*(_QWORD *)(a1 + 384));
(*(void (__fastcall **)(__int64, __int64))(v110 + 184))(v111, v112);
}
v167 = "ncs_med_001.png";
if ( a9 )
v167 = "ncs_small_001.png";
v168 = cocos2d::CCSprite::createWithSpriteFrameName(v167);
*(_QWORD *)(a1 + 472) = v168;
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *))(*(_QWORD *)a1 + 464LL))(a1, v168);
if ( a9 )
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 472) + 160LL))(*(_QWORD *)(a1 + 472));
v169 = **(_QWORD **)(a1 + 472);
v170 = *(_QWORD *)(a1 + 472);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v187, 0.0, 0.5);
(*(void (__fastcall **)(__int64, __int64))(v169 + 288))(v170, v171);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 472) + 336LL))(*(_QWORD *)(a1 + 472), 0);
CustomSongWidget::positionInfoObjects(a1);
v172 = **(_QWORD **)(a1 + 392);
v173 = *(_QWORD *)(a1 + 392);
v174 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 384) + 200LL))(*(_QWORD *)(a1 + 384));
(*(void (__fastcall **)(__int64, __int64))(v172 + 184))(v173, v174);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v187, 1.0, -2.0);
v176 = v175;
v177 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 384) + 200LL))(*(_QWORD *)(a1 + 384));
cocos2d::CCPoint::operator+(v177, &v186, v176);
(*(void (__fastcall **)(_QWORD, void **))(**(_QWORD **)(a1 + 432) + 184LL))(*(_QWORD *)(a1 + 432), &v186);
v178 = **(_QWORD **)(a1 + 464);
v179 = *(_QWORD *)(a1 + 464);
cocos2d::CCRect::CCRect(
(cocos2d::CCRect *)v187,
0.0,
0.0,
fminf(
*(float *)(*(_QWORD *)(a1 + 456) + 432LL) - 4.0,
(float)(*(float *)(*(_QWORD *)(a1 + 456) + 432LL) - 4.0) * 0.0),
8.0);
(*(void (__fastcall **)(__int64, __int64))(v178 + 992))(v179, v180);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 456) + 336LL))(*(_QWORD *)(a1 + 456), 0);
if ( a2 )
{
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 376) + 336LL))(*(_QWORD *)(a1 + 376), 0);
v181 = *(_QWORD *)(a1 + 480);
if ( v181 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v181 + 336LL))(v181, 0);
v182 = *(cocos2d::CCObject **)(a1 + 336);
if ( v182 == a2 )
{
if ( v182 )
LODWORD(v182) = *((_DWORD *)v182 + 80);
}
else
{
cocos2d::CCObject::retain(a2);
v183 = *(cocos2d::CCObject **)(a1 + 336);
if ( v183 )
cocos2d::CCObject::release(v183);
*(_QWORD *)(a1 + 336) = a2;
LODWORD(v182) = *((_DWORD *)a2 + 80);
}
*(_DWORD *)(a1 + 504) = (_DWORD)v182;
}
CustomSongWidget::updateSongInfo(a1);
v184 = qword_14090C070;
if ( !qword_14090C070 )
{
v187[0] = operator new(0x3D0u);
qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v187[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);
v184 = qword_14090C070;
}
MusicDownloadManager::addMusicDownloadDelegate(v184, a1 + 320);
if ( *(_DWORD *)(a1 + 504) )
{
v185 = qword_14090C070;
if ( !qword_14090C070 )
{
v187[0] = operator new(0x3D0u);
qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v187[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);
v185 = qword_14090C070;
}
if ( (unsigned __int8)MusicDownloadManager::isRunningActionForSongID(v185, *(unsigned int *)(a1 + 504)) )
CustomSongWidget::startMonitorDownload(a1);
}
CustomSongWidget::updatePlaybackBtn(a1);
return 1;
}
return result;
}