//
// SecretLayer2::init from 0x10049d1a0 to 0x10049dfde (3646 bytes)
//
// 2 xrefs:
// > SecretLayer2::create @ 0x10049d161
// > ??> @ 0x100945668
//
// 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)
{
bool result; // al
cocos2d::CCTextureCache *v3; // rax
cocos2d::CCSpriteFrameCache *v4; // rax
GameManager *v5; // rax
cocos2d::CCDictionary *v6; // rax
AchievementManager *v7; // rax
cocos2d::CCDictionary *m_messageThreads; // r14
cocos2d::CCNode *v9; // r15
AchievementManager *v10; // rax
AchievementManager *v11; // rax
cocos2d::CCDictionary *v12; // r14
cocos2d::CCNode *v13; // r15
AchievementManager *v14; // rax
cocos2d::CCDictionary *v15; // r14
cocos2d::CCNode *v16; // r15
AchievementManager *v17; // rax
cocos2d::CCDictionary *v18; // r14
cocos2d::CCNode *v19; // r15
AchievementManager *v20; // rax
cocos2d::CCDictionary *v21; // r14
cocos2d::CCNode *v22; // r15
AchievementManager *v23; // rax
cocos2d::CCDictionary *v24; // r14
cocos2d::CCNode *v25; // r15
AchievementManager *v26; // rax
cocos2d::CCDictionary *v27; // r14
cocos2d::CCNode *v28; // r15
GameManager *v29; // rax
cocos2d::CCDictionary *v30; // r14
cocos2d::CCNode *v31; // r15
cocos2d::CCSprite *v32; // r14
cocos2d::CCLabelBMFont *v33; // r14
cocos2d::CCLabelBMFont *v34; // rax
cocos2d::CCLabelBMFont *m_messageLabel; // r15
cocos2d::CCLabelBMFont *v36; // rdi
std::string::pointer data; // rsi
cocos2d::extension::CCScale9Sprite *v38; // r15
CCTextInputNode *v39; // rax
CCTextInputNode *m_searchInput; // rdi
CCTextInputNode *v41; // r14
cocos2d::CCSprite *v42; // rax
CCMenuItemSpriteExtra *v43; // r15
int v44; // edx
int v45; // ecx
int v46; // r8d
int v47; // r9d
const cocos2d::CCPoint *v48; // r14
cocos2d::CCDirector *v49; // rax
cocos2d::CCDirector *v50; // rax
float v51; // xmm1_4
cocos2d::CCSprite *v52; // r15
cocos2d::CCSprite *v53; // r12
CCMenuItemSpriteExtra *v54; // rax
CCMenuItemSpriteExtra *m_submitButton; // r15
GameManager *v56; // rax
const char *v57; // rdi
cocos2d::CCSprite *v58; // rax
CCMenuItemSpriteExtra *v59; // rax
CCMenuItemSpriteExtra *m_secretDoorButton; // r15
cocos2d::CCArray *v61; // rax
cocos2d::CCSprite *v62; // r15
CCMenuItemSpriteExtra *v63; // rax
CCMenuItemSpriteExtra *m_secretLevelButton; // r12
cocos2d::CCLabelBMFont *v65; // r14
cocos2d::CCLabelBMFont *v66; // r15
unsigned __int64 *v67; // r14
GameStatsManager *v68; // rax
cocos2d::CCSprite *v69; // r15
cocos2d::CCString *v70; // rax
const char *CString; // rax
cocos2d::CCLabelBMFont *v72; // r15
GameManager *v73; // rax
unsigned int v74; // r14d
__int64 v75; // rax
GameManager *v76; // rax
GameLevelManager *v77; // rax
GJGameLevel *MainLevel; // rax
cocos2d::CCDelayTime *v79; // r14
cocos2d::CCCallFunc *v80; // rax
cocos2d::CCSequence *v81; // rax
char v82; // [rsp+0h] [rbp-D0h]
unsigned __int64 v83; // [rsp+8h] [rbp-C8h] BYREF
__m128 v84; // [rsp+10h] [rbp-C0h] BYREF
unsigned __int64 v85; // [rsp+20h] [rbp-B0h] BYREF
void *v86[3]; // [rsp+28h] [rbp-A8h] BYREF
std::string v87; // [rsp+40h] [rbp-90h] BYREF
std::string v88; // [rsp+58h] [rbp-78h] BYREF
unsigned __int64 v89[2]; // [rsp+70h] [rbp-60h] BYREF
unsigned __int64 v90; // [rsp+80h] [rbp-50h] BYREF
unsigned __int64 v91; // [rsp+88h] [rbp-48h] BYREF
unsigned __int64 v92; // [rsp+90h] [rbp-40h] BYREF
float v93; // [rsp+98h] [rbp-38h]
float v94; // [rsp+9Ch] [rbp-34h] BYREF
float v95; // [rsp+A0h] [rbp-30h]
bool v96; // [rsp+A7h] [rbp-29h]
double v97; // 0:xmm0_8.8
double v98; // 0:xmm0_8.8
double v99; // 0:xmm0_8.8
double v100; // 0:xmm0_8.8
double v101; // 0:xmm0_8.8
cocos2d::CCRect v102; // 0:xmm0_8.8,8:xmm1_8.8
result = cocos2d::CCLayer::init(a1);
if ( !result )
return result;
v96 = result;
v3 = cocos2d::CCTextureCache::sharedTextureCache();
cocos2d::CCTextureCache::addImage(v3, "SecretSheet.png", 0);
v4 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile_2(v4, "SecretSheet.plist");
v5 = GameManager::sharedState();
strcpy((char *)v86, " secretLoop02.mp3");
GameManager::fadeInMusic(*(__m128 *)"secretLoop02.mp3", (__int64)v5, (unsigned __int8 *)v86);
if ( ((__int64)v86[0] & 1) != 0 )
operator delete(v86[2]);
((void (__fastcall *)(SecretLayer2 *, __int64))a1->setKeypadEnabled)(a1, 1);
((void (__fastcall *)(SecretLayer2 *, __int64))a1->setKeyboardEnabled)(a1, 1);
cocos2d::CCDirector::sharedDirector();
*(cocos2d::CCSize *)&v97 = cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v94);
v6 = cocos2d::CCDictionary::create();
a1->m_messageThreads = v6;
cocos2d::CCObject::retain(v6);
v7 = AchievementManager::sharedState();
if ( !AchievementManager::isAchievementEarned(v7, "geometry.ach.v2.secret01") )
{
m_messageThreads = a1->m_messageThreads;
v9 = cocos2d::CCNode::create();
((void (__fastcall *)(cocos2d::CCNode *, __int64, double))v9->setTag)(v9, 1, v97);
cocos2d::CCDictionary::setObject(m_messageThreads, v9, 1);
}
v10 = AchievementManager::sharedState();
if ( AchievementManager::isAchievementEarned(v10, "geometry.ach.secret06") )
{
v11 = AchievementManager::sharedState();
if ( !AchievementManager::isAchievementEarned(v11, "geometry.ach.v2.secret03") )
{
v12 = a1->m_messageThreads;
v13 = cocos2d::CCNode::create();
((void (__fastcall *)(cocos2d::CCNode *, __int64, double))v13->setTag)(v13, 3, v97);
cocos2d::CCDictionary::setObject(v12, v13, 3);
}
}
v14 = AchievementManager::sharedState();
if ( !AchievementManager::isAchievementEarned(v14, "geometry.ach.v2.secret05") )
{
v15 = a1->m_messageThreads;
v16 = cocos2d::CCNode::create();
((void (__fastcall *)(cocos2d::CCNode *, __int64, double))v16->setTag)(v16, 5, v97);
cocos2d::CCDictionary::setObject(v15, v16, 5);
}
v17 = AchievementManager::sharedState();
if ( !AchievementManager::isAchievementEarned(v17, "geometry.ach.v2.secret06") )
{
v18 = a1->m_messageThreads;
v19 = cocos2d::CCNode::create();
((void (__fastcall *)(cocos2d::CCNode *, __int64, double))v19->setTag)(v19, 6, v97);
cocos2d::CCDictionary::setObject(v18, v19, 6);
}
v20 = AchievementManager::sharedState();
if ( !AchievementManager::isAchievementEarned(v20, "geometry.ach.v2.secret08") )
{
v21 = a1->m_messageThreads;
v22 = cocos2d::CCNode::create();
((void (__fastcall *)(cocos2d::CCNode *, __int64, double))v22->setTag)(v22, 8, v97);
cocos2d::CCDictionary::setObject(v21, v22, 8);
}
v23 = AchievementManager::sharedState();
if ( !AchievementManager::isAchievementEarned(v23, "geometry.ach.v2.secret09") )
{
v24 = a1->m_messageThreads;
v25 = cocos2d::CCNode::create();
((void (__fastcall *)(cocos2d::CCNode *, __int64, double))v25->setTag)(v25, 9, v97);
cocos2d::CCDictionary::setObject(v24, v25, 9);
}
v26 = AchievementManager::sharedState();
if ( !AchievementManager::isAchievementEarned(v26, "geometry.ach.v2.secret10") )
{
v27 = a1->m_messageThreads;
v28 = cocos2d::CCNode::create();
((void (__fastcall *)(cocos2d::CCNode *, __int64, double))v28->setTag)(v28, 10, v97);
cocos2d::CCDictionary::setObject(v27, v28, 10);
}
v29 = GameManager::sharedState();
if ( !GameManager::getUGV(v29, "1") )
{
v30 = a1->m_messageThreads;
v31 = cocos2d::CCNode::create();
((void (__fastcall *)(cocos2d::CCNode *, __int64, double))v31->setTag)(v31, 20, v97);
cocos2d::CCDictionary::setObject(v30, v31, 20);
}
v32 = cocos2d::CCSprite::create_1("GJ_gradientBG.png");
sub_10028CBE0((float *)v89, 0.0, 0.0);
((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v32->setAnchorPoint)(v32, v89);
((void (__fastcall *)(SecretLayer2 *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v32, 4294967293LL);
((void (__fastcall *)(cocos2d::CCSprite *, float))v32->setScaleX)(v32, (float)(v94 + 10.0) / v32->m_obRect.size.width);
((void (__fastcall *)(cocos2d::CCSprite *, float))v32->setScaleY)(
v32,
(float)(v95 + 10.0) / v32->m_obRect.size.height);
sub_10028CBE0((float *)v89, -5.0, -5.0);
((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v32->setPosition)(v32, v89);
BYTE2(v89[0]) = 100;
LOWORD(v89[0]) = 75;
((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v32->setColor)(v32, v89);
sub_10028CC00((__int64)v89, 0.0, 0.0, (__m128)0x42200000u, (__m128)0x42200000u);
v33 = cocos2d::CCLabelBMFont::create_3("Vault of Secrets", "goldFont.fnt");
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v33->setScale)(v33, 1.0);
((void (__fastcall *)(SecretLayer2 *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, v33);
sub_10028CBE0(v84.f32, v94 * 0.5, v95 + -24.0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __m128 *))v33->setPosition)(v33, &v84);
sub_10028CBE0((float *)&v83, v94 * 0.5, (float)(v95 * 0.5) + 50.0);
v34 = cocos2d::CCLabelBMFont::create_3(" ", "bigFont.fnt");
a1->m_messageLabel = v34;
((void (__fastcall *)(SecretLayer2 *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, v34);
m_messageLabel = a1->m_messageLabel;
sub_10028CBE0((float *)&v92, 0.0, 43.0);
sub_10028CCE0((double *)v84.i64, &v83, &v92);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __m128 *))m_messageLabel->setPosition)(m_messageLabel, &v84);
if ( !a1->m_selectedThread )
{
v93 = (float)((float)a1->m_basicMessageCount * -0.050000001) + 1.0;
if ( (float)((float)rand() * 4.6566129e-10) > v93 )
SecretLayer2::selectAThread(a1);
if ( !a1->m_selectedThread )
{
SecretLayer2::getBasicMessage(&v88, a1);
v36 = a1->m_messageLabel;
if ( (*(_BYTE *)&v88.__r_.__value_.__s.0 & 1) != 0 )
goto LABEL_26;
LABEL_28:
data = v88.__r_.__value_.__s.__data_;
goto LABEL_29;
}
}
SecretLayer2::getThreadMessage(&v88);
v36 = a1->m_messageLabel;
if ( (*(_BYTE *)&v88.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_28;
LABEL_26:
data = v88.__r_.__value_.__l.__data_;
LABEL_29:
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string::pointer))v36->setString)(v36, data);
v102.size = (cocos2d::CCSize)1058642330LL;
cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_messageLabel, 320.0, 0.60000002, 0.0);
if ( (*(_BYTE *)&v88.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v88.__r_.__value_.__l.__data_);
*(double *)&v102.origin = sub_10028D180(&v84, v89);
v38 = cocos2d::extension::CCScale9Sprite::create_2("square02b_small.png", v102);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int64))v38->setOpacity)(v38, 100);
sub_10028CBF0(v84.f32, 200.0, 40.0);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __m128 *))v38->setContentSize)(v38, &v84);
((void (__fastcall *)(SecretLayer2 *, cocos2d::extension::CCScale9Sprite *, __int64))a1->addChild_0)(
a1,
v38,
4294967294LL);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, unsigned __int64 *))v38->setPosition)(v38, &v83);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, void *))v38->setColor)(v38, &unk_10081D3B8);
v39 = CCTextInputNode::create(180.0, 50.0, "...", "Thonburi", 24, "bigFont.fnt");
a1->m_searchInput = v39;
((void (__fastcall *)(SecretLayer2 *, CCTextInputNode *, __int64))a1->addChild_0)(a1, v39, 20);
m_searchInput = a1->m_searchInput;
m_searchInput->m_delegate = &a1->TextInputDelegate;
((void (__fastcall *)(CCTextInputNode *, unsigned __int64 *))m_searchInput->setPosition)(m_searchInput, &v83);
CCTextInputNode::setMaxLabelScale(a1->m_searchInput, 0.69999999);
CCTextInputNode::setMaxLabelWidth(a1->m_searchInput, 180.0);
((void (__fastcall *)(cocos2d::CCTextFieldTTF *, _QWORD))a1->m_searchInput->m_textField->setVisible)(
a1->m_searchInput->m_textField,
0);
v41 = a1->m_searchInput;
v41->m_maxLabelLength = 100;
v87.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x68u);
v87.__r_.__value_.__r.__words[0] = 105;
v87.__r_.__value_.__l.__size_ = 97;
strcpy(
v87.__r_.__value_.__l.__data_,
" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,-!?:;)(/\\\"'`*=+-_%[]<>|@&^#{}%$~");
CCTextInputNode::setAllowedChars((std::string *)v41, &v87);
if ( (*(_BYTE *)&v87.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v87.__r_.__value_.__l.__data_);
SecretLayer2::updateSearchLabel(a1, "");
v42 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
v43 = CCMenuItemSpriteExtra::create(
v42,
nullptr,
a1,
(cocos2d::SEL_MenuHandler)(unsigned __int64)SecretLayer2::onBack);
CCMenuItemSpriteExtra::setSizeMult(v43, 1.5);
v48 = (const cocos2d::CCPoint *)sub_100792C50((_DWORD)v43, 0, v44, v45, v46, v47);
((void (__fastcall *)(SecretLayer2 *, const cocos2d::CCPoint *, __int64))a1->addChild_0)(a1, v48, 1);
v49 = cocos2d::CCDirector::sharedDirector();
v93 = sub_100484D90((__int64)v49) + 24.0;
v50 = cocos2d::CCDirector::sharedDirector();
v51 = sub_100484D70((__int64)v50) + -23.0;
sub_10028CBE0((float *)&v92, v93, v51);
(*(void (__fastcall **)(const cocos2d::CCPoint *, unsigned __int64 *))(*(_QWORD *)v48 + 184LL))(v48, &v92);
if ( PlatformToolbox::isControllerConnected() )
GameToolbox::addBackButton(a1, v43);
v52 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_secretLock2_001.png");
v53 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_secretLock2_2_001.png");
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *, __int64))v52->addChild_0)(v52, v53, 0xFFFFFFFFLL);
*(cocos2d::CCPoint *)&v98 = cocos2d::CCNode::convertToNodeSpace(
(cocos2d::CCNode *)&v92,
(const cocos2d::CCPoint *)v52);
((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *, double))v53->setPosition)(v53, &v92, v98);
v54 = CCMenuItemSpriteExtra::create(
v52,
nullptr,
a1,
(cocos2d::SEL_MenuHandler)(unsigned __int64)SecretLayer2::onSubmit);
a1->m_submitButton = v54;
(*(void (__fastcall **)(const cocos2d::CCPoint *, CCMenuItemSpriteExtra *))(*(_QWORD *)v48 + 440LL))(v48, v54);
m_submitButton = a1->m_submitButton;
sub_10028CBE0((float *)&v91, v94 * 0.5, (float)(v95 * 0.5) + -20.0);
*(cocos2d::CCPoint *)&v99 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v92, v48);
((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *, double))m_submitButton->setPosition)(
m_submitButton,
&v92,
v99);
CCMenuItemSpriteExtra::setSizeMult(a1->m_submitButton, 0.69999999);
v56 = GameManager::sharedState();
v57 = "secretDoor_closed_001.png";
if ( GameManager::getUGV(v56, "4") )
v57 = "secretDoor_open_001.png";
v58 = cocos2d::CCSprite::createWithSpriteFrameName(v57);
v59 = CCMenuItemSpriteExtra::create(
v58,
nullptr,
a1,
(cocos2d::SEL_MenuHandler)(unsigned __int64)SecretLayer2::onDoor);
a1->m_secretDoorButton = v59;
*(_WORD *)&v59->m_animationEnabled = 256;
(*(void (__fastcall **)(const cocos2d::CCPoint *, CCMenuItemSpriteExtra *))(*(_QWORD *)v48 + 440LL))(v48, v59);
m_secretDoorButton = a1->m_secretDoorButton;
sub_10028CBE0((float *)&v91, v94 + -45.0, 45.0);
*(cocos2d::CCPoint *)&v100 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v92, v48);
((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *, double))m_secretDoorButton->setPosition)(
m_secretDoorButton,
&v92,
v100);
v61 = (cocos2d::CCArray *)sub_10071F9E0(m_secretDoorButton, &v92);
a1->m_secretLevelLabels = v61;
cocos2d::CCObject::retain(v61);
v62 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_playBtn2_001.png");
((void (__fastcall *)(cocos2d::CCSprite *, float))v62->setScale)(v62, 0.5);
v63 = CCMenuItemSpriteExtra::create(
v62,
nullptr,
a1,
(cocos2d::SEL_MenuHandler)(unsigned __int64)SecretLayer2::onSecretLevel);
a1->m_secretLevelButton = v63;
(*(void (__fastcall **)(const cocos2d::CCPoint *, CCMenuItemSpriteExtra *))(*(_QWORD *)v48 + 440LL))(v48, v63);
sub_10028CBE0((float *)&v92, v94 + -45.0, 130.0);
m_secretLevelButton = a1->m_secretLevelButton;
*(cocos2d::CCPoint *)&v101 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v91, v48);
((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *, double))m_secretLevelButton->setPosition)(
m_secretLevelButton,
&v91,
v101);
v65 = cocos2d::CCLabelBMFont::create_3("The", "bigFont.fnt");
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v65->setScale)(v65, 0.40000001);
((void (__fastcall *)(SecretLayer2 *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, v65);
sub_10028CBE0((float *)&v90, 0.0, 46.0);
sub_10028CCE0((double *)&v91, &v92, &v90);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v65->setPosition)(v65, &v91);
sub_10071FCD0(a1->m_secretLevelLabels, v65);
v66 = cocos2d::CCLabelBMFont::create_3("Challenge", "bigFont.fnt");
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v66->setScale)(v66, 0.40000001);
((void (__fastcall *)(SecretLayer2 *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, v66);
v67 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v65->getPosition)(v65);
sub_10028CBE0((float *)&v90, 0.0, -15.0);
sub_10028CCE0((double *)&v91, v67, &v90);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v66->setPosition)(v66, &v91);
sub_10071FCD0(a1->m_secretLevelLabels, v66);
v68 = GameStatsManager::sharedState();
if ( GameStatsManager::getStat(v68, "13") <= 199 )
{
sub_10028CBE0((float *)&v90, 3.0, -30.0);
sub_10028CCE0((double *)&v91, &v92, &v90);
v69 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_diamondsIcon_001.png");
((void (__fastcall *)(SecretLayer2 *, cocos2d::CCSprite *))a1->addChild)(a1, v69);
sub_10028CBE0((float *)&v85, 12.0, -1.0);
sub_10028CCE0((double *)&v90, &v91, &v85);
((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v69->setPosition)(v69, &v90);
((void (__fastcall *)(cocos2d::CCSprite *, float))v69->setScale)(v69, 0.69999999);
sub_10071FCD0(a1->m_secretLevelLabels, v69);
v70 = (cocos2d::CCString *)sub_1007AB580("%i", v82);
CString = cocos2d::CCString::getCString(v70);
v72 = cocos2d::CCLabelBMFont::create_3(CString, "bigFont.fnt");
((void (__fastcall *)(SecretLayer2 *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, v72);
sub_10028CBE0((float *)&v85, -8.5, 0.0);
sub_10028CCE0((double *)&v90, &v91, &v85);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v72->setPosition)(v72, &v90);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v72->setScale)(v72, 0.40000001);
sub_10071FCD0(a1->m_secretLevelLabels, v72);
}
v73 = GameManager::sharedState();
if ( !GameManager::getUGV(v73, "1") )
{
v74 = 0;
((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_100720070(a1->m_secretLevelLabels) )
{
do
{
v75 = sub_1007200C0(a1->m_secretLevelLabels, v74);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v75 + 328LL))(v75, 0);
++v74;
}
while ( v74 < (unsigned int)sub_100720070(a1->m_secretLevelLabels) );
}
}
v76 = GameManager::sharedState();
if ( !GameManager::getUGV(v76, "4") )
{
v77 = GameLevelManager::sharedState();
MainLevel = GameLevelManager::getMainLevel(v77, 3001, 1);
if ( GJGameLevel::getNormalPercent(MainLevel) >= 100 )
{
v79 = cocos2d::CCDelayTime::create(0.80000001);
v80 = cocos2d::CCCallFunc::create(a1, (cocos2d::SEL_CallFunc)(unsigned __int64)SecretLayer2::showCompletedLevel);
v81 = sub_1003B5760(v79, v80, 0);
cocos2d::CCNode::runAction(a1, v81);
}
}
return v96;
}