//
// LevelSearchLayer::init from 0x100059c24 to 0x10005b734 (6928 bytes)
//
// 1 xrefs:
// > LevelSearchLayer::create @ 0x100059bd8
//
// This function is hookable on this platform (idp: arm, 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 10:57:48 +0000
//
__int64 __fastcall LevelSearchLayer::init(_QWORD *a1, int a2)
{
__int64 result; // x0
__int64 v5; // x0
__int64 v6; // x0
__int64 v7; // x0
__int64 v8; // x0
__int64 v9; // x0
__int64 v10; // x0
__int64 v11; // x0
float *v12; // x19
__int64 v13; // x21
__int64 v14; // x0
__int64 v15; // x0
double v16; // d0
float v17; // s8
__int64 v18; // x0
__int64 v19; // x0
float v20; // s0
__int64 v21; // x19
__int64 v22; // x0
__int64 v23; // x0
double v24; // d0
float v25; // s8
__int64 v26; // x0
__int64 v27; // x0
float v28; // s0
float *v29; // x0
__int64 v30; // x19
__int64 v31; // x0
__int64 v32; // x0
float v33; // s9
__int64 v34; // x0
double v35; // d0
float v36; // s8
__int64 v37; // x0
__int64 v38; // x0
float v39; // s0
__int64 v40; // x21
__int64 v41; // x22
__n128 v42; // q0
__int64 v43; // x23
__int64 v44; // x21
float32x2_t *v45; // x22
double v46; // d0
const char *v47; // x0
__int64 v48; // x22
__int64 v49; // x22
float32x2_t *v50; // x19
double v51; // d0
__int64 v52; // x19
__int64 v53; // x19
double v54; // d0
char *v55; // x1
void **v56; // x0
_QWORD *v57; // x19
double v58; // d0
__int64 v59; // x19
__int64 v60; // x19
__int64 v61; // x19
void **v62; // x1
__int64 v63; // x0
__int64 v64; // x19
__int64 v65; // x0
__int64 v66; // x21
__n128 v67; // q0
__int64 v68; // x0
__int64 v69; // x21
__n128 v70; // q0
__int64 v71; // x0
__int64 v72; // x0
__int64 v73; // x0
__int64 v74; // x21
__n128 v75; // q0
__int64 v76; // x19
double v77; // d0
__int64 v78; // x19
double v79; // d0
__int64 v80; // x0
__int64 v81; // x21
__n128 v82; // q0
__int64 v83; // x0
__int64 v84; // x19
__int64 v85; // x0
__int64 v86; // x22
__int64 v87; // x19
__int64 v88; // x22
float32x2_t *v89; // x24
double v90; // d0
__int64 v91; // x19
__int64 v92; // x0
__int64 v93; // x25
__int64 v94; // x0
__int64 v95; // x26
__int64 v96; // x0
__int64 v97; // x24
__int64 v98; // x0
__int64 v99; // x28
__int64 v100; // x19
__int64 v101; // x22
float32x2_t *v102; // x23
double v103; // d0
__int64 v104; // x19
__int64 v105; // x0
__int64 v106; // x22
double v107; // d0
double v108; // d0
double v109; // d0
double v110; // d0
double v111; // d0
double v112; // d0
double v113; // d0
double v114; // d0
double v115; // d0
__int64 v116; // x19
double v117; // d0
__int64 v118; // x19
double v119; // d0
__int64 v120; // x0
__int64 v121; // x0
__int64 v122; // x0
__int64 v123; // x21
__int64 v124; // x19
__int64 v125; // x22
__int64 v126; // x0
const char *CString; // x0
__int64 v128; // x25
__int64 v129; // x26
__n128 v130; // q0
__int64 i; // x22
__int64 v132; // x0
__int64 v133; // x0
__n128 v134; // q0
__int64 v135; // x22
double v136; // d0
__int64 v137; // x19
double v138; // d0
__int64 v139; // x0
__int64 v140; // x0
__int64 v141; // x0
__int64 v142; // x22
__int64 v143; // x0
__int64 v144; // x19
__int64 v145; // x19
void **v146; // x0
__int64 v147; // x25
__int64 v148; // x25
__int64 v149; // x0
__int64 v150; // x19
__n128 v151; // q0
__int64 v152; // x0
__int64 v153; // x19
__int64 j; // x19
__int64 v155; // x0
__int64 v156; // x0
__int64 v157; // x19
__int64 v158; // x21
__int64 v159; // x0
__int64 v160; // x0
double v161; // d0
float v162; // s8
__int64 v163; // x0
__int64 v164; // x0
float v165; // s0
__int64 v166; // x0
__int64 isControllerConnected; // x0
__int64 v168; // x19
__int64 v169; // x0
__int64 v170; // x0
__int64 v171; // x19
__int64 v172; // x0
__int64 v173; // x0
__int64 v174; // x0
int BoolForKey; // w8
__int64 v176; // x0
__int64 v177; // x0
__int64 v178; // x0
int v179; // w8
__int64 v180; // x0
__int64 v181; // x19
__int64 v182; // x0
char *v183; // x0
__int64 v184; // x0
__int64 v185; // x19
__int64 v186; // x0
__int64 v187; // x0
__int64 IntForKey; // x0
unsigned int v189; // [xsp+14h] [xbp-13Ch]
__int64 v190; // [xsp+18h] [xbp-138h]
__int64 v191; // [xsp+20h] [xbp-130h]
__int64 v192; // [xsp+28h] [xbp-128h]
void *v193[2]; // [xsp+30h] [xbp-120h] BYREF
char v194; // [xsp+47h] [xbp-109h]
float32x2_t v195; // [xsp+48h] [xbp-108h] BYREF
float32x2_t v196; // [xsp+50h] [xbp-100h] BYREF
float32x2_t v197; // [xsp+58h] [xbp-F8h] BYREF
float32x2_t v198; // [xsp+60h] [xbp-F0h] BYREF
void *__p[2]; // [xsp+68h] [xbp-E8h] BYREF
char v200; // [xsp+7Fh] [xbp-D1h]
float32x2_t v201; // [xsp+80h] [xbp-D0h] BYREF
void *v202[2]; // [xsp+88h] [xbp-C8h] BYREF
char v203; // [xsp+9Fh] [xbp-B1h]
float v204; // [xsp+A0h] [xbp-B0h] BYREF
__int64 v205; // [xsp+A8h] [xbp-A8h] BYREF
float32x2_t v206; // [xsp+B0h] [xbp-A0h] BYREF
float v207; // [xsp+B8h] [xbp-98h] BYREF
float v208[4]; // [xsp+C0h] [xbp-90h] BYREF
__int64 v209; // [xsp+D0h] [xbp-80h] BYREF
result = cocos2d::CCLayer::init();
if ( (_DWORD)result )
{
v189 = result;
v5 = GameManager::sharedState(result);
*(_DWORD *)(v5 + 964) = -1;
v6 = GameManager::sharedState(v5);
*(_DWORD *)(v6 + 968) = -1;
v7 = GameManager::sharedState(v6);
*(_DWORD *)(v7 + 708) = 4;
*((_DWORD *)a1 + 108) = a2;
*(_DWORD *)(GameManager::sharedState(v7) + 1312) = a2;
(*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 1072LL))(a1, 1);
v8 = (*(__int64 (__fastcall **)(_QWORD *, __int64))(*a1 + 1088LL))(a1, 1);
v9 = cocos2d::CCDictionary::create(v8);
a1[60] = v9;
cocos2d::CCObject::retain(v9);
v11 = cocos2d::CCDirector::sharedDirector(v10);
cocos2d::CCDirector::getWinSize(&v209, v11);
v12 = (float *)cocos2d::CCSprite::create("GJ_gradientBG.png");
sub_1000262BC((float *)v202, 0.0, 0.0);
(*(void (__fastcall **)(float *, void **))(*(_QWORD *)v12 + 296LL))(v12, v202);
(*(void (__fastcall **)(_QWORD *, float *, __int64))(*a1 + 464LL))(a1, v12, 4294967293LL);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v12 + 128LL))(v12, (float)(*(float *)&v209 + 10.0) / v12[108]);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v12 + 144LL))(
v12,
(float)(*((float *)&v209 + 1) + 10.0) / v12[109]);
sub_1000262BC((float *)v202, -5.0, -5.0);
(*(void (__fastcall **)(float *, void **))(*(_QWORD *)v12 + 184LL))(v12, v202);
BYTE2(v202[0]) = -1;
LOWORD(v202[0]) = 26112;
(*(void (__fastcall **)(float *, void **))(*(_QWORD *)v12 + 960LL))(v12, v202);
v13 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png");
sub_1000262BC((float *)v202, 0.0, 0.0);
v14 = (*(__int64 (__fastcall **)(__int64, void **))(*(_QWORD *)v13 + 296LL))(v13, v202);
v15 = cocos2d::CCDirector::sharedDirector(v14);
v16 = sub_100207EA8(v15);
v17 = *(float *)&v16 + -1.0;
v19 = cocos2d::CCDirector::sharedDirector(v18);
v20 = sub_100207EA0(v19);
sub_1000262BC((float *)v202, v17, v20 + -1.0);
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v13 + 184LL))(v13, v202);
(*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v13, 1);
v21 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png");
sub_1000262BC((float *)v202, 1.0, 0.0);
v22 = (*(__int64 (__fastcall **)(__int64, void **))(*(_QWORD *)v21 + 296LL))(v21, v202);
v23 = cocos2d::CCDirector::sharedDirector(v22);
v24 = sub_100207EB0(v23);
v25 = *(float *)&v24 + 1.0;
v27 = cocos2d::CCDirector::sharedDirector(v26);
v28 = sub_100207EA0(v27);
sub_1000262BC((float *)v202, v25, v28 + -1.0);
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v21 + 184LL))(v21, v202);
cocos2d::CCSprite::setFlipX(v21, 1);
(*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v21, 1);
v29 = sub_1000262CC(v208, 0.0, 0.0, 80.0, 80.0);
v30 = cocos2d::CCMenu::create(v29);
v31 = (*(__int64 (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v30, 2);
v32 = AppDelegate::get(v31);
if ( *(_BYTE *)(v32 + 37) )
v33 = 50.0;
else
v33 = 25.0;
v34 = cocos2d::CCDirector::sharedDirector(v32);
v35 = sub_100207EB0(v34);
v36 = *(float *)&v35 - v33;
v38 = cocos2d::CCDirector::sharedDirector(v37);
v39 = sub_100207E98(v38);
sub_1000262BC(&v207, v36, v39 - v33);
v40 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v40 + 160LL))(v40, 0.8);
v41 = CCMenuItemSpriteExtra::create(v40, 0, a1, LevelSearchLayer::confirmClearFilters, 0);
v42.n128_f64[0] = (*(double (__fastcall **)(__int64, __int64))(*(_QWORD *)v30 + 456LL))(v30, v41);
cocos2d::CCNode::convertToNodeSpace(v202, v30, &v207, v42);
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v41 + 184LL))(v41, v202);
v43 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_plusBtn_001.png");
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v43 + 160LL))(v43, 0.8);
v44 = CCMenuItemSpriteExtra::create(v43, 0, a1, LevelSearchLayer::onMoreOptions, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v30 + 456LL))(v30, v44);
CCMenuItemSpriteExtra::setSizeMult(1.5);
if ( *((_DWORD *)a1 + 108) == 1 )
{
memset(v202, 125, 3);
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v43 + 960LL))(v43, v202);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v44 + 1056LL))(v44, 0);
}
v45 = (float32x2_t *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v41 + 192LL))(v41);
sub_1000262BC((float *)v193, 0.0, -50.0);
*(float32x2_t *)&v46 = sub_100026318(v45, (float32x2_t *)v193, (float32x2_t *)v202);
(*(void (__fastcall **)(__int64, void **, double))(*(_QWORD *)v44 + 184LL))(v44, v202, v46);
if ( *((_DWORD *)a1 + 108) )
v47 = "GJ_viewLevelsBtn_001.png";
else
v47 = "GJ_viewListsBtn_001.png";
v48 = cocos2d::CCSprite::createWithSpriteFrameName(v47);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v48 + 160LL))(v48, 0.8);
v49 = CCMenuItemSpriteExtra::create(v48, 0, a1, LevelSearchLayer::onSearchMode, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v30 + 456LL))(v30, v49);
v50 = (float32x2_t *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v44 + 192LL))(v44);
sub_1000262BC((float *)v193, 0.0, -50.0);
*(float32x2_t *)&v51 = sub_100026318(v50, (float32x2_t *)v193, (float32x2_t *)v202);
(*(void (__fastcall **)(__int64, void **, double))(*(_QWORD *)v49 + 184LL))(v49, v202, v51);
sub_1000262BC((float *)&v206, *(float *)&v209 * 0.5, (float)(*((float *)&v209 + 1) * 0.5) + 130.0);
sub_1000264D4(v202, (__int64)v208);
v52 = cocos2d::extension::CCScale9Sprite::create("square02b_001.png", v202);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v52 + 912LL))(v52, 255);
sub_1000262C4((float *)&v205, 365.0, 40.0);
(*(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v52 + 320LL))(v52, &v205);
(*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v52, 4294967294LL);
(*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v52 + 184LL))(v52, &v206);
BYTE2(v202[0]) = -115;
LOWORD(v202[0]) = 14336;
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v52 + 960LL))(v52, v202);
sub_1000262CC((float *)v202, 0.0, 0.0, 40.0, 40.0);
v53 = cocos2d::extension::CCScale9Sprite::create("square02b_small.png", v202);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v53 + 912LL))(v53, 255);
sub_1000262C4(&v204, 210.0, 30.0);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v53 + 320LL))(v53, &v204);
(*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v53, 0xFFFFFFFFLL);
sub_1000262BC((float *)v193, -73.0, 0.0);
*(float32x2_t *)&v54 = sub_100026318(&v206, (float32x2_t *)v193, (float32x2_t *)v202);
(*(void (__fastcall **)(__int64, void **, double))(*(_QWORD *)v53 + 184LL))(v53, v202, v54);
BYTE2(v202[0]) = 98;
LOWORD(v202[0]) = 9984;
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v53 + 960LL))(v53, v202);
if ( *((_DWORD *)a1 + 108) == 1 )
v55 = "Enter a list or id";
else
v55 = "Enter a level, user or id";
sub_100009900(v202, v55);
if ( v203 >= 0 )
v56 = v202;
else
v56 = (void **)v202[0];
a1[55] = CCTextInputNode::create(v56, "Thonburi", 24, "bigFont.fnt", 194.0, 50.0);
(*(void (__fastcall **)(_QWORD *))(*a1 + 464LL))(a1);
v57 = (_QWORD *)a1[55];
v57[73] = a1 + 51;
sub_1000262BC((float *)&v201, -174.0, 0.0);
*(float32x2_t *)&v58 = sub_100026318(&v206, &v201, (float32x2_t *)v193);
(*(void (__fastcall **)(_QWORD *, void **, double))(*v57 + 184LL))(v57, v193, v58);
v59 = *(_QWORD *)(a1[55] + 576LL);
sub_1000262BC((float *)v193, 0.0, 0.5);
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v59 + 296LL))(v59, v193);
v60 = *(_QWORD *)(a1[55] + 600LL);
sub_1000262BC((float *)v193, 0.0, 0.5);
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v60 + 296LL))(v60, v193);
CCTextInputNode::setMaxLabelScale(a1[55], 0.7);
CCTextInputNode::setMaxLabelWidth(a1[55], 194.0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1[55] + 576LL) + 344LL))(*(_QWORD *)(a1[55] + 576LL), 0);
v61 = a1[55];
*(_DWORD *)(v61 + 592) = 20;
sub_100009900(__p, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
CCTextInputNode::setAllowedChars(v61, __p);
if ( v200 < 0 )
operator delete(__p[0]);
if ( v203 >= 0 )
v62 = v202;
else
v62 = (void **)v202[0];
v63 = sub_10005BA1C(a1, v62);
v64 = cocos2d::CCMenu::create(v63);
(*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 456LL))(a1, v64);
v65 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_longBtn06_001.png");
v66 = CCMenuItemSpriteExtra::create(v65, 0, a1, LevelSearchLayer::onSearch, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v64 + 456LL))(v64, v66);
sub_1000262BC((float *)&v198, 63.0, 0.0);
v67.n128_u64[0] = (unsigned __int64)sub_100026318(&v206, &v198, &v201);
cocos2d::CCNode::convertToNodeSpace(v193, v64, &v201, v67);
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v66 + 184LL))(v66, v193);
v68 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_longBtn05_001.png");
v69 = CCMenuItemSpriteExtra::create(v68, 0, a1, LevelSearchLayer::onSearchUser, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v64 + 456LL))(v64, v69);
sub_1000262BC((float *)&v198, 110.0, 0.0);
v70.n128_u64[0] = (unsigned __int64)sub_100026318(&v206, &v198, &v201);
cocos2d::CCNode::convertToNodeSpace(v193, v64, &v201, v70);
v71 = (*(__int64 (__fastcall **)(__int64, void **))(*(_QWORD *)v69 + 184LL))(v69, v193);
v72 = GameManager::sharedState(v71);
if ( (unsigned int)GameManager::safeModeEnabled(v72) )
{
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v69 + 344LL))(v69, 0);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v69 + 1056LL))(v69, 0);
}
v73 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_longBtn07_001.png");
v74 = CCMenuItemSpriteExtra::create(v73, 0, a1, LevelSearchLayer::onClearFreeSearch, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v64 + 456LL))(v64, v74);
sub_1000262BC((float *)&v198, 157.0, 0.0);
v75.n128_u64[0] = (unsigned __int64)sub_100026318(&v206, &v198, &v201);
cocos2d::CCNode::convertToNodeSpace(v193, v64, &v201, v75);
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v74 + 184LL))(v74, v193);
sub_1000262BC((float *)&v201, *(float *)&v209 * 0.5, (float)(*((float *)&v209 + 1) * 0.5) + 28.0);
v76 = cocos2d::CCLabelBMFont::create_1("Quick Search", "bigFont.fnt");
sub_1000262BC((float *)&v198, 0.0, 69.5);
*(float32x2_t *)&v77 = sub_100026318(&v201, &v198, (float32x2_t *)v193);
(*(void (__fastcall **)(__int64, void **, double))(*(_QWORD *)v76 + 184LL))(v76, v193, v77);
(*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 456LL))(a1, v76);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v76 + 160LL))(v76, 0.5);
sub_1000264D4(v193, (__int64)v208);
v78 = cocos2d::extension::CCScale9Sprite::create("square02b_001.png", v193);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v78 + 912LL))(v78, 255);
sub_1000262C4((float *)v193, 365.0, 115.0);
v79 = sub_100026450(&v205, (double *)v193);
(*(void (__fastcall **)(__int64, __int64 *, double))(*(_QWORD *)v78 + 320LL))(v78, &v205, v79);
(*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v78, 0xFFFFFFFFLL);
(*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v78 + 184LL))(v78, &v201);
BYTE2(v193[0]) = 117;
LOWORD(v193[0]) = 11776;
v80 = (*(__int64 (__fastcall **)(__int64, void **))(*(_QWORD *)v78 + 960LL))(v78, v193);
v81 = cocos2d::CCMenu::create(v80);
v82.n128_f64[0] = (*(double (__fastcall **)(_QWORD *, __int64))(*a1 + 456LL))(a1, v81);
cocos2d::CCNode::convertToNodeSpace(&v198, v81, &v201, v82);
v83 = sub_10005BEFC("GJ_longBtn04_001.png", "Downloads", "GJ_sDownloadIcon_001.png", 0.43, 1.1);
v84 = CCMenuItemSpriteExtra::create(v83, 0, a1, LevelSearchLayer::onMostDownloaded, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v81 + 456LL))(v81, v84);
v85 = sub_10005BEFC("GJ_longBtn04_001.png", "Likes", "GJ_sLikeIcon_001.png", 0.5, 1.1);
v86 = CCMenuItemSpriteExtra::create(v85, 0, a1, LevelSearchLayer::onMostLikes, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v81 + 456LL))(v81, v86);
v191 = v86;
v192 = v84;
v87 = sub_10005BEFC("GJ_longBtn04_001.png", "Hyped", "particle_228_001.png", 0.5, 1.1);
v88 = *(_QWORD *)(v87 + 608);
v89 = (float32x2_t *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v88 + 192LL))(v88);
sub_1000262BC((float *)&v197, -1.0, 1.0);
*(float32x2_t *)&v90 = sub_100026318(v89, &v197, (float32x2_t *)v193);
(*(void (__fastcall **)(__int64, void **, double))(*(_QWORD *)v88 + 184LL))(v88, v193, v90);
v91 = CCMenuItemSpriteExtra::create(v87, 0, a1, LevelSearchLayer::onHyped, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v81 + 456LL))(v81, v91);
v92 = sub_10005BEFC("GJ_longBtn04_001.png", "Trending", "GJ_sTrendingIcon_001.png", 0.5, 1.1);
v93 = CCMenuItemSpriteExtra::create(v92, 0, a1, LevelSearchLayer::onTrending, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v81 + 456LL))(v81, v93);
v94 = sub_10005BEFC("GJ_longBtn04_001.png", "Recent", "GJ_sRecentIcon_001.png", 0.5, 1.1);
v95 = CCMenuItemSpriteExtra::create(v94, 0, a1, LevelSearchLayer::onMostRecent, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v81 + 456LL))(v81, v95);
v96 = sub_10005BEFC("GJ_longBtn04_001.png", "Magic", "GJ_sMagicIcon_001.png", 0.5, 1.1);
v97 = CCMenuItemSpriteExtra::create(v96, 0, a1, LevelSearchLayer::onMagic, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v81 + 456LL))(v81, v97);
v98 = sub_10005BEFC("GJ_longBtn04_001.png", "Awarded", "GJ_sStarsIcon_001.png", 0.5, 1.1);
v99 = CCMenuItemSpriteExtra::create(v98, 0, a1, LevelSearchLayer::onLatestStars, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v81 + 456LL))(v81, v99);
v190 = v91;
v100 = sub_10005BEFC("GJ_longBtn04_001.png", "Followed", "GJ_followIcon_001.png", 0.5, 0.7125);
v101 = *(_QWORD *)(v100 + 608);
v102 = (float32x2_t *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v101 + 192LL))(v101);
sub_1000262BC((float *)&v197, -2.5, 0.5);
*(float32x2_t *)&v103 = sub_100026318(v102, &v197, (float32x2_t *)v193);
(*(void (__fastcall **)(__int64, void **, double))(*(_QWORD *)v101 + 184LL))(v101, v193, v103);
v104 = CCMenuItemSpriteExtra::create(v100, 0, a1, LevelSearchLayer::onFollowed, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v81 + 456LL))(v81, v104);
v105 = sub_10005BEFC("GJ_longBtn04_001.png", "Friends", "GJ_sFriendsIcon_001.png", 0.5, 1.1);
v106 = CCMenuItemSpriteExtra::create(v105, 0, a1, LevelSearchLayer::onFriends, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v81 + 456LL))(v81, v106);
sub_1000262BC((float *)&v197, -119.0, 36.0);
*(float32x2_t *)&v107 = sub_100026318(&v198, &v197, (float32x2_t *)v193);
(*(void (__fastcall **)(__int64, void **, double))(*(_QWORD *)v192 + 184LL))(v192, v193, v107);
sub_1000262BC((float *)&v197, 0.0, 36.0);
*(float32x2_t *)&v108 = sub_100026318(&v198, &v197, (float32x2_t *)v193);
(*(void (__fastcall **)(__int64, void **, double))(*(_QWORD *)v191 + 184LL))(v191, v193, v108);
sub_1000262BC((float *)&v197, 119.0, 36.0);
*(float32x2_t *)&v109 = sub_100026318(&v198, &v197, (float32x2_t *)v193);
(*(void (__fastcall **)(__int64, void **, double))(*(_QWORD *)v190 + 184LL))(v190, v193, v109);
sub_1000262BC((float *)&v197, -119.0, 0.0);
*(float32x2_t *)&v110 = sub_100026318(&v198, &v197, (float32x2_t *)v193);
(*(void (__fastcall **)(__int64, void **, double))(*(_QWORD *)v93 + 184LL))(v93, v193, v110);
sub_1000262BC((float *)&v197, 0.0, 0.0);
*(float32x2_t *)&v111 = sub_100026318(&v198, &v197, (float32x2_t *)v193);
(*(void (__fastcall **)(__int64, void **, double))(*(_QWORD *)v95 + 184LL))(v95, v193, v111);
sub_1000262BC((float *)&v197, 119.0, 0.0);
*(float32x2_t *)&v112 = sub_100026318(&v198, &v197, (float32x2_t *)v193);
(*(void (__fastcall **)(__int64, void **, double))(*(_QWORD *)v97 + 184LL))(v97, v193, v112);
sub_1000262BC((float *)&v197, -119.0, -36.0);
*(float32x2_t *)&v113 = sub_100026318(&v198, &v197, (float32x2_t *)v193);
(*(void (__fastcall **)(__int64, void **, double))(*(_QWORD *)v99 + 184LL))(v99, v193, v113);
sub_1000262BC((float *)&v197, 0.0, -36.0);
*(float32x2_t *)&v114 = sub_100026318(&v198, &v197, (float32x2_t *)v193);
(*(void (__fastcall **)(__int64, void **, double))(*(_QWORD *)v104 + 184LL))(v104, v193, v114);
sub_1000262BC((float *)&v197, 119.0, -36.0);
*(float32x2_t *)&v115 = sub_100026318(&v198, &v197, (float32x2_t *)v193);
(*(void (__fastcall **)(__int64, void **, double))(*(_QWORD *)v106 + 184LL))(v106, v193, v115);
sub_1000262BC((float *)&v197, *(float *)&v209 * 0.5, (float)(*((float *)&v209 + 1) * 0.5) + -77.0);
v116 = cocos2d::CCLabelBMFont::create_1("Filters", "bigFont.fnt");
sub_1000262BC((float *)&v196, 0.0, 37.0);
*(float32x2_t *)&v117 = sub_100026318(&v197, &v196, (float32x2_t *)v193);
(*(void (__fastcall **)(__int64, void **, double))(*(_QWORD *)v116 + 184LL))(v116, v193, v117);
(*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 456LL))(a1, v116);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v116 + 160LL))(v116, 0.5);
sub_1000264D4(v193, (__int64)v208);
v118 = cocos2d::extension::CCScale9Sprite::create("square02b_001.png", v193);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v118 + 912LL))(v118, 255);
sub_1000262C4((float *)v193, 365.0, 50.0);
v119 = sub_100026450(&v205, (double *)v193);
(*(void (__fastcall **)(__int64, __int64 *, double))(*(_QWORD *)v118 + 320LL))(v118, &v205, v119);
(*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v118, 0xFFFFFFFFLL);
(*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v118 + 184LL))(v118, &v197);
BYTE2(v193[0]) = 91;
LOWORD(v193[0]) = 9216;
v120 = (*(__int64 (__fastcall **)(__int64, void **))(*(_QWORD *)v118 + 960LL))(v118, v193);
v121 = sub_1002E736C(v120);
a1[58] = v121;
cocos2d::CCObject::retain(v121);
v123 = sub_1002E736C(v122);
v124 = cocos2d::CCMenu::create(v123);
(*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v124, 10);
v125 = 0;
do
{
v126 = sub_1003065B0("difficulty_%02d_btn_001.png", v125);
CString = (const char *)cocos2d::CCString::getCString(v126);
if ( (_DWORD)v125 == 7 )
CString = "difficulty_auto_btn_001.png";
v128 = cocos2d::CCSprite::createWithSpriteFrameName(CString);
memset(v193, 125, 3);
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v128 + 960LL))(v128, v193);
sub_1002E74E0(a1[58], v128);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v128 + 160LL))(v128, 0.8);
v129 = CCMenuItemSpriteExtra::create(v128, 0, a1, LevelSearchLayer::toggleDifficulty, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v129 + 72LL))(v129, v125);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v124 + 456LL))(v124, v129);
v130 = sub_1002E74E0(v123, v129);
if ( (_DWORD)v125 == 6 )
a1[61] = v128;
v125 = (unsigned int)(v125 + 1);
}
while ( (_DWORD)v125 != 8 );
cocos2d::CCNode::convertToNodeSpace(v193, v124, &v197, v130);
GameToolbox::alignItemsHorisontally(v123, (float32x2_t *)v193, 0, 18.0);
for ( i = 0;
(unsigned int)i < (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v124 + 496LL))(v124);
i = (unsigned int)(i + 1) )
{
v132 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v124 + 488LL))(v124);
sub_1002E75A0(v132, i);
CCMenuItemSpriteExtra::setSizeMult(1.5);
}
v133 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_plus2Btn_001.png");
a1[62] = CCMenuItemSpriteExtra::create(v133, 0, a1, LevelSearchLayer::onSpecialDemon, 0);
v134.n128_f64[0] = (*(double (__fastcall **)(__int64))(*(_QWORD *)v124 + 456LL))(v124);
v135 = a1[62];
cocos2d::CCNode::convertToNodeSpace(&v196, v124, &v197, v134);
sub_1000262BC((float *)&v195, 202.5, 0.0);
*(float32x2_t *)&v136 = sub_100026318(&v196, &v195, (float32x2_t *)v193);
(*(void (__fastcall **)(__int64, void **, double))(*(_QWORD *)v135 + 184LL))(v135, v193, v136);
sub_1000262BC((float *)&v196, *(float *)&v209 * 0.5, (float)(*((float *)&v209 + 1) * 0.5) + -128.0);
sub_1000264D4(v193, (__int64)v208);
v137 = cocos2d::extension::CCScale9Sprite::create("square02b_001.png", v193);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v137 + 912LL))(v137, 255);
sub_1000262C4((float *)v193, 365.0, 35.0);
v138 = sub_100026450(&v205, (double *)v193);
(*(void (__fastcall **)(__int64, __int64 *, double))(*(_QWORD *)v137 + 320LL))(v137, &v205, v138);
(*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v137, 0xFFFFFFFFLL);
(*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v137 + 184LL))(v137, &v196);
BYTE2(v193[0]) = 79;
LOWORD(v193[0]) = 7936;
v139 = (*(__int64 (__fastcall **)(__int64, void **))(*(_QWORD *)v137 + 960LL))(v137, v193);
v140 = sub_1002E736C(v139);
a1[59] = v140;
cocos2d::CCObject::retain(v140);
v141 = sub_1002E7674(v123);
v142 = cocos2d::CCMenu::create(v141);
(*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v142, 10);
if ( !*((_DWORD *)a1 + 108) )
{
v143 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_timeIcon_001.png");
v144 = CCMenuItemSpriteExtra::create(v143, 0, 0, 0, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v142 + 456LL))(v142, v144);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v144 + 1056LL))(v144, 0);
sub_1002E74E0(v123, v144);
v145 = 0;
do
{
GJGameLevel::lengthKeyToString(v193, v145);
if ( v194 >= 0 )
v146 = v193;
else
v146 = (void **)v193[0];
v147 = cocos2d::CCLabelBMFont::create_1(v146, "bigFont.fnt");
if ( v194 < 0 )
operator delete(v193[0]);
memset(v193, 125, 3);
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v147 + 1072LL))(v147, v193);
sub_1002E74E0(a1[59], v147);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v147 + 160LL))(v147, 0.42);
v148 = CCMenuItemSpriteExtra::create(v147, 0, a1, sub_10005C864, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v148 + 72LL))(v148, v145);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v142 + 456LL))(v142, v148);
sub_1002E74E0(v123, v148);
v145 = (unsigned int)(v145 + 1);
}
while ( (_DWORD)v145 != 6 );
}
v149 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_starsIcon_001.png");
a1[56] = v149;
v150 = CCMenuItemSpriteExtra::create(v149, 0, a1, sub_10005C984, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v142 + 456LL))(v142, v150);
v151 = sub_1002E74E0(v123, v150);
if ( *((_DWORD *)a1 + 108) == 1 )
{
v152 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_noStarsIcon_001.png");
a1[57] = v152;
v153 = CCMenuItemSpriteExtra::create(v152, 0, a1, sub_10005CA70, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v142 + 456LL))(v142, v153);
v151 = sub_1002E74E0(v123, v153);
}
cocos2d::CCNode::convertToNodeSpace(v193, v142, &v196, v151);
GameToolbox::alignItemsHorisontally(v123, (float32x2_t *)v193, 0, 12.0);
for ( j = 0;
(unsigned int)j < (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v142 + 496LL))(v142);
j = (unsigned int)(j + 1) )
{
v155 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v142 + 488LL))(v142);
sub_1002E75A0(v155, j);
CCMenuItemSpriteExtra::setSizeMult(1.3);
}
v156 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
v157 = CCMenuItemSpriteExtra::create(v156, 0, a1, sub_10005CB50, 0);
CCMenuItemSpriteExtra::setSizeMult(1.5);
v158 = sub_100270434(v157);
v159 = (*(__int64 (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v158, 1);
v160 = cocos2d::CCDirector::sharedDirector(v159);
v161 = sub_100207EA8(v160);
v162 = *(float *)&v161;
v164 = cocos2d::CCDirector::sharedDirector(v163);
v165 = sub_100207E98(v164);
sub_1000262BC((float *)v193, v162 + 24.0, v165 + -23.0);
v166 = (*(__int64 (__fastcall **)(__int64, void **))(*(_QWORD *)v158 + 184LL))(v158, v193);
isControllerConnected = PlatformToolbox::isControllerConnected(v166);
if ( (isControllerConnected & 1) != 0 )
isControllerConnected = GameToolbox::addBackButton((__int64)a1, v157);
v168 = 0;
do
{
v169 = GameLevelManager::sharedState(isControllerConnected);
v170 = sub_1000CDA88(v169, v168);
isControllerConnected = sub_10005CBA8(a1, v168, v170);
v168 = (unsigned int)(v168 + 1);
}
while ( (_DWORD)v168 != 8 );
v171 = 0;
do
{
v172 = GameLevelManager::sharedState(isControllerConnected);
v173 = sub_1000CDBB0(v172, v171);
isControllerConnected = sub_10005CCA8(a1, v171, v173);
v171 = (unsigned int)(v171 + 1);
}
while ( (_DWORD)v171 != 6 );
v174 = GameLevelManager::sharedState(isControllerConnected);
BoolForKey = GameLevelManager::getBoolForKey(v174, "star_filter");
v176 = a1[56];
if ( BoolForKey )
{
BYTE2(v193[0]) = -1;
LOWORD(v193[0]) = -1;
}
else
{
memset(v193, 125, 3);
}
v177 = (*(__int64 (__fastcall **)(__int64, void **))(*(_QWORD *)v176 + 960LL))(v176, v193);
if ( a1[57] )
{
v178 = GameLevelManager::sharedState(v177);
v179 = GameLevelManager::getBoolForKey(v178, "nostar_filter");
v180 = a1[57];
if ( v179 )
{
BYTE2(v193[0]) = -1;
LOWORD(v193[0]) = -1;
}
else
{
memset(v193, 125, 3);
}
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v180 + 960LL))(v180, v193);
}
v181 = a1[60];
v182 = sub_1003065B0("D%i", 6);
v183 = (char *)cocos2d::CCString::getCString(v182);
sub_100009900(v193, v183);
v184 = cocos2d::CCDictionary::valueForKey(v181, v193);
v185 = cocos2d::CCString::boolValue(v184);
if ( v194 < 0 )
operator delete(v193[0]);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)a1[62] + 1056LL))(a1[62], v185);
v186 = (*(__int64 (__fastcall **)(_QWORD, __int64))(*(_QWORD *)a1[62] + 344LL))(a1[62], v185);
v187 = GameLevelManager::sharedState(v186);
IntForKey = GameLevelManager::getIntForKey(v187, "demon_filter");
(*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 1184LL))(a1, IntForKey);
if ( v203 < 0 )
operator delete(v202[0]);
return v189;
}
return result;
}