//
// LevelSearchLayer::init from 0x3adc1c to 0x3af048 (5164 bytes)
//
// 1 xrefs:
// > LevelSearchLayer::create @ 0x3af0dc
//
// 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 LevelSearchLayer::init(LevelSearchLayer *a1, int a2)
{
GameManager *v4; // r0
void (__fastcall *setKeypadEnabled)(cocos2d::CCLayer *__hidden, bool); // r3
cocos2d::CCDictionary *v6; // r0
cocos2d::CCDirector *v7; // r0
const char *v8; // r1
cocos2d::CCNode *v9; // r6
void (__fastcall *setAnchorPoint)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7
int (__fastcall *getTag)(const cocos2d::CCObject *__hidden); // r3
cocos2d::CCSprite *v13; // r6
void (__fastcall *v14)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r9
void (__fastcall *v15)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r9
cocos2d::CCDirector *v16; // r0
float v17; // s17
cocos2d::CCDirector *v18; // r0
float v19; // r0
cocos2d::CCSprite *v20; // r6
void (__fastcall *v21)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r7
void (__fastcall *v22)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r7
cocos2d::CCDirector *v23; // r0
float v24; // s17
cocos2d::CCDirector *v25; // r0
float v26; // r0
cocos2d::CCMenu *v27; // r7
cocos2d::CCDirector *v28; // r0
float v29; // s16
cocos2d::CCDirector *v30; // r0
float v31; // r0
cocos2d::CCSprite *v32; // r9
CCMenuItemSpriteExtra *v33; // r9
void (__fastcall *v34)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10
cocos2d::CCSprite *v35; // r10
CCMenuItemSpriteExtra *v36; // r6
void (__fastcall *setColor)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // r2
void (__fastcall *v38)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8
int v39; // r10
const char *v40; // r0
cocos2d::CCSprite *v41; // r5
CCMenuItemSpriteExtra *v42; // r9
void (__fastcall *v43)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10
int v44; // r6
cocos2d::CCNode *v45; // r6
int (__fastcall *v46)(const cocos2d::CCObject *__hidden); // r3
cocos2d::CCNode *v47; // r10
void (__fastcall *v48)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6
int (__fastcall *v49)(const cocos2d::CCObject *__hidden); // r3
char *v50; // r1
CCTextInputNode *v51; // r0
LevelSearchLayer_vtbl *v52; // r3
CCTextInputNode *m_searchInput; // r6
void (__fastcall *v54)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10
cocos2d::CCTextFieldTTF *m_textField; // r6
void (__fastcall *v56)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r10
cocos2d::CCLabelBMFont *m_textLabel; // r6
void (__fastcall *v58)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r10
CCTextInputNode *v59; // r10
cocos2d::CCMenu *v60; // r6
cocos2d::CCSprite *v61; // r0
CCMenuItemSpriteExtra *v62; // r10
cocos2d::CCSprite *v63; // r0
CCMenuItemSpriteExtra *v64; // r10
cocos2d::CCSprite *v65; // r0
CCMenuItemSpriteExtra *v66; // r9
void (__fastcall *v67)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10
cocos2d::CCLabelBMFont *v68; // r6
void (__fastcall *v69)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9
cocos2d::CCNode *v70; // r6
int (__fastcall *v71)(const cocos2d::CCObject *__hidden); // r3
cocos2d::CCMenu *v72; // r5
SearchButton *v73; // r0
CCMenuItemSpriteExtra *v74; // r9
SearchButton *v75; // r0
cocos2d::CCSprite *m_icon; // r6
SearchButton *v77; // r8
int v78; // r10
CCMenuItemSpriteExtra *v79; // r10
SearchButton *v80; // r0
SearchButton *v81; // r0
SearchButton *v82; // r0
SearchButton *v83; // r0
SearchButton *v84; // r0
SearchButton *v85; // r0
CCMenuItemSpriteExtra *v86; // r6
void (__fastcall *v87)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9
void (__fastcall *v88)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9
void (__fastcall *v89)(char *, cocos2d::CCRect *); // r9
void (__fastcall *v90)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9
void (__fastcall *v91)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9
void (__fastcall *v92)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10
void (__fastcall *v93)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10
void (__fastcall *v94)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10
GJAccountManager *v95; // r0
SearchButton *v96; // r0
CCMenuItemSpriteExtra *v97; // r6
void (__fastcall *v98)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r5
cocos2d::CCLabelBMFont *v99; // r5
void (__fastcall *v100)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9
cocos2d::CCNode *v101; // r5
int (__fastcall *v102)(const cocos2d::CCObject *__hidden); // r3
cocos2d::CCArray *v103; // r0
cocos2d::CCArray *v104; // r0
cocos2d::CCArray *v105; // r0
cocos2d::CCArray *v106; // r7
cocos2d::CCMenu *v107; // r5
const char *v108; // r8
cocos2d::CCString *v109; // r0
const char *CString; // r0
const char *v111; // r3
cocos2d::CCSprite *v112; // r9
void (__fastcall *v113)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // r2
CCMenuItemSpriteExtra *v114; // r10
unsigned int i; // r8
cocos2d::CCArray *v117; // r0
CCMenuItemSpriteExtra *v118; // r0
cocos2d::CCSprite *v119; // r0
CCMenuItemSpriteExtra *v120; // r0
cocos2d::CCMenu_vtbl *v121; // r3
CCMenuItemSpriteExtra *m_demonTypeButton; // r8
cocos2d::CCNode *v123; // r5
int (__fastcall *v124)(const cocos2d::CCObject *__hidden); // r3
cocos2d::CCArray *v125; // r0
cocos2d::CCArray *v126; // r0
cocos2d::CCMenu *v127; // r5
cocos2d::CCSprite *v128; // r0
cocos2d::CCSprite *v129; // r0
CCMenuItemSpriteExtra *v130; // r6
int j; // r8
cocos2d::CCLabelBMFont *v132; // r6
void (__fastcall *v133)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // r2
CCMenuItemSpriteExtra *v134; // r6
CCMenuItemSpriteExtra *v135; // r6
unsigned int k; // r6
cocos2d::CCArray *v137; // r0
CCMenuItemSpriteExtra *v138; // r0
cocos2d::CCSprite *v139; // r0
CCMenuItemSpriteExtra *v140; // r7
cocos2d::CCNode *v141; // r6
void (__fastcall *v142)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8
cocos2d::CCDirector *v143; // r0
float v144; // s16
cocos2d::CCDirector *v145; // r0
float v146; // r0
int m; // r6
GameLevelManager *v148; // r0
bool DiffVal; // r0
int n; // r6
GameLevelManager *v151; // r0
bool LenVal; // r0
GameLevelManager *v153; // r0
_BOOL4 BoolForKey; // r0
cocos2d::CCSprite *m_starsSprite; // r3
void (__fastcall *v156)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // r6
char v157; // r2
cocos2d::CCDictionary *m_difficultyDict; // r6
char *DiffKey; // r0
cocos2d::CCString *v160; // r0
_BOOL4 v161; // r6
void (__fastcall *demonFilterSelectClosed)(LevelSearchLayer *__hidden, int); // r5
GameLevelManager *v163; // r0
int IntForKey; // r0
float v166; // r2
float v167; // r3
cocos2d::CCNode *v168; // [sp+Ch] [bp-150h]
cocos2d::CCNode *v169; // [sp+Ch] [bp-150h]
CCMenuItemSpriteExtra *v170; // [sp+Ch] [bp-150h]
cocos2d::CCNode *v171; // [sp+Ch] [bp-150h]
char *v172; // [sp+10h] [bp-14Ch]
char *v173; // [sp+10h] [bp-14Ch]
CCMenuItemSpriteExtra *v174; // [sp+14h] [bp-148h]
CCMenuItemSpriteExtra *v175; // [sp+18h] [bp-144h]
CCMenuItemSpriteExtra *v176; // [sp+1Ch] [bp-140h]
CCMenuItemSpriteExtra *v177; // [sp+20h] [bp-13Ch]
_BOOL4 v178; // [sp+24h] [bp-138h]
void (__fastcall *v179)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+28h] [bp-134h]
const char *v180; // [sp+30h] [bp-12Ch] BYREF
char v181[4]; // [sp+34h] [bp-128h] BYREF
char v182; // [sp+38h] [bp-124h] BYREF
cocos2d::CCSize v183; // [sp+3Ch] [bp-120h] BYREF
cocos2d::CCPoint v184; // [sp+44h] [bp-118h] BYREF
cocos2d::CCPoint v185; // [sp+4Ch] [bp-110h] BYREF
cocos2d::CCSize v186; // [sp+54h] [bp-108h] BYREF
cocos2d::CCSize v187; // [sp+5Ch] [bp-100h] BYREF
cocos2d::CCPoint v188; // [sp+64h] [bp-F8h] BYREF
cocos2d::CCPoint v189; // [sp+6Ch] [bp-F0h] BYREF
cocos2d::CCPoint v190; // [sp+74h] [bp-E8h] BYREF
cocos2d::CCPoint v191; // [sp+7Ch] [bp-E0h] BYREF
cocos2d::CCPoint v192; // [sp+84h] [bp-D8h] BYREF
void (*v193)(LevelSearchLayer *, cocos2d::CCObject *); // [sp+8Ch] [bp-D0h]
int v194; // [sp+90h] [bp-CCh]
void (*v195)(LevelSearchLayer *, cocos2d::CCObject *); // [sp+94h] [bp-C8h]
int v196; // [sp+98h] [bp-C4h]
void (*v197)(LevelSearchLayer *, cocos2d::CCObject *); // [sp+9Ch] [bp-C0h]
int v198; // [sp+A0h] [bp-BCh]
void (*v199)(LevelSearchLayer *, cocos2d::CCObject *); // [sp+A4h] [bp-B8h]
int v200; // [sp+A8h] [bp-B4h]
void (*v201)(LevelSearchLayer *, cocos2d::CCObject *); // [sp+ACh] [bp-B0h]
int v202; // [sp+B0h] [bp-ACh]
void (*v203)(LevelSearchLayer *, cocos2d::CCObject *); // [sp+B4h] [bp-A8h]
int v204; // [sp+B8h] [bp-A4h]
void (*v205)(LevelSearchLayer *, cocos2d::CCObject *); // [sp+BCh] [bp-A0h]
int v206; // [sp+C0h] [bp-9Ch]
void (*v207)(LevelSearchLayer *, cocos2d::CCObject *); // [sp+C4h] [bp-98h]
int v208; // [sp+C8h] [bp-94h]
void (*v209)(LevelSearchLayer *, cocos2d::CCObject *); // [sp+CCh] [bp-90h]
int v210; // [sp+D0h] [bp-8Ch]
void (*v211)(LevelSearchLayer *, cocos2d::CCObject *); // [sp+D4h] [bp-88h]
int v212; // [sp+D8h] [bp-84h]
void (*v213)(LevelSearchLayer *, cocos2d::CCObject *); // [sp+DCh] [bp-80h]
int v214; // [sp+E0h] [bp-7Ch]
void (*v215)(LevelSearchLayer *, cocos2d::CCObject *); // [sp+E4h] [bp-78h]
int v216; // [sp+E8h] [bp-74h]
void (*v217)(LevelSearchLayer *, cocos2d::CCObject *); // [sp+ECh] [bp-70h]
int v218; // [sp+F0h] [bp-6Ch]
void (*v219)(LevelSearchLayer *, cocos2d::CCObject *); // [sp+F4h] [bp-68h]
int v220; // [sp+F8h] [bp-64h]
void (*v221)(LevelSearchLayer *, cocos2d::CCObject *); // [sp+FCh] [bp-60h]
int v222; // [sp+100h] [bp-5Ch]
void (*v223)(LevelSearchLayer *, cocos2d::CCObject *); // [sp+104h] [bp-58h]
int v224; // [sp+108h] [bp-54h]
void (*v225)(LevelSearchLayer *, cocos2d::CCObject *); // [sp+10Ch] [bp-50h]
int v226; // [sp+110h] [bp-4Ch]
void (*v227)(LevelSearchLayer *, cocos2d::CCObject *); // [sp+114h] [bp-48h]
int v228; // [sp+118h] [bp-44h]
int v229; // [sp+11Ch] [bp-40h]
int v230; // [sp+120h] [bp-3Ch]
cocos2d::CCPoint v231; // [sp+124h] [bp-38h] BYREF
cocos2d::CCPoint v232; // [sp+12Ch] [bp-30h] BYREF
cocos2d::CCRect v233; // [sp+134h] [bp-28h] BYREF
cocos2d::CCRect v234; // [sp+144h] [bp-18h] BYREF
cocos2d::CCSize v235; // 0:^0.8
cocos2d::CCRect v236; // 0:kr00_16.16
cocos2d::CCRect v237; // 0:r2.8,8:^0.8
cocos2d::CCRect v238; // 0:r2.8,8:^0.8
cocos2d::CCRect v239; // 0:r2.8,8:^0.8
cocos2d::CCRect v240; // 0:r2.8,8:^0.8
v178 = cocos2d::CCLayer::init(a1);
if ( v178 )
{
GameManager::sharedState()->m_currentLevelID = -1;
GameManager::sharedState()->m_sceneEnum = 4;
a1->m_type = a2;
v4 = GameManager::sharedState();
setKeypadEnabled = a1->setKeypadEnabled;
v4->m_levelSearchType = a2;
setKeypadEnabled(a1, 1);
a1->setKeyboardEnabled(a1, 1);
v6 = cocos2d::CCDictionary::create();
a1->m_difficultyDict = v6;
cocos2d::CCObject::retain(v6);
v7 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v183, v7);
v9 = (cocos2d::CCNode *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_gradientBG.png", v8);
setAnchorPoint = v9->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v234.origin, 0.0, 0.0);
setAnchorPoint(v9, &v234.origin);
a1->addChild_0(a1, v9, -3);
((void (__fastcall *)(cocos2d::CCNode *, _DWORD))v9->setScaleX)(v9, (float)(v183.width + 10.0) / v9[1].m_fSkewX);
((void (__fastcall *)(cocos2d::CCNode *, _DWORD))v9->setScaleY)(v9, (float)(v183.height + 10.0) / v9[1].m_fSkewY);
setPosition = v9->setPosition;
cocos2d::CCPoint::CCPoint(&v234.origin, -5.0, -5.0);
setPosition(v9, &v234.origin);
getTag = v9->__vftable[1].getTag;
BYTE2(v234.origin.x) = -1;
LOWORD(v234.origin.x) = 26112;
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))getTag)(v9, &v234);
v13 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png");
v14 = v13->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v234.origin, 0.0, 0.0);
v14(v13, &v234.origin);
v15 = v13->setPosition;
v16 = cocos2d::CCDirector::sharedDirector();
v17 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v16));
v18 = cocos2d::CCDirector::sharedDirector();
v19 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v18));
cocos2d::CCPoint::CCPoint(&v234.origin, v17 - 1.0, v19 - 1.0);
v15(v13, &v234.origin);
a1->addChild_0(a1, v13, 1);
v20 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png");
v21 = v20->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v234.origin, 1.0, 0.0);
v21(v20, &v234.origin);
v22 = v20->setPosition;
v23 = cocos2d::CCDirector::sharedDirector();
v24 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v23));
v25 = cocos2d::CCDirector::sharedDirector();
v26 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v25));
cocos2d::CCPoint::CCPoint(&v234.origin, v24 + 1.0, v26 - 1.0);
v22(v20, &v234.origin);
cocos2d::CCSprite::setFlipX(v20, 1);
a1->addChild_0(a1, v20, 1);
cocos2d::CCRect::CCRect(&v233, 0.0, 0.0, 80.0, 80.0);
v27 = cocos2d::CCMenu::create();
a1->addChild_0(a1, v27, 2);
v28 = cocos2d::CCDirector::sharedDirector();
v29 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v28));
v30 = cocos2d::CCDirector::sharedDirector();
v31 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v30));
cocos2d::CCPoint::CCPoint(&v184, v29 - 25.0, v31 - 25.0);
v32 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
((void (__fastcall *)(cocos2d::CCSprite *, int))v32->setScale)(v32, 1061997773);
v194 = 0;
v193 = LevelSearchLayer::confirmClearFilters;
v33 = CCMenuItemSpriteExtra::create(
v32,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelSearchLayer::confirmClearFilters, (unsigned int)a1));
v27->addChild(v27, v33);
v34 = v33->setPosition;
cocos2d::CCNode::convertToNodeSpace(&v234.origin, v27, &v184);
v34(v33, &v234.origin);
v35 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_plusBtn_001.png");
((void (__fastcall *)(cocos2d::CCSprite *, int))v35->setScale)(v35, 1061997773);
v196 = 0;
v195 = LevelSearchLayer::onMoreOptions;
v36 = CCMenuItemSpriteExtra::create(
v35,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelSearchLayer::onMoreOptions, (unsigned int)a1));
v27->addChild(v27, v36);
CCMenuItemSpriteExtra::setSizeMult(v36, 1.5);
if ( a1->m_type == 1 )
{
setColor = v35->setColor;
memset(&v234, 125, 3);
setColor(v35, (const cocos2d::ccColor3B *)&v234);
v36->setEnabled(v36, 0);
}
v38 = v36->setPosition;
v39 = (int)v33->getPosition(v33);
cocos2d::CCPoint::CCPoint(&v232, 0.0, -50.0);
cocos2d::CCPoint::operator+(&v234, v39, &v232);
v38(v36, &v234.origin);
if ( a1->m_type )
v40 = "GJ_viewLevelsBtn_001.png";
else
v40 = "GJ_viewListsBtn_001.png";
v41 = cocos2d::CCSprite::createWithSpriteFrameName(v40);
((void (__fastcall *)(cocos2d::CCSprite *, int))v41->setScale)(v41, 1061997773);
v235.width = 0.0;
v198 = 0;
v197 = LevelSearchLayer::onSearchMode;
v42 = CCMenuItemSpriteExtra::create(
v41,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelSearchLayer::onSearchMode, (unsigned int)a1));
v27->addChild(v27, v42);
v43 = v42->setPosition;
v44 = (int)v36->getPosition(v36);
cocos2d::CCPoint::CCPoint(&v232, 0.0, -50.0);
cocos2d::CCPoint::operator+(&v234, v44, &v232);
v43(v42, &v234.origin);
cocos2d::CCPoint::CCPoint(&v185, v183.width * 0.5, (float)(v183.height * 0.5) + 130.0);
cocos2d::CCRect::CCRect(&v234, &v233);
v236.origin.x = v166;
v236.origin.y = v167;
v236.size = v235;
v45 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create(
(cocos2d::extension::CCScale9Sprite *)"square02b_001.png",
(const char *)&v234,
v236);
((void (__fastcall *)(cocos2d::CCNode *, int))v45->__vftable[1].~CCNode_0)(v45, 255);
cocos2d::CCSize::CCSize(&v186, 365.0, 40.0);
v45->setContentSize(v45, &v186);
a1->addChild_0(a1, v45, -2);
v45->setPosition(v45, &v185);
v46 = v45->__vftable[1].getTag;
*(_WORD *)((char *)&v234.origin.x + 1) = -29384;
LOBYTE(v234.origin.x) = 0;
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))v46)(v45, &v234);
cocos2d::CCRect::CCRect(&v234, 0.0, 0.0, 40.0, 40.0);
v47 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create(
(cocos2d::extension::CCScale9Sprite *)"square02b_small.png",
(const char *)&v234,
v237);
((void (__fastcall *)(cocos2d::CCNode *, int))v47->__vftable[1].~CCNode_0)(v47, 255);
cocos2d::CCSize::CCSize(&v187, 210.0, 30.0);
v47->setContentSize(v47, &v187);
a1->addChild_0(a1, v47, -1);
v48 = v47->setPosition;
cocos2d::CCPoint::CCPoint(&v232, -73.0, 0.0);
cocos2d::CCPoint::operator+(&v234, &v185, &v232);
v48(v47, &v234.origin);
v49 = v47->__vftable[1].getTag;
*(_WORD *)((char *)&v234.origin.x + 1) = 25127;
LOBYTE(v234.origin.x) = 0;
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))v49)(v47, &v234);
if ( a1->m_type == 1 )
v50 = "Enter a list or id";
else
v50 = "Enter a level, user or id";
sub_776584((int)&v180, v50);
v51 = CCTextInputNode::create(194.0, 50.0, v180, "Thonburi");
v52 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_searchInput = v51;
((void (__fastcall *)(LevelSearchLayer *, CCTextInputNode *, int, void (__fastcall *)(cocos2d::CCNode *__hidden, cocos2d::CCNode *, int), int *, const char *))v52->addChild_0)(
a1,
v51,
20,
v52->addChild_0,
&dword_18,
"bigFont.fnt");
a1->m_searchInput->m_delegate = &a1->TextInputDelegate;
m_searchInput = a1->m_searchInput;
v54 = m_searchInput->setPosition;
cocos2d::CCPoint::CCPoint(&v232, -174.0, 0.0);
cocos2d::CCPoint::operator+(&v234, &v185, &v232);
v54(m_searchInput, &v234.origin);
m_textField = a1->m_searchInput->m_textField;
v56 = m_textField->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v234.origin, 0.0, 0.5);
v56(m_textField, &v234.origin);
m_textLabel = a1->m_searchInput->m_textLabel;
v58 = m_textLabel->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v234.origin, 0.0, 0.5);
v58(m_textLabel, &v234.origin);
CCTextInputNode::setMaxLabelScale(a1->m_searchInput, 0.7);
CCTextInputNode::setMaxLabelWidth(a1->m_searchInput, 194.0);
a1->m_searchInput->m_textField->setVisible(a1->m_searchInput->m_textField, 0);
v59 = a1->m_searchInput;
v59->m_maxLabelLength = 20;
sub_776584((int)v181, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
CCTextInputNode::setAllowedChars((int)v59, (int)v181);
sub_774008(v181);
LevelSearchLayer::updateSearchLabel(a1, v180);
v60 = cocos2d::CCMenu::create();
a1->addChild(a1, v60);
v61 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_longBtn06_001.png");
v200 = 0;
v199 = LevelSearchLayer::onSearch;
v62 = CCMenuItemSpriteExtra::create(
v61,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelSearchLayer::onSearch, (unsigned int)a1));
v60->addChild(v60, v62);
v168 = (cocos2d::CCNode *)v62->setPosition;
cocos2d::CCPoint::CCPoint(&v231, 63.0, 0.0);
cocos2d::CCPoint::operator+(&v232, &v185, &v231);
cocos2d::CCNode::convertToNodeSpace(&v234.origin, v60, &v232);
((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *))v168)(v62, &v234);
v63 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_longBtn05_001.png");
v202 = 0;
v201 = LevelSearchLayer::onSearchUser;
v64 = CCMenuItemSpriteExtra::create(
v63,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelSearchLayer::onSearchUser, (unsigned int)a1));
v60->addChild(v60, v64);
v169 = (cocos2d::CCNode *)v64->setPosition;
cocos2d::CCPoint::CCPoint(&v231, 110.0, 0.0);
cocos2d::CCPoint::operator+(&v232, &v185, &v231);
cocos2d::CCNode::convertToNodeSpace(&v234.origin, v60, &v232);
((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *))v169)(v64, &v234);
v65 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_longBtn07_001.png");
v238.size.width = 0.0;
v204 = 0;
v203 = LevelSearchLayer::onClearFreeSearch;
v66 = CCMenuItemSpriteExtra::create(
v65,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelSearchLayer::onClearFreeSearch, (unsigned int)a1));
v60->addChild(v60, v66);
v67 = v66->setPosition;
cocos2d::CCPoint::CCPoint(&v231, 157.0, 0.0);
cocos2d::CCPoint::operator+(&v232, &v185, &v231);
cocos2d::CCNode::convertToNodeSpace(&v234.origin, v60, &v232);
v67(v66, &v234.origin);
cocos2d::CCPoint::CCPoint(&v188, v183.width * 0.5, (float)(v183.height * 0.5) + 28.0);
v68 = cocos2d::CCLabelBMFont::create();
v69 = v68->setPosition;
cocos2d::CCPoint::CCPoint(&v232, 0.0, 69.5);
cocos2d::CCPoint::operator+(&v234, &v188, &v232);
v69(v68, &v234.origin);
a1->addChild(a1, v68);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v68->setScale)(v68, 1056964608);
cocos2d::CCRect::CCRect(&v234, &v233);
v70 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create(
(cocos2d::extension::CCScale9Sprite *)"square02b_001.png",
(const char *)&v234,
v238);
((void (__fastcall *)(cocos2d::CCNode *, int))v70->__vftable[1].~CCNode_0)(v70, 255);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v234, 365.0, 115.0);
cocos2d::CCSize::operator=(&v186, &v234);
v70->setContentSize(v70, &v186);
a1->addChild_0(a1, v70, -1);
v70->setPosition(v70, &v188);
v71 = v70->__vftable[1].getTag;
LOWORD(v234.origin.x) = 11776;
BYTE2(v234.origin.x) = 117;
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))v71)(v70, &v234);
v72 = cocos2d::CCMenu::create();
a1->addChild(a1, v72);
cocos2d::CCNode::convertToNodeSpace(&v189, v72, &v188);
v73 = SearchButton::create("GJ_longBtn04_001.png", "Downloads", 0.43, "GJ_sDownloadIcon_001.png");
v206 = 0;
v205 = LevelSearchLayer::onMostDownloaded;
v74 = CCMenuItemSpriteExtra::create(
v73,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelSearchLayer::onMostDownloaded, (unsigned int)a1));
v72->addChild(v72, v74);
v75 = SearchButton::create("GJ_longBtn04_001.png", "Likes", 0.5, "GJ_sLikeIcon_001.png");
v208 = 0;
v207 = LevelSearchLayer::onMostLikes;
v170 = CCMenuItemSpriteExtra::create(
v75,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelSearchLayer::onMostLikes, (unsigned int)a1));
v72->addChild(v72, v170);
v77 = SearchButton::create("GJ_longBtn04_001.png", "Sent", 0.5, "GJ_sModIcon_001.png");
m_icon = v77->m_icon;
v172 = (char *)m_icon->setPosition;
v78 = (int)m_icon->getPosition(m_icon);
cocos2d::CCPoint::CCPoint(&v232, 0.0, 0.5);
cocos2d::CCPoint::operator+(&v234, v78, &v232);
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCRect *))v172)(m_icon, &v234);
v210 = 0;
v209 = LevelSearchLayer::onSuggested;
v79 = CCMenuItemSpriteExtra::create(
v77,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelSearchLayer::onSuggested, (unsigned int)a1));
v72->addChild(v72, v79);
v80 = SearchButton::create("GJ_longBtn04_001.png", "Trending", 0.5, "GJ_sTrendingIcon_001.png");
v212 = 0;
v211 = LevelSearchLayer::onTrending;
v173 = (char *)CCMenuItemSpriteExtra::create(
v80,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelSearchLayer::onTrending, (unsigned int)a1));
v72->addChild(v72, (cocos2d::CCNode *)v173);
v81 = SearchButton::create("GJ_longBtn04_001.png", "Recent", 0.5, "GJ_sRecentIcon_001.png");
v214 = 0;
v213 = LevelSearchLayer::onMostRecent;
v174 = CCMenuItemSpriteExtra::create(
v81,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelSearchLayer::onMostRecent, (unsigned int)a1));
v72->addChild(v72, v174);
v82 = SearchButton::create("GJ_longBtn04_001.png", "Magic", 0.5, "GJ_sMagicIcon_001.png");
v216 = 0;
v215 = LevelSearchLayer::onMagic;
v175 = CCMenuItemSpriteExtra::create(
v82,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelSearchLayer::onMagic, (unsigned int)a1));
v72->addChild(v72, v175);
v83 = SearchButton::create("GJ_longBtn04_001.png", "Awarded", 0.5, "GJ_sStarsIcon_001.png");
v218 = 0;
v217 = LevelSearchLayer::onLatestStars;
v176 = CCMenuItemSpriteExtra::create(
v83,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelSearchLayer::onLatestStars, (unsigned int)a1));
v72->addChild(v72, v176);
v84 = SearchButton::create("GJ_longBtn04_001.png", "Followed", 0.5, "GJ_sFollowedIcon_001.png");
v220 = 0;
v219 = LevelSearchLayer::onFollowed;
v177 = CCMenuItemSpriteExtra::create(
v84,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelSearchLayer::onFollowed, (unsigned int)a1));
v72->addChild(v72, v177);
v85 = SearchButton::create("GJ_longBtn04_001.png", "Friends", 0.5, "GJ_sFriendsIcon_001.png");
v239.size.width = 0.0;
v222 = 0;
v221 = LevelSearchLayer::onFriends;
v86 = CCMenuItemSpriteExtra::create(
v85,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelSearchLayer::onFriends, (unsigned int)a1));
v72->addChild(v72, v86);
v179 = v74->setPosition;
cocos2d::CCPoint::CCPoint(&v232, -119.0, 36.0);
cocos2d::CCPoint::operator+(&v234, &v189, &v232);
v179(v74, &v234.origin);
v87 = v170->setPosition;
cocos2d::CCPoint::CCPoint(&v232, 0.0, 36.0);
cocos2d::CCPoint::operator+(&v234, &v189, &v232);
v87(v170, &v234.origin);
v88 = v79->setPosition;
cocos2d::CCPoint::CCPoint(&v232, 119.0, 36.0);
cocos2d::CCPoint::operator+(&v234, &v189, &v232);
v88(v79, &v234.origin);
v89 = *(void (__fastcall **)(char *, cocos2d::CCRect *))(*(_DWORD *)v173 + 92);
cocos2d::CCPoint::CCPoint(&v232, -119.0, 0.0);
cocos2d::CCPoint::operator+(&v234, &v189, &v232);
v89(v173, &v234);
v90 = v174->setPosition;
cocos2d::CCPoint::CCPoint(&v232, 0.0, 0.0);
cocos2d::CCPoint::operator+(&v234, &v189, &v232);
v90(v174, &v234.origin);
v91 = v175->setPosition;
cocos2d::CCPoint::CCPoint(&v232, 119.0, 0.0);
cocos2d::CCPoint::operator+(&v234, &v189, &v232);
v91(v175, &v234.origin);
v92 = v176->setPosition;
cocos2d::CCPoint::CCPoint(&v232, -119.0, -36.0);
cocos2d::CCPoint::operator+(&v234, &v189, &v232);
v92(v176, &v234.origin);
v93 = v177->setPosition;
cocos2d::CCPoint::CCPoint(&v232, 0.0, -36.0);
cocos2d::CCPoint::operator+(&v234, &v189, &v232);
v93(v177, &v234.origin);
v94 = v86->setPosition;
cocos2d::CCPoint::CCPoint(&v232, 119.0, -36.0);
cocos2d::CCPoint::operator+(&v234, &v189, &v232);
v94(v86, &v234.origin);
v95 = GJAccountManager::sharedState();
if ( v95->m_accountID - 2795 == v95->m_unkInt1 )
{
v96 = SearchButton::create("GJ_longBtn04_001.png", "Star Award", 0.5, "GJ_sMagicIcon_001.png");
v239.size.width = 0.0;
v224 = 0;
v223 = LevelSearchLayer::onStarAward;
v97 = CCMenuItemSpriteExtra::create(
v96,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelSearchLayer::onStarAward, (unsigned int)a1));
v72->addChild(v72, v97);
v98 = v97->setPosition;
cocos2d::CCPoint::CCPoint(&v232, 0.0, -76.0);
cocos2d::CCPoint::operator+(&v234, &v189, &v232);
v98(v97, &v234.origin);
}
cocos2d::CCPoint::CCPoint(&v190, v183.width * 0.5, (float)(v183.height * 0.5) - 77.0);
v99 = cocos2d::CCLabelBMFont::create();
v100 = v99->setPosition;
cocos2d::CCPoint::CCPoint(&v232, 0.0, 37.0);
cocos2d::CCPoint::operator+(&v234, &v190, &v232);
v100(v99, &v234.origin);
a1->addChild(a1, v99);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v99->setScale)(v99, 1056964608);
cocos2d::CCRect::CCRect(&v234, &v233);
v101 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create(
(cocos2d::extension::CCScale9Sprite *)"square02b_001.png",
(const char *)&v234,
v239);
((void (__fastcall *)(cocos2d::CCNode *, int))v101->__vftable[1].~CCNode_0)(v101, 255);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v234, 365.0, 50.0);
cocos2d::CCSize::operator=(&v186, &v234);
v101->setContentSize(v101, &v186);
a1->addChild_0(a1, v101, -1);
v101->setPosition(v101, &v190);
v102 = v101->__vftable[1].getTag;
LOWORD(v234.origin.x) = 9216;
BYTE2(v234.origin.x) = 91;
v103 = (cocos2d::CCArray *)((int (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))v102)(v101, &v234);
v104 = (cocos2d::CCArray *)cocos2d::CCArray::create(v103);
a1->m_difficultySprites = v104;
cocos2d::CCObject::retain(v104);
v106 = (cocos2d::CCArray *)cocos2d::CCArray::create(v105);
v107 = cocos2d::CCMenu::create();
a1->addChild_0(a1, v107, 10);
v108 = nullptr;
do
{
v109 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"difficulty_%02d_btn_001.png",
v108);
CString = cocos2d::CCString::getCString(v109);
v111 = "difficulty_auto_btn_001.png";
if ( v108 != &byte_7 )
v111 = CString;
v112 = cocos2d::CCSprite::createWithSpriteFrameName(v111);
v113 = v112->setColor;
memset(&v234, 125, 3);
v113(v112, (const cocos2d::ccColor3B *)&v234);
cocos2d::CCArray::addObject(a1->m_difficultySprites, v112);
((void (__fastcall *)(cocos2d::CCSprite *, int))v112->setScale)(v112, 1061997773);
v226 = 0;
v225 = LevelSearchLayer::toggleDifficulty;
v114 = CCMenuItemSpriteExtra::create(
v112,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelSearchLayer::toggleDifficulty, (unsigned int)a1));
v114->setTag(v114, (int)v108);
v107->addChild(v107, v114);
cocos2d::CCArray::addObject(v106, v114);
if ( v108++ == &byte_6 )
a1->m_lastDifficultySprite = v112;
}
while ( v108 != byte_8 );
cocos2d::CCNode::convertToNodeSpace(&v234.origin, v107, &v190);
GameToolbox::alignItemsHorisontally(v106, 18.0, (cocos2d::CCPoint)(unsigned int)&v234, 0);
for ( i = 0; i < v107->getChildrenCount(v107); ++i )
{
v117 = v107->getChildren(v107);
v118 = (CCMenuItemSpriteExtra *)cocos2d::CCArray::objectAtIndex(v117, i);
CCMenuItemSpriteExtra::setSizeMult(v118, 1.5);
}
v119 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_plus2Btn_001.png");
v240.size.width = 0.0;
v228 = 0;
v227 = LevelSearchLayer::onSpecialDemon;
v120 = CCMenuItemSpriteExtra::create(
v119,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelSearchLayer::onSpecialDemon, (unsigned int)a1));
v121 = v107->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_demonTypeButton = v120;
v121->addChild(v107, v120);
m_demonTypeButton = a1->m_demonTypeButton;
v171 = (cocos2d::CCNode *)m_demonTypeButton->setPosition;
cocos2d::CCNode::convertToNodeSpace(&v231, v107, &v190);
cocos2d::CCPoint::CCPoint(&v232, 202.5, 0.0);
cocos2d::CCPoint::operator+(&v234, &v231, &v232);
((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *))v171)(m_demonTypeButton, &v234);
cocos2d::CCPoint::CCPoint(&v191, v183.width * 0.5, (float)(v183.height * 0.5) - 128.0);
cocos2d::CCRect::CCRect(&v234, &v233);
v123 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create(
(cocos2d::extension::CCScale9Sprite *)"square02b_001.png",
(const char *)&v234,
v240);
((void (__fastcall *)(cocos2d::CCNode *, int))v123->__vftable[1].~CCNode_0)(v123, 255);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v234, 365.0, 35.0);
cocos2d::CCSize::operator=(&v186, &v234);
v123->setContentSize(v123, &v186);
a1->addChild_0(a1, v123, -1);
v123->setPosition(v123, &v191);
v124 = v123->__vftable[1].getTag;
LOWORD(v234.origin.x) = 7936;
BYTE2(v234.origin.x) = 79;
v125 = (cocos2d::CCArray *)((int (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))v124)(v123, &v234);
v126 = (cocos2d::CCArray *)cocos2d::CCArray::create(v125);
a1->m_lengthSprites = v126;
cocos2d::CCObject::retain(v126);
cocos2d::CCArray::removeAllObjects(v106);
v127 = cocos2d::CCMenu::create();
a1->addChild_0(a1, v127, 10);
if ( !a1->m_type )
{
v129 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_timeIcon_001.png");
v229 = 0;
v230 = 0;
v130 = CCMenuItemSpriteExtra::create(v129, nullptr, 0);
v127->addChild(v127, v130);
v130->setEnabled(v130, 0);
cocos2d::CCArray::addObject(v106, v130);
for ( j = 0; j != 6; ++j )
{
GJGameLevel::lengthKeyToString((GJGameLevel *)&v182, j);
v132 = cocos2d::CCLabelBMFont::create();
sub_774008(&v182);
v133 = v132->setColor;
memset(&v234, 125, 3);
v133(v132, (const cocos2d::ccColor3B *)&v234);
cocos2d::CCArray::addObject(a1->m_lengthSprites, v132);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v132->setScale)(v132, 1054280253);
v231.y = 0.0;
LODWORD(v231.x) = LevelSearchLayer::toggleTime;
v134 = CCMenuItemSpriteExtra::create(
v132,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelSearchLayer::toggleTime, (unsigned int)a1));
v134->setTag(v134, j);
v127->addChild(v127, v134);
cocos2d::CCArray::addObject(v106, v134);
}
}
v128 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_starsIcon_001.png");
a1->m_starsSprite = v128;
v232.y = 0.0;
LODWORD(v232.x) = LevelSearchLayer::toggleStar;
v135 = CCMenuItemSpriteExtra::create(
v128,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelSearchLayer::toggleStar, (unsigned int)a1));
v127->addChild(v127, v135);
cocos2d::CCArray::addObject(v106, v135);
cocos2d::CCNode::convertToNodeSpace(&v234.origin, v127, &v191);
GameToolbox::alignItemsHorisontally(v106, 12.0, (cocos2d::CCPoint)(unsigned int)&v234, 0);
for ( k = 0; k < v127->getChildrenCount(v127); ++k )
{
v137 = v127->getChildren(v127);
v138 = (CCMenuItemSpriteExtra *)cocos2d::CCArray::objectAtIndex(v137, k);
CCMenuItemSpriteExtra::setSizeMult(v138, 1.3);
}
v139 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
v234.origin.y = 0.0;
LODWORD(v234.origin.x) = LevelSearchLayer::onBack;
v140 = CCMenuItemSpriteExtra::create(
v139,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelSearchLayer::onBack, (unsigned int)a1));
CCMenuItemSpriteExtra::setSizeMult(v140, 1.5);
v141 = (cocos2d::CCNode *)cocos2d::CCMenu::create((cocos2d::CCMenu *)v140, nullptr);
a1->addChild_0(a1, v141, 1);
v142 = v141->setPosition;
v143 = cocos2d::CCDirector::sharedDirector();
v144 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v143)) + 24.0;
v145 = cocos2d::CCDirector::sharedDirector();
v146 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v145));
cocos2d::CCPoint::CCPoint(&v192, v144, v146 - 23.0);
v142(v141, &v192);
if ( PlatformToolbox::isControllerConnected() )
GameToolbox::addBackButton(a1, v140);
for ( m = 0; m != 8; ++m )
{
v148 = GameLevelManager::sharedState();
DiffVal = GameLevelManager::getDiffVal(v148, m);
LevelSearchLayer::toggleDifficultyNum(a1, m, DiffVal);
}
for ( n = 0; n != 6; ++n )
{
v151 = GameLevelManager::sharedState();
LenVal = GameLevelManager::getLenVal(v151, n);
LevelSearchLayer::toggleTimeNum(a1, n, LenVal);
}
v153 = GameLevelManager::sharedState();
BoolForKey = GameLevelManager::getBoolForKey(v153, "star_filter");
m_starsSprite = a1->m_starsSprite;
v156 = m_starsSprite->setColor;
if ( BoolForKey )
v157 = -1;
else
v157 = 125;
LOBYTE(v192.x) = v157;
BYTE1(v192.x) = v157;
BYTE2(v192.x) = v157;
v156(m_starsSprite, (const cocos2d::ccColor3B *)&v192);
m_difficultyDict = a1->m_difficultyDict;
DiffKey = (char *)LevelSearchLayer::getDiffKey(a1, 6);
sub_776584((int)&v192, DiffKey);
v160 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(m_difficultyDict, (const std::string *)&v192);
v161 = cocos2d::CCString::boolValue(v160);
sub_774008(&v192);
a1->m_demonTypeButton->setEnabled(a1->m_demonTypeButton, v161);
a1->m_demonTypeButton->setVisible(a1->m_demonTypeButton, v161);
demonFilterSelectClosed = a1->demonFilterSelectClosed;
v163 = GameLevelManager::sharedState();
IntForKey = GameLevelManager::getIntForKey(v163, "demon_filter");
demonFilterSelectClosed(a1, IntForKey);
sub_774008(&v180);
}
return v178;
}