// // EditorSoundBrowserLayer::init from 0x14018dc50 to 0x14018edf3 (4515 bytes) // // 2 xrefs: // > EditorSoundBrowserLayer::create @ 0x14018dc03 // > @ 0x1409191b4 // // 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:42 +0000 // // Hidden C++ exception states: #wind=9 char __fastcall EditorSoundBrowserLayer::init(__int64 a1, __int64 a2, __int64 a3, int a4) { __int64 v7; // rcx __int64 v8; // rax float v9; // xmm6_4 float v10; // xmm0_4 float v11; // xmm7_4 __int64 v12; // rcx __int64 v13; // rax struct cocos2d::CCLabelBMFont *v14; // rdi __int64 v15; // rbx __int64 v16; // rax __int64 v17; // rcx cocos2d::CCObject *v18; // rax __int64 v19; // rcx cocos2d::CCObject *v20; // rax float v21; // xmm0_4 float v22; // xmm15_4 float v23; // xmm6_4 int v24; // r12d const char **v25; // r15 __int64 v26; // rax __int64 v27; // rdi __int64 v28; // rbx __int64 v29; // rax const struct cocos2d::CCSize *v30; // rax __int64 v31; // rax struct cocos2d::CCObject *v32; // r13 __int64 v33; // rbx __int64 v34; // rax cocos2d::CCLabelBMFont *v35; // rbx struct cocos2d::CCSprite *v36; // rsi float v37; // xmm7_4 float v38; // xmm6_4 __int64 v39; // rbx __int64 v40; // rax __int64 v41; // rbx __int64 v42; // rax struct cocos2d::CCObject *v43; // rsi __int64 v44; // rbx __int64 v45; // rcx __int64 v46; // rax int v47; // eax __int64 v48; // rdi __int64 v49; // rbx __int64 v50; // rax __int64 v51; // rax float v52; // xmm7_4 float v53; // xmm6_4 __int64 *v54; // rbx cocos2d::CCObject *v55; // rsi __int64 v56; // rdi __int64 v57; // rbx float v58; // xmm10_4 __int64 v59; // rax __int64 v60; // rax cocos2d::CCSprite *v61; // rbx cocos2d::CCObject *v62; // rsi __int64 v63; // rdi __int64 v64; // rbx __int64 v65; // rax __int64 v66; // rax struct cocos2d::CCLabelBMFont *v67; // rax __int64 v68; // rdi __int64 v69; // rbx __int64 v70; // rax struct cocos2d::CCSprite *v71; // rbx cocos2d::CCObject *v72; // rsi float v73; // xmm7_4 __int64 v74; // rdi __int64 v75; // rcx cocos2d::CCDirector *v76; // rax float v77; // xmm6_4 __int64 v78; // rcx cocos2d::CCDirector *v79; // rax float v80; // xmm0_4 __int64 v81; // rbx __int64 v82; // rax __int64 v83; // rax struct cocos2d::CCSprite *v84; // rbx cocos2d::CCObject *v85; // rsi float v86; // xmm7_4 __int64 v87; // rdi __int64 v88; // rcx cocos2d::CCDirector *v89; // rax float v90; // xmm6_4 __int64 v91; // rcx cocos2d::CCDirector *v92; // rax float v93; // xmm0_4 __int64 v94; // rbx __int64 v95; // rax __int64 v96; // rax __int64 *v97; // rbx cocos2d::CCObject *v98; // rsi __int64 v99; // rdi __int64 v100; // rbx float v101; // xmm7_4 __int64 v102; // rax __int64 v103; // rax _QWORD *v104; // r8 _OWORD *v105; // rcx const char *v106; // rax __int64 v107; // rdx __int64 *v108; // rsi __int64 v109; // rdi __int64 v110; // rbx __int64 v111; // rax __int64 v112; // rax void **v113; // rbx void *v114; // rdx __int64 v115; // rdx unsigned int v116; // edi __int64 v117; // rsi __int64 v118; // rcx __int64 v119; // rax void **v120; // rdx __int128 *v121; // [rsp+48h] [rbp-C0h] BYREF float v122; // [rsp+50h] [rbp-B8h] BYREF float v123; // [rsp+54h] [rbp-B4h] int v124; // [rsp+58h] [rbp-B0h] BYREF float v125; // [rsp+60h] [rbp-A8h] BYREF float v126; // [rsp+64h] [rbp-A4h] float v127; // [rsp+68h] [rbp-A0h] float v128; // [rsp+6Ch] [rbp-9Ch] float v129; // [rsp+70h] [rbp-98h] float v130; // [rsp+74h] [rbp-94h] float v131; // [rsp+78h] [rbp-90h] float v132; // [rsp+7Ch] [rbp-8Ch] float v133; // [rsp+80h] [rbp-88h] cocos2d::CCLabelBMFont *v134; // [rsp+88h] [rbp-80h] BYREF _DWORD v135[4]; // [rsp+90h] [rbp-78h] BYREF __int64 v136; // [rsp+A0h] [rbp-68h] __int64 v137; // [rsp+A8h] [rbp-60h] __int128 v138; // [rsp+B0h] [rbp-58h] BYREF __int64 v139; // [rsp+C0h] [rbp-48h] __int64 v140; // [rsp+C8h] [rbp-40h] void **v141; // [rsp+D0h] [rbp-38h] char v142[8]; // [rsp+D8h] [rbp-30h] BYREF char v143[8]; // [rsp+E0h] [rbp-28h] BYREF char v144[8]; // [rsp+E8h] [rbp-20h] BYREF char v145[8]; // [rsp+F0h] [rbp-18h] BYREF void *v146; // [rsp+F8h] [rbp-10h] __int64 v147; // [rsp+100h] [rbp-8h] int *v148; // [rsp+108h] [rbp+0h] const char *v149; // [rsp+110h] [rbp+8h] BYREF char v150[8]; // [rsp+118h] [rbp+10h] BYREF int v151; // [rsp+120h] [rbp+18h] __int64 (__fastcall *v152)(); // [rsp+128h] [rbp+20h] int v153; // [rsp+130h] [rbp+28h] const char *v154; // [rsp+138h] [rbp+30h] const char *v155; // [rsp+140h] [rbp+38h] char v156[8]; // [rsp+148h] [rbp+40h] BYREF int v157; // [rsp+150h] [rbp+48h] __int64 (__fastcall *v158)(); // [rsp+158h] [rbp+50h] int v159; // [rsp+160h] [rbp+58h] const char *v160; // [rsp+168h] [rbp+60h] const char *v161; // [rsp+170h] [rbp+68h] char v162[8]; // [rsp+178h] [rbp+70h] BYREF int v163; // [rsp+180h] [rbp+78h] __int64 (__fastcall *v164)(); // [rsp+188h] [rbp+80h] int v165; // [rsp+190h] [rbp+88h] const char *v166; // [rsp+198h] [rbp+90h] const char *v167; // [rsp+1A0h] [rbp+98h] char v168[8]; // [rsp+1A8h] [rbp+A0h] BYREF int v169; // [rsp+1B0h] [rbp+A8h] __int64 (__fastcall *v170)(); // [rsp+1B8h] [rbp+B0h] int v171; // [rsp+1C0h] [rbp+B8h] const char *v172; // [rsp+1C8h] [rbp+C0h] const char *v173; // [rsp+1D0h] [rbp+C8h] char v174[8]; // [rsp+1D8h] [rbp+D0h] BYREF int v175; // [rsp+1E0h] [rbp+D8h] __int64 (__fastcall *v176)(); // [rsp+1E8h] [rbp+E0h] int v177; // [rsp+1F0h] [rbp+E8h] const char *v178; // [rsp+1F8h] [rbp+F0h] const char *v179; // [rsp+200h] [rbp+F8h] char v180[8]; // [rsp+208h] [rbp+100h] BYREF int v181; // [rsp+210h] [rbp+108h] __int64 (__fastcall *v182)(); // [rsp+218h] [rbp+110h] int v183; // [rsp+220h] [rbp+118h] const char *v184; // [rsp+228h] [rbp+120h] const char *v185; // [rsp+230h] [rbp+128h] char v186[8]; // [rsp+238h] [rbp+130h] BYREF int v187; // [rsp+240h] [rbp+138h] __int64 (__fastcall *v188)(); // [rsp+248h] [rbp+140h] int v189; // [rsp+250h] [rbp+148h] const char *v190; // [rsp+258h] [rbp+150h] const char *v191; // [rsp+260h] [rbp+158h] char v192[8]; // [rsp+268h] [rbp+160h] BYREF int v193; // [rsp+270h] [rbp+168h] __int64 (__fastcall *v194)(); // [rsp+278h] [rbp+170h] int v195; // [rsp+280h] [rbp+178h] const char *v196; // [rsp+288h] [rbp+180h] const char *v197; // [rsp+290h] [rbp+188h] char v198[8]; // [rsp+298h] [rbp+190h] BYREF int v199; // [rsp+2A0h] [rbp+198h] __int64 (__fastcall *v200)(); // [rsp+2A8h] [rbp+1A0h] int v201; // [rsp+2B0h] [rbp+1A8h] const char *v202; // [rsp+2B8h] [rbp+1B0h] const char *v203; // [rsp+2C0h] [rbp+1B8h] char v204[8]; // [rsp+2C8h] [rbp+1C0h] BYREF int v205; // [rsp+2D0h] [rbp+1C8h] __int64 (__fastcall *v206)(); // [rsp+2D8h] [rbp+1D0h] int v207; // [rsp+2E0h] [rbp+1D8h] v141 = (void **)a2; v147 = a2; *(_QWORD *)(a1 + 1192) = a3; if ( !(unsigned __int8)SetupTriggerPopup::init(a1, 0, 0, a4, 1133248512, 1, 0) ) { sub_14003D310(a2); return 0; } *(_BYTE *)(a1 + 744) = 1; (*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 1096LL))(a1); *(_BYTE *)(a1 + 596) = 1; v8 = cocos2d::CCDirector::sharedDirector(v7); cocos2d::CCDirector::getWinSize(v8, &v125); v9 = v125 * 0.5; v131 = v125 * 0.5; v10 = *(float *)(a1 + 736) * 0.5; v11 = (float)(v126 * 0.5) + v10; v133 = v11; v132 = (float)(v126 * 0.5) - v10; v13 = cocos2d::CCMenu::create(v12); *(_QWORD *)(a1 + 552) = v13; (*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v13, 10); v14 = cocos2d::CCLabelBMFont::create("Browse Sound Packs", "goldFont.fnt"); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v14 + 160LL))(v14); v15 = *(_QWORD *)v14; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v134, v9, v11 - 10.0); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v15 + 184))(v14, v16); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 584) + 464LL))( *(_QWORD *)(a1 + 584), v14); v18 = (cocos2d::CCObject *)cocos2d::CCArray::create(v17); *(_QWORD *)(a1 + 1168) = v18; cocos2d::CCObject::retain(v18); v20 = (cocos2d::CCObject *)cocos2d::CCArray::create(v19); *(_QWORD *)(a1 + 1176) = v20; cocos2d::CCObject::retain(v20); v148 = &dword_14072428C; v149 = "GJ_hammerIcon_001.png"; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v150, 0.0, 0.0); v151 = 1063675494; v152 = EditorSoundBrowserLayer::onSelectMode; v153 = 1; v154 = "Uploaded"; v155 = "GJ_profileButton_001.png"; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v156, 0.0, 0.0); v157 = 1065353216; v158 = EditorSoundBrowserLayer::onSelectMode; v159 = 2; v160 = "Favorite"; v161 = "gj_heartOn_001.png"; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v162, 0.0, 0.0); v163 = 1065353216; v164 = EditorSoundBrowserLayer::onSelectMode; v165 = 0; v166 = "Featured"; v167 = "GJ_starsIcon_001.png"; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v168, 0.0, 0.0); v169 = 1064514355; v170 = EditorSoundBrowserLayer::onSelectMode; v171 = 3; v172 = "Trending"; v173 = "GJ_sTrendingIcon_001.png"; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v174, 0.0, 0.0); v175 = 1065353216; v176 = EditorSoundBrowserLayer::onSelectMode; v177 = 4; v178 = "Friends"; v179 = "GJ_sFriendsIcon_001.png"; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v180, 0.0, 1.0); v181 = 1065353216; v182 = EditorSoundBrowserLayer::onSelectMode; v183 = 5; v184 = "Liked"; v185 = "GJ_sLikeIcon_001.png"; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v186, 0.0, 0.0); v187 = 1064514355; v188 = EditorSoundBrowserLayer::onSelectMode; v189 = 6; v190 = "Download"; v191 = "GJ_sDownloadIcon_001.png"; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v192, 0.0, 1.0); v193 = 1064514355; v194 = EditorSoundBrowserLayer::onSelectMode; v195 = 7; v196 = "Recent"; v197 = "GJ_sRecentIcon_001.png"; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v198, 0.0, 1.0); v199 = 1065353216; v200 = EditorSoundBrowserLayer::onSelectMode; v201 = 8; v202 = "Search"; v203 = "GJ_searchIcon_001.png"; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v204, 0.0, 0.5); v205 = 1064514355; v206 = EditorSoundBrowserLayer::onSelectMode; v207 = 9; v21 = *(float *)(a1 + 732); v22 = (float)(v21 - 28.0) / 5.0; v23 = v22 - 6.0; v130 = v22 - 6.0; v128 = (float)((float)(v125 * 0.5) - (float)(v21 * 0.5)) + 14.0; v127 = v11 - 34.0; v24 = 0; v129 = v22 * 0.5; v25 = &v149; do { cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v138, 0.0, 0.0, 40.0, 40.0); v27 = cocos2d::extension::CCScale9Sprite::create("GJ_button_04.png", v26); v28 = *(_QWORD *)v27; cocos2d::CCSize::CCSize((cocos2d::CCSize *)v142, v23, 22.0); (*(void (__fastcall **)(__int64, __int64))(v28 + 312))(v27, v29); v30 = (const struct cocos2d::CCSize *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v27 + 320LL))(v27); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v122, v30); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v135, 0.0, 0.0, 40.0, 40.0); v32 = (struct cocos2d::CCObject *)cocos2d::extension::CCScale9Sprite::create("GJ_button_02.png", v31); (*(void (__fastcall **)(struct cocos2d::CCObject *, float *))(*(_QWORD *)v32 + 312LL))(v32, &v122); v33 = *(_QWORD *)v32; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v143, v122 * 0.5, v123 * 0.5); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v33 + 184))(v32, v34); (*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)v32 + 336LL))(v32, 0); (*(void (__fastcall **)(__int64, struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)v27 + 456LL))(v27, v32, 0); v35 = cocos2d::CCLabelBMFont::create(*(v25 - 1), (const char *)&qword_140704F78); v134 = v35; (*(void (__fastcall **)(__int64, cocos2d::CCLabelBMFont *, __int64))(*(_QWORD *)v27 + 456LL))(v27, v35, 1); v36 = cocos2d::CCSprite::createWithSpriteFrameName(*v25); (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)v27 + 456LL))(v27, v36, 1); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v36 + 160LL))(v36); v37 = (float)(v122 - 5.0) - 7.5; v38 = (float)((float)(v37 - 7.5) - 2.0) - 5.0; cocos2d::CCLabelBMFont::limitLabelWidth(v35, v38, 0.34, 0.0); v39 = *(_QWORD *)v35; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v144, (float)(v38 * 0.5) + 5.0, (float)(v123 * 0.5) + 1.5); (*(void (__fastcall **)(cocos2d::CCLabelBMFont *, __int64))(v39 + 184))(v134, v40); v41 = *(_QWORD *)v36; cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v145, v37 + *((float *)v25 + 2), (float)(v123 * 0.5) + *((float *)v25 + 3)); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v41 + 184))(v36, v42); v43 = CCMenuItemSpriteExtra::create(v27, 0, a1, (__int64)v25[3]); (*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)v43 + 64LL))( v43, *((unsigned int *)v25 + 8)); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))( *(_QWORD *)(a1 + 552), v43); cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 1176), v32); v44 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v146 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager(v146); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v44 = qword_14090BFD0; } if ( (unsigned __int8)GameManager::getGameVariable(v44, "0218") || (unsigned __int8)GameManager::getGameVariable(v44, "0219") || (v46 = GJAccountManager::sharedState(v45), *(_DWORD *)(v46 + 360) - *(_DWORD *)(v46 + 364) <= 0) ) { v47 = *((_DWORD *)v25 + 8); if ( v47 == 5 || v47 == 2 ) { (*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)v43 + 336LL))(v43, 0); (*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)v43 + 936LL))(v43, 0); } } v48 = *(_QWORD *)v43; v49 = *(_QWORD *)(a1 + 552); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v124, (float)((float)((float)(v24 % 5u) * v22) + v128) + v129, v127 - (float)((float)(v24 / 5u) * 26.0)); cocos2d::CCNode::convertToNodeSpace(v49, &v121, v50); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v48 + 184))(v43, v51); cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 1168), v43); ++v24; v25 += 6; v23 = v130; } while ( v24 < 10 ); v52 = v126 * 0.5; v53 = (float)(*(float *)(a1 + 732) * 0.5) + 24.0; v54 = (__int64 *)cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); v121 = (__int128 *)operator new(0x208u); v55 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v121); if ( v55 ) { if ( CCMenuItemSpriteExtra::init((__int64 *)v55, v54, 0, a1, (__int64)EditorSoundBrowserLayer::onPrevPage) ) { cocos2d::CCObject::autorelease(v55); goto LABEL_18; } (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v55 + 8LL))(v55, 1); } v55 = nullptr; LABEL_18: *((_DWORD *)v55 + 93) = 1069547520; (*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v55); v56 = *(_QWORD *)v55; v57 = *(_QWORD *)(a1 + 552); v58 = v131; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v121, v131 - v53, v52); cocos2d::CCNode::convertToNodeSpace(v57, &v124, v59); (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v56 + 184))(v55, v60); *(_QWORD *)(a1 + 1056) = v55; v61 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); cocos2d::CCSprite::setFlipX(v61, 1); v121 = (__int128 *)operator new(0x208u); v62 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v121); if ( v62 ) { if ( CCMenuItemSpriteExtra::init( (__int64 *)v62, (__int64 *)v61, 0, a1, (__int64)EditorSoundBrowserLayer::onNextPage) ) { cocos2d::CCObject::autorelease(v62); goto LABEL_23; } (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v62 + 8LL))(v62, 1); } v62 = nullptr; LABEL_23: *((_DWORD *)v62 + 93) = 1069547520; (*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v62); v63 = *(_QWORD *)v62; v64 = *(_QWORD *)(a1 + 552); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v121, v53 + v58, v52); cocos2d::CCNode::convertToNodeSpace(v64, &v124, v65); (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v63 + 184))(v62, v66); *(_QWORD *)(a1 + 1064) = v62; v67 = cocos2d::CCLabelBMFont::create(&byte_1406ED6E0, "goldFont.fnt"); *(_QWORD *)(a1 + 1048) = v67; (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v67 + 160LL))(v67); v68 = **(_QWORD **)(a1 + 1048); v69 = *(_QWORD *)(a1 + 1048); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v121, v58, v132 + 56.0); (*(void (__fastcall **)(__int64, __int64))(v68 + 184))(v69, v70); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 584) + 464LL))( *(_QWORD *)(a1 + 584), *(_QWORD *)(a1 + 1048)); v71 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_newBtn_001.png"); v121 = (__int128 *)operator new(0x208u); v72 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v121); if ( v72 ) { if ( CCMenuItemSpriteExtra::init( (__int64 *)v72, (__int64 *)v71, 0, a1, (__int64)EditorSoundBrowserLayer::onSaveActive) ) { cocos2d::CCObject::autorelease(v72); goto LABEL_28; } (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v72 + 8LL))(v72, 1); } v72 = nullptr; LABEL_28: (*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v72); v73 = (float)(*((float *)v71 + 108) * 0.5) + 4.0; v74 = *(_QWORD *)v72; v76 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v75); v77 = cocos2d::CCDirector::getScreenBottom(v76) + v73; v79 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v78); v80 = cocos2d::CCDirector::getScreenRight(v79) - v73; v81 = *(_QWORD *)(a1 + 552); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v121, v80, v77); cocos2d::CCNode::convertToNodeSpace(v81, &v124, v82); (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v74 + 184))(v72, v83); *(_QWORD *)(a1 + 1072) = v72; v84 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_updateBtn_001.png"); v121 = (__int128 *)operator new(0x208u); v85 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v121); if ( v85 ) { if ( CCMenuItemSpriteExtra::init((__int64 *)v85, (__int64 *)v84, 0, a1, (__int64)EditorSoundBrowserLayer::onRefresh) ) { cocos2d::CCObject::autorelease(v85); goto LABEL_33; } (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v85 + 8LL))(v85, 1); } v85 = nullptr; LABEL_33: (*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v85); v86 = (float)(*((float *)v84 + 108) * 0.5) + 4.0; v87 = *(_QWORD *)v85; v89 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v88); v90 = cocos2d::CCDirector::getScreenBottom(v89) + v86; v92 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v91); v93 = cocos2d::CCDirector::getScreenLeft(v92) + v86; v94 = *(_QWORD *)(a1 + 552); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v121, v93, v90); cocos2d::CCNode::convertToNodeSpace(v94, &v124, v95); (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v87 + 184))(v85, v96); v97 = (__int64 *)cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png"); (*(void (__fastcall **)(__int64 *))(*v97 + 160))(v97); v121 = (__int128 *)operator new(0x208u); v98 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v121); if ( v98 ) { if ( CCMenuItemSpriteExtra::init((__int64 *)v98, v97, 0, a1, (__int64)sub_14009D628) ) { cocos2d::CCObject::autorelease(v98); goto LABEL_38; } (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v98 + 8LL))(v98, 1); } v98 = nullptr; LABEL_38: *((_DWORD *)v98 + 93) = 1067030938; (*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v98); v99 = *(_QWORD *)v98; v100 = *(_QWORD *)(a1 + 552); v101 = v133; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v121, v58 - (float)(*(float *)(a1 + 732) * 0.5), v133); cocos2d::CCNode::convertToNodeSpace(v100, &v124, v102); (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v99 + 184))(v98, v103); v121 = &v138; v138 = 0; v139 = 0; v140 = 0; v104 = sub_14003D460(0x170u); *(_QWORD *)&v138 = v104; v139 = 360; v140 = 367; v105 = v104; v106 = "Create a pack, open it to set a name and description, then Overwrite it with your current edito" "r sounds.\n" "Upload shares it online. To change an upload, edit the pack and Upload again.\n" "Open any pack to Load (replace) or Merge it into your editor. Favorite keeps a copy. Update re-downloads the server copy."; v107 = 2; do { *v105 = *(_OWORD *)v106; v105[1] = *((_OWORD *)v106 + 1); v105[2] = *((_OWORD *)v106 + 2); v105[3] = *((_OWORD *)v106 + 3); v105[4] = *((_OWORD *)v106 + 4); v105[5] = *((_OWORD *)v106 + 5); v105[6] = *((_OWORD *)v106 + 6); v105 += 8; *(v105 - 1) = *((_OWORD *)v106 + 7); v106 += 128; --v107; } while ( v107 ); *v105 = *(_OWORD *)v106; v105[1] = *((_OWORD *)v106 + 1); v105[2] = *((_OWORD *)v106 + 2); v105[3] = *((_OWORD *)v106 + 3); v105[4] = *((_OWORD *)v106 + 4); v105[5] = *((_OWORD *)v106 + 5); *((_QWORD *)v105 + 12) = *((_QWORD *)v106 + 12); *((_BYTE *)v104 + 360) = 0; v135[3] = 0; v136 = 11; v137 = 15; strcpy((char *)v135, "Sound Packs"); v108 = (__int64 *)InfoAlertButton::create(v135, &v138); (*(void (__fastcall **)(_QWORD, __int64 *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v108); v109 = *v108; v110 = *(_QWORD *)(a1 + 552); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v121, (float)(*(float *)(a1 + 732) * 0.5) + v58, v101); cocos2d::CCNode::convertToNodeSpace(v110, &v124, v111); (*(void (__fastcall **)(__int64 *, __int64))(v109 + 184))(v108, v112); (*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 1136LL))(a1); *(_BYTE *)(a1 + 744) = 0; v113 = v141; if ( v141[2] ) { *(_BYTE *)(a1 + 1188) = 1; if ( (void **)(a1 + 1104) != v113 ) { v114 = v113; if ( (unsigned __int64)v113[3] > 0xF ) v114 = *v113; sub_1400405A0((void **)(a1 + 1104), v114, (size_t)v113[2]); } v115 = 9; } else { v116 = dword_1408FE3EC; if ( (unsigned int)dword_1408FE3EC >= 0xA ) v116 = 1; v117 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v121 = (__int128 *)operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager(v121); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v117 = qword_14090BFD0; } if ( (unsigned __int8)GameManager::getGameVariable(v117, "0218") || (unsigned __int8)GameManager::getGameVariable(v117, "0219") || (v119 = GJAccountManager::sharedState(v118), *(_DWORD *)(v119 + 360) - *(_DWORD *)(v119 + 364) <= 0) ) { if ( v116 == 5 || v116 == 2 ) v116 = 1; } v120 = &qword_1408FE420; if ( (void **)(a1 + 1104) != &qword_1408FE420 ) { if ( (unsigned __int64)qword_1408FE438 > 0xF ) v120 = (void **)qword_1408FE420; sub_1400405A0((void **)(a1 + 1104), v120, qword_1408FE430); } v115 = v116; } EditorSoundBrowserLayer::setMode(a1, v115); sub_14003D310((__int64)v113); return 1; }