//
// SecretLayer2::init from 0x100309760 to 0x10030a430 (3280 bytes)
//
// 1 xrefs:
// > ??> @ 0x1007ed6c8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
bool __fastcall SecretLayer2::init(SecretLayer2 *a1)
{
_BOOL4 v2; // w19
cocos2d::CCTextureCache *v3; // x0
cocos2d::CCSpriteFrameCache *v4; // x0
GameManager *v5; // x21
cocos2d::CCDirector *v6; // x0
cocos2d::CCDictionary *v7; // x0
AchievementManager *v8; // x0
cocos2d::CCDictionary *m_messageThreads; // x21
cocos2d::CCNode *v10; // x22
AchievementManager *v11; // x0
AchievementManager *v12; // x0
cocos2d::CCDictionary *v13; // x21
cocos2d::CCNode *v14; // x22
AchievementManager *v15; // x0
cocos2d::CCDictionary *v16; // x21
cocos2d::CCNode *v17; // x22
AchievementManager *v18; // x0
cocos2d::CCDictionary *v19; // x21
cocos2d::CCNode *v20; // x22
AchievementManager *v21; // x0
cocos2d::CCDictionary *v22; // x21
cocos2d::CCNode *v23; // x22
AchievementManager *v24; // x0
cocos2d::CCDictionary *v25; // x21
cocos2d::CCNode *v26; // x22
AchievementManager *v27; // x0
cocos2d::CCDictionary *v28; // x21
cocos2d::CCNode *v29; // x22
GameManager *v30; // x0
cocos2d::CCDictionary *v31; // x21
cocos2d::CCNode *v32; // x22
cocos2d::CCSprite *v33; // x21
__n128 v34; // q0
__n128 v35; // q1
__n128 v36; // q0
__n128 v37; // q1
cocos2d::CCLabelBMFont *v38; // x21
__n128 v39; // q0
__n128 v40; // q1
__n128 v41; // q0
__n128 v42; // q1
cocos2d::CCLabelBMFont *v43; // x0
__n128 v44; // q0
cocos2d::CCLabelBMFont *m_messageLabel; // x21
__n128 v46; // q1
double v47; // d0
double v48; // d0
cocos2d::extension::CCScale9Sprite *v49; // x21
CCTextInputNode *v50; // x0
CCTextInputNode *m_searchInput; // x0
CCTextInputNode *v52; // x21
cocos2d::CCSprite *v53; // x0
CCMenuItemSpriteExtra *v54; // x22
__int64 v55; // x1
__int64 v56; // x2
__int64 v57; // x3
__int64 v58; // x4
__int64 v59; // x5
__int64 v60; // x6
__int64 v61; // x7
cocos2d::CCMenu *v62; // x21
cocos2d::CCDirector *v63; // x0
float v64; // s9
cocos2d::CCDirector *v65; // x0
__n128 v66; // q1
__n128 v67; // q0
cocos2d::CCSprite *v68; // x22
cocos2d::CCSprite *v69; // x23
CCMenuItemSpriteExtra *v70; // x0
__n128 v71; // q0
CCMenuItemSpriteExtra *m_submitButton; // x22
__n128 v73; // q1
GameManager *v74; // x0
const char *v75; // x0
cocos2d::CCSprite *v76; // x0
CCMenuItemSpriteExtra *v77; // x0
__n128 v78; // q0
CCMenuItemSpriteExtra *m_secretDoorButton; // x22
__n128 v80; // q1
cocos2d::CCArray *v81; // x0
cocos2d::CCSprite *v82; // x22
CCMenuItemSpriteExtra *v83; // x0
float v84; // s9
AppDelegate *v85; // x0
__n128 v86; // q1
__n128 v87; // q0
CCMenuItemSpriteExtra *m_secretLevelButton; // x22
cocos2d::CCLabelBMFont *v89; // x21
__n128 v90; // q0
__n128 v91; // q1
double v92; // d0
cocos2d::CCLabelBMFont *v93; // x22
float32x2_t *v94; // x21
__n128 v95; // q0
__n128 v96; // q1
double v97; // d0
GameStatsManager *v98; // x0
__n128 v99; // q0
__n128 v100; // q1
cocos2d::CCSprite *v101; // x21
__n128 v102; // q0
__n128 v103; // q1
double v104; // d0
cocos2d::CCString *v105; // x0
const char *CString; // x0
cocos2d::CCLabelBMFont *v107; // x21
__n128 v108; // q0
__n128 v109; // q1
double v110; // d0
GameManager *v111; // x0
unsigned int v112; // w21
__int64 v113; // x0
GameManager *v114; // x0
GameLevelManager *v115; // x0
GJGameLevel *MainLevel; // x0
cocos2d::CCDelayTime *v117; // x21
char v118; // w0
__int64 v119; // x1
__int64 v120; // x2
__int64 v121; // x3
__int64 v122; // x4
__int64 v123; // x5
__int64 v124; // x6
__int64 v125; // x7
cocos2d::CCSequence *v126; // x0
float v128; // s1
float v129; // s2
float v130; // s3
float32x2_t v131; // [xsp+18h] [xbp-D8h] BYREF
float32x2_t v132; // [xsp+20h] [xbp-D0h] BYREF
float32x2_t v133; // [xsp+28h] [xbp-C8h] BYREF
std::string v134; // [xsp+30h] [xbp-C0h] BYREF
float32x2_t v135[2]; // [xsp+48h] [xbp-A8h] BYREF
void *__p[2]; // [xsp+58h] [xbp-98h] BYREF
char v137; // [xsp+6Fh] [xbp-81h]
float32x2_t v138; // [xsp+70h] [xbp-80h] BYREF
float32x2_t v139; // [xsp+78h] [xbp-78h] BYREF
float v140[4]; // [xsp+80h] [xbp-70h] BYREF
float v141; // [xsp+90h] [xbp-60h]
float v142; // [xsp+94h] [xbp-5Ch]
void *v143[2]; // [xsp+98h] [xbp-58h] BYREF
char v144; // [xsp+AFh] [xbp-41h]
cocos2d::CCPoint v145; // 0:kr08_8.8
cocos2d::CCPoint v146; // 0:kr10_8.8
cocos2d::CCPoint v147; // 0:kr18_8.8
cocos2d::CCPoint v148; // 0:kr20_8.8
cocos2d::SEL_CallFunc v149; // 0:x1.16
cocos2d::SEL_MenuHandler v150; // 0:x3.16
cocos2d::SEL_MenuHandler v151; // 0:x3.16
cocos2d::SEL_MenuHandler v152; // 0:x3.16
cocos2d::SEL_MenuHandler v153; // 0:x3.16
cocos2d::CCRect v154; // 0:kr30_16.16
v2 = cocos2d::CCLayer::init(a1);
if ( v2 )
{
v3 = cocos2d::CCTextureCache::sharedTextureCache();
cocos2d::CCTextureCache::addImage(v3, "SecretSheet.png", 0);
v4 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile(v4, "SecretSheet.plist");
v5 = GameManager::sharedState();
sub_100009900(v143, "secretLoop02.mp3");
GameManager::fadeInMusic(v5, v143);
if ( v144 < 0 )
operator delete(v143[0]);
((void (__fastcall *)(SecretLayer2 *, __int64))a1->setKeypadEnabled)(a1, 1);
((void (__fastcall *)(SecretLayer2 *, __int64))a1->setKeyboardEnabled)(a1, 1);
v6 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v6);
v7 = cocos2d::CCDictionary::create();
a1->m_messageThreads = v7;
cocos2d::CCObject::retain(v7);
v8 = AchievementManager::sharedState();
if ( !AchievementManager::isAchievementEarned(v8, "geometry.ach.v2.secret01") )
{
m_messageThreads = a1->m_messageThreads;
v10 = cocos2d::CCNode::create();
((void (__fastcall *)(cocos2d::CCNode *, __int64))v10->setTag)(v10, 1);
cocos2d::CCDictionary::setObject(m_messageThreads, v10, 1);
}
v11 = AchievementManager::sharedState();
if ( AchievementManager::isAchievementEarned(v11, "geometry.ach.secret06") )
{
v12 = AchievementManager::sharedState();
if ( !AchievementManager::isAchievementEarned(v12, "geometry.ach.v2.secret03") )
{
v13 = a1->m_messageThreads;
v14 = cocos2d::CCNode::create();
((void (__fastcall *)(cocos2d::CCNode *, __int64))v14->setTag)(v14, 3);
cocos2d::CCDictionary::setObject(v13, v14, 3);
}
}
v15 = AchievementManager::sharedState();
if ( !AchievementManager::isAchievementEarned(v15, "geometry.ach.v2.secret05") )
{
v16 = a1->m_messageThreads;
v17 = cocos2d::CCNode::create();
((void (__fastcall *)(cocos2d::CCNode *, __int64))v17->setTag)(v17, 5);
cocos2d::CCDictionary::setObject(v16, v17, 5);
}
v18 = AchievementManager::sharedState();
if ( !AchievementManager::isAchievementEarned(v18, "geometry.ach.v2.secret06") )
{
v19 = a1->m_messageThreads;
v20 = cocos2d::CCNode::create();
((void (__fastcall *)(cocos2d::CCNode *, __int64))v20->setTag)(v20, 6);
cocos2d::CCDictionary::setObject(v19, v20, 6);
}
v21 = AchievementManager::sharedState();
if ( !AchievementManager::isAchievementEarned(v21, "geometry.ach.v2.secret08") )
{
v22 = a1->m_messageThreads;
v23 = cocos2d::CCNode::create();
((void (__fastcall *)(cocos2d::CCNode *, __int64))v23->setTag)(v23, 8);
cocos2d::CCDictionary::setObject(v22, v23, 8);
}
v24 = AchievementManager::sharedState();
if ( !AchievementManager::isAchievementEarned(v24, "geometry.ach.v2.secret09") )
{
v25 = a1->m_messageThreads;
v26 = cocos2d::CCNode::create();
((void (__fastcall *)(cocos2d::CCNode *, __int64))v26->setTag)(v26, 9);
cocos2d::CCDictionary::setObject(v25, v26, 9);
}
v27 = AchievementManager::sharedState();
if ( !AchievementManager::isAchievementEarned(v27, "geometry.ach.v2.secret10") )
{
v28 = a1->m_messageThreads;
v29 = cocos2d::CCNode::create();
((void (__fastcall *)(cocos2d::CCNode *, __int64))v29->setTag)(v29, 10);
cocos2d::CCDictionary::setObject(v28, v29, 10);
}
v30 = GameManager::sharedState();
if ( !GameManager::getUGV(v30, "1") )
{
v31 = a1->m_messageThreads;
v32 = cocos2d::CCNode::create();
((void (__fastcall *)(cocos2d::CCNode *, __int64))v32->setTag)(v32, 20);
cocos2d::CCDictionary::setObject(v31, v32, 20);
}
v33 = cocos2d::CCSprite::create("GJ_gradientBG.png");
v34.n128_u32[0] = 0;
v35.n128_u32[0] = 0;
sub_100022980(v34, v35, v140);
((void (__fastcall *)(cocos2d::CCSprite *, float *))v33->setAnchorPoint)(v33, v140);
((void (__fastcall *)(SecretLayer2 *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v33, 4294967293LL);
((void (__fastcall *)(cocos2d::CCSprite *, float))v33->setScaleX)(
v33,
(float)(v141 + 10.0) / v33->m_obRect.size.width);
v36 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, float))v33->setScaleY)(
v33,
(float)(v142 + 10.0) / v33->m_obRect.size.height);
v36.n128_u32[0] = -5.0;
v37.n128_u32[0] = -5.0;
sub_100022980(v36, v37, v140);
((void (__fastcall *)(cocos2d::CCSprite *, float *))v33->setPosition)(v33, v140);
BYTE2(v140[0]) = 100;
LOWORD(v140[0]) = 75;
((void (__fastcall *)(cocos2d::CCSprite *, float *))v33->setColor)(v33, v140);
sub_100022990(v140, 0.0, 0.0, 40.0, 40.0);
v38 = cocos2d::CCLabelBMFont::create_1("Vault of Secrets", "goldFont.fnt");
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v38->setScale)(v38, 1.0);
v39 = ((__n128 (__fastcall *)(SecretLayer2 *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, v38);
v39.n128_f32[0] = v141 * 0.5;
v40.n128_f32[0] = v142 + -24.0;
sub_100022980(v39, v40, v135);
v41 = ((__n128 (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *))v38->setPosition)(v38, v135);
v41.n128_f32[0] = v141 * 0.5;
v42.n128_f32[0] = (float)(v142 * 0.5) + 50.0;
sub_100022980(v41, v42, &v139);
v43 = cocos2d::CCLabelBMFont::create_1(" ", "bigFont.fnt");
a1->m_messageLabel = v43;
v44 = ((__n128 (__fastcall *)(SecretLayer2 *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, v43);
m_messageLabel = a1->m_messageLabel;
v46.n128_u32[0] = 1110179840;
v44.n128_u32[0] = 0;
sub_100022980(v44, v46, &v138);
*(float32x2_t *)&v47 = sub_1000229DC(&v139, &v138, v135);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *, double))m_messageLabel->setPosition)(
m_messageLabel,
v135,
v47);
SecretLayer2::getMessage(__p, a1);
SecretLayer2::updateMessageLabel(a1, __p);
if ( v137 < 0 )
operator delete(__p[0]);
v48 = sub_100022B98(v135, (__int64)v140);
v154.origin.x = *(float *)&v48;
v154.origin.y = v128;
v154.size.width = v129;
v154.size.height = v130;
v49 = cocos2d::extension::CCScale9Sprite::create("square02b_small.png", v154);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int64))v49->setOpacity)(v49, 100);
sub_100022988((float *)v135, 200.0, 40.0);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, float32x2_t *))v49->setContentSize)(v49, v135);
((void (__fastcall *)(SecretLayer2 *, cocos2d::extension::CCScale9Sprite *, __int64))a1->addChild_0)(
a1,
v49,
4294967294LL);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, float32x2_t *))v49->setPosition)(v49, &v139);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, void *))v49->setColor)(v49, &unk_100644E45);
v50 = CCTextInputNode::create(180.0, 50.0, "...", "Thonburi", 24, "bigFont.fnt");
a1->m_searchInput = v50;
((void (__fastcall *)(SecretLayer2 *, CCTextInputNode *, __int64))a1->addChild_0)(a1, v50, 20);
m_searchInput = a1->m_searchInput;
m_searchInput->m_delegate = &a1->TextInputDelegate;
((void (__fastcall *)(CCTextInputNode *, float32x2_t *))m_searchInput->setPosition)(m_searchInput, &v139);
CCTextInputNode::setMaxLabelScale(a1->m_searchInput, 0.7);
CCTextInputNode::setMaxLabelWidth(a1->m_searchInput, 180.0);
((void (__fastcall *)(cocos2d::CCTextFieldTTF *, _QWORD))a1->m_searchInput->m_textField->setVisible)(
a1->m_searchInput->m_textField,
0);
v52 = a1->m_searchInput;
v52->m_maxLabelLength = 100;
sub_100009900(
&v134,
" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,-!?:;)(/\\\"'`*=+-_%[]<>|@&^#{}%$~");
CCTextInputNode::setAllowedChars((std::string *)v52, &v134);
if ( SHIBYTE(v134.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v134.__r_.__value_.__l.__data_);
SecretLayer2::updateSearchLabel(a1, "");
v53 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
v150.ptr = (void (__cdecl *)(cocos2d::CCObject *))SecretLayer2::onBack;
v150.adj = 0;
v54 = CCMenuItemSpriteExtra::create(v53, nullptr, a1, v150);
CCMenuItemSpriteExtra::setSizeMult(v54, 1.5);
v62 = sub_1001D7ED0(v54, v55, v56, v57, v58, v59, v60, v61, 0);
((void (__fastcall *)(SecretLayer2 *, cocos2d::CCMenu *, __int64))a1->addChild_0)(a1, v62, 1);
v63 = cocos2d::CCDirector::sharedDirector();
v64 = sub_1001768D8((__int64)v63) + 24.0;
v65 = cocos2d::CCDirector::sharedDirector();
v66.n128_f32[0] = sub_1001768C8((__int64)v65) + -23.0;
v67.n128_f32[0] = v64;
sub_100022980(v67, v66, &v138);
((void (__fastcall *)(cocos2d::CCMenu *, float32x2_t *))v62->setPosition)(v62, &v138);
if ( PlatformToolbox::isControllerConnected() )
GameToolbox::addBackButton(a1, v54);
v68 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_secretLock2_001.png");
v69 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_secretLock2_2_001.png");
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *, __int64))v68->addChild_0)(v68, v69, 0xFFFFFFFFLL);
v145 = cocos2d::CCNode::convertToNodeSpace(v68, &stru_10086DFA0);
((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *, float, float))v69->setPosition)(
v69,
&v138,
v145.x,
v145.y);
v151.ptr = (void (__cdecl *)(cocos2d::CCObject *))SecretLayer2::onSubmit;
v151.adj = 0;
v70 = CCMenuItemSpriteExtra::create(v68, nullptr, a1, v151);
a1->m_submitButton = v70;
v71 = ((__n128 (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v62->addChild)(v62, v70);
m_submitButton = a1->m_submitButton;
v71.n128_f32[0] = v141 * 0.5;
v73.n128_f32[0] = (float)(v142 * 0.5) + -20.0;
sub_100022980(v71, v73, &v133);
v146 = cocos2d::CCNode::convertToNodeSpace(v62, (const cocos2d::CCPoint *)&v133);
((void (__fastcall *)(CCMenuItemSpriteExtra *, float32x2_t *, float, float))m_submitButton->setPosition)(
m_submitButton,
&v138,
v146.x,
v146.y);
CCMenuItemSpriteExtra::setSizeMult(a1->m_submitButton, 0.7);
v74 = GameManager::sharedState();
if ( GameManager::getUGV(v74, "4") )
v75 = "secretDoor_open_001.png";
else
v75 = "secretDoor_closed_001.png";
v76 = cocos2d::CCSprite::createWithSpriteFrameName(v75);
v152.ptr = (void (__cdecl *)(cocos2d::CCObject *))SecretLayer2::onDoor;
v152.adj = 0;
v77 = CCMenuItemSpriteExtra::create(v76, nullptr, a1, v152);
a1->m_secretDoorButton = v77;
*(_WORD *)&v77->m_animationEnabled = 256;
v78 = ((__n128 (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v62->addChild)(v62, v77);
m_secretDoorButton = a1->m_secretDoorButton;
v78.n128_f32[0] = v141 + -45.0;
v80.n128_u32[0] = 1110704128;
sub_100022980(v78, v80, &v133);
v147 = cocos2d::CCNode::convertToNodeSpace(v62, (const cocos2d::CCPoint *)&v133);
((void (__fastcall *)(CCMenuItemSpriteExtra *, float32x2_t *, float, float))m_secretDoorButton->setPosition)(
m_secretDoorButton,
&v138,
v147.x,
v147.y);
v81 = (cocos2d::CCArray *)sub_10024A15C();
a1->m_secretLevelLabels = v81;
cocos2d::CCObject::retain(v81);
v82 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_playBtn2_001.png");
((void (__fastcall *)(cocos2d::CCSprite *, float))v82->setScale)(v82, 0.5);
v153.ptr = (void (__cdecl *)(cocos2d::CCObject *))SecretLayer2::onSecretLevel;
v153.adj = 0;
v83 = CCMenuItemSpriteExtra::create(v82, nullptr, a1, v153);
a1->m_secretLevelButton = v83;
((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v62->addChild)(v62, v83);
v84 = v141 + -45.0;
v85 = AppDelegate::get();
v87.n128_u32[0] = 0;
if ( v85->m_startupScriptFilename.m_data.m_short.shortStorage.__elems_[4] )
v87.n128_f32[0] = 25.0;
v87.n128_f32[0] = v84 - v87.n128_f32[0];
v86.n128_u32[0] = 1124204544;
sub_100022980(v87, v86, &v138);
m_secretLevelButton = a1->m_secretLevelButton;
v148 = cocos2d::CCNode::convertToNodeSpace(v62, (const cocos2d::CCPoint *)&v138);
((void (__fastcall *)(CCMenuItemSpriteExtra *, float32x2_t *, float, float))m_secretLevelButton->setPosition)(
m_secretLevelButton,
&v133,
v148.x,
v148.y);
v89 = cocos2d::CCLabelBMFont::create_1("The", "bigFont.fnt");
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v89->setScale)(v89, 0.4);
v90 = ((__n128 (__fastcall *)(SecretLayer2 *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, v89);
v91.n128_u32[0] = 1110966272;
v90.n128_u32[0] = 0;
sub_100022980(v90, v91, &v132);
*(float32x2_t *)&v92 = sub_1000229DC(&v138, &v132, &v133);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *, double))v89->setPosition)(v89, &v133, v92);
sub_10024A2D0((__int64)a1->m_secretLevelLabels);
v93 = cocos2d::CCLabelBMFont::create_1("Challenge", "bigFont.fnt");
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v93->setScale)(v93, 0.4);
((void (__fastcall *)(SecretLayer2 *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, v93);
v94 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v89->getPosition)(v89);
v95.n128_u32[0] = 0;
v96.n128_u32[0] = -15.0;
sub_100022980(v95, v96, &v132);
*(float32x2_t *)&v97 = sub_1000229DC(v94, &v132, &v133);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *, double))v93->setPosition)(v93, &v133, v97);
sub_10024A2D0((__int64)a1->m_secretLevelLabels);
v98 = GameStatsManager::sharedState();
if ( GameStatsManager::getStat(v98, "13") <= 199 )
{
v99.n128_u32[0] = 3.0;
v100.n128_u32[0] = -30.0;
sub_100022980(v99, v100, &v132);
sub_1000229DC(&v138, &v132, &v133);
v101 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_diamondsIcon_001.png");
v102 = ((__n128 (__fastcall *)(SecretLayer2 *, cocos2d::CCSprite *))a1->addChild)(a1, v101);
v102.n128_u32[0] = 12.0;
v103.n128_u32[0] = -1.0;
sub_100022980(v102, v103, &v131);
*(float32x2_t *)&v104 = sub_1000229DC(&v133, &v131, &v132);
((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *, double))v101->setPosition)(v101, &v132, v104);
((void (__fastcall *)(cocos2d::CCSprite *, float))v101->setScale)(v101, 0.7);
sub_10024A2D0((__int64)a1->m_secretLevelLabels);
v105 = (cocos2d::CCString *)sub_100268F4C("%i", 200);
CString = cocos2d::CCString::getCString(v105);
v107 = cocos2d::CCLabelBMFont::create_1(CString, "bigFont.fnt");
v108 = ((__n128 (__fastcall *)(SecretLayer2 *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, v107);
v108.n128_u32[0] = -8.5;
v109.n128_u32[0] = 0;
sub_100022980(v108, v109, &v131);
*(float32x2_t *)&v110 = sub_1000229DC(&v133, &v131, &v132);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *, double))v107->setPosition)(v107, &v132, v110);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v107->setScale)(v107, 0.4);
sub_10024A2D0((__int64)a1->m_secretLevelLabels);
}
v111 = GameManager::sharedState();
if ( !GameManager::getUGV(v111, "1") )
{
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_secretLevelButton->setEnabled)(
a1->m_secretLevelButton,
0);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_secretLevelButton->setVisible)(
a1->m_secretLevelButton,
0);
if ( (unsigned int)sub_10024A36C((__int64)a1->m_secretLevelLabels) )
{
v112 = 0;
do
{
v113 = sub_10024A388((__int64)a1->m_secretLevelLabels, v112);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v113 + 328LL))(v113, 0);
++v112;
}
while ( v112 < (unsigned int)sub_10024A36C((__int64)a1->m_secretLevelLabels) );
}
}
v114 = GameManager::sharedState();
if ( !GameManager::getUGV(v114, "4") )
{
v115 = GameLevelManager::sharedState();
MainLevel = GameLevelManager::getMainLevel(v115, 3001, 1);
if ( GJGameLevel::getNormalPercent(MainLevel) >= 100 )
{
v117 = cocos2d::CCDelayTime::create(0.8);
v149.ptr = (void (*)(void))SecretLayer2::showCompletedLevel;
v149.adj = 0;
v118 = (unsigned __int8)cocos2d::CCCallFunc::create(a1, v149);
v126 = sub_10018A494(v117, v119, v120, v121, v122, v123, v124, v125, v118);
cocos2d::CCNode::runAction(a1, v126);
}
}
}
return v2;
}