//
// SecretLayer5::init from 0x59ed90 to 0x59f786 (2550 bytes)
//
// 1 xrefs:
// > SecretLayer5::create @ 0x59c7cc
//
// 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 SecretLayer5::init(SecretLayer5 *a1)
{
_BOOL4 v2; // r9
cocos2d::CCTextureCache *v3; // r0
cocos2d::CCSpriteFrameCache *v4; // r0
cocos2d::CCTextureCache *v5; // r0
cocos2d::CCSpriteFrameCache *v6; // r0
GameManager *v7; // r6
int v8; // r2
int v9; // r3
cocos2d::CCDirector *v10; // r0
int *m_start; // r2
int *v12; // r6
int *v13; // r0
int *v14; // r6
char *v15; // r6
void *v16; // r0
char *v17; // r6
time_t v18; // r0
int *v19; // r8
int *m_finish; // r6
unsigned int v21; // r1
const char *v22; // r1
cocos2d::CCSprite *v23; // r0
cocos2d::CCSprite_vtbl *v24; // r3
cocos2d::CCSprite *v25; // r6
void (__fastcall *setAnchorPoint)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8
cocos2d::CCSprite *m_background; // r6
void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8
cocos2d::CCSprite *v29; // r0
void (__fastcall *setColor)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // r3
cocos2d::CCLabelBMFont *v31; // r0
SecretLayer5_vtbl *v32; // r3
cocos2d::CCLabelBMFont *m_messageLabel; // r10
void (__fastcall *v34)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11
cocos2d::extension::CCScale9Sprite *v35; // r0
cocos2d::extension::CCScale9Sprite_vtbl *v36; // r3
CCTextInputNode *v37; // r0
SecretLayer5_vtbl *v38; // r3
CCTextInputNode *m_textInput; // r7
cocos2d::CCSprite *v40; // r0
CCMenuItemSpriteExtra *v41; // r10
cocos2d::CCNode *v42; // r8
void (__fastcall *v43)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7
cocos2d::CCDirector *v44; // r0
float v45; // s17
cocos2d::CCDirector *v46; // r0
float v47; // r0
CCSpriteGrayscale *m_wraithGraySprite; // r0
void (__fastcall *v49)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // r3
CCSpriteWithHue *m_wraithSprite; // r11
void (__fastcall *v51)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r7
cocos2d::CCSprite *v52; // r0
void (__fastcall *setBlendFunc)(cocos2d::CCSprite *__hidden, cocos2d::ccBlendFunc); // r3
cocos2d::CCSprite *m_eyesSprite; // r11
void (__fastcall *v55)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r7
cocos2d::CCNode *v56; // r7
cocos2d::CCSprite *v57; // r0
cocos2d::CCNode_vtbl *v58; // r3
void (__fastcall *v59)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11
cocos2d::CCSprite *m_lockSprite; // r11
void (__fastcall *v61)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r6
cocos2d::CCSprite *v62; // r0
void (__fastcall *v63)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // r3
CCSpriteWithHue *v64; // r0
CCMenuItemSpriteExtra *v65; // r0
cocos2d::CCNode_vtbl *v66; // r3
void (__fastcall *v67)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7
LoadingCircleSprite *v68; // r0
LoadingCircleSprite_vtbl *v69; // r3
LoadingCircleSprite *m_circleSprite; // r0
void (__fastcall *v71)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // r3
GameManager *v72; // r0
GameManager *v73; // r0
const char *FontFile; // r7
TextArea *m_messageArea; // r7
void (__fastcall *v76)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r10
TextArea *v77; // r7
void (__fastcall *v78)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r10
int v79; // r8
cocos2d::CCArray *v80; // r0
cocos2d::CCArray *v81; // r0
cocos2d::CCSprite *v82; // r7
void (__fastcall *v83)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // r3
float v84; // s15
void (__fastcall *v85)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r10
cocos2d::CCArray *v86; // r0
cocos2d::CCArray *v87; // r10
int v88; // r7
cocos2d::CCPoint v89; // r1
cocos2d::CCObject *v90; // r0
cocos2d::CCObject *v91; // r0
GameManager *v92; // r0
_BOOL4 UGV; // r0
cocos2d::CCDelayTime *v94; // r0
cocos2d::CCSequence *v95; // r7
cocos2d::CCFiniteTimeAction *v96; // r0
cocos2d::CCAction *v97; // r0
float v99; // r2
float v100; // r3
cocos2d::CCArray *v101; // [sp+10h] [bp-7Ch]
CCSpriteGrayscale *v102; // [sp+18h] [bp-74h]
CCSpriteWithHue *v103; // [sp+18h] [bp-74h]
CCSpriteWithHue *v104; // [sp+18h] [bp-74h]
CCMenuItemSpriteExtra *m_wraithButton; // [sp+18h] [bp-74h]
cocos2d::CCArray *m_torchFires; // [sp+18h] [bp-74h]
cocos2d::CCArray *v107; // [sp+18h] [bp-74h]
cocos2d::CCSize v108; // [sp+24h] [bp-68h] BYREF
cocos2d::CCPoint v109; // [sp+2Ch] [bp-60h] BYREF
cocos2d::CCSize v110; // [sp+34h] [bp-58h] BYREF
int v111; // [sp+3Ch] [bp-50h]
int v112; // [sp+40h] [bp-4Ch]
int v113; // [sp+44h] [bp-48h]
int v114; // [sp+48h] [bp-44h]
cocos2d::CCPoint v115; // [sp+4Ch] [bp-40h] BYREF
void (*v116)(SecretLayer5 *, cocos2d::CCObject *); // [sp+54h] [bp-38h]
int v117; // [sp+58h] [bp-34h]
cocos2d::CCPoint v118; // [sp+5Ch] [bp-30h] BYREF
cocos2d::CCRect v119; // [sp+64h] [bp-28h] BYREF
cocos2d::CCRect v120; // [sp+74h] [bp-18h] BYREF
cocos2d::CCSize v121; // 0:^0.8
cocos2d::CCRect v122; // 0:kr00_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 = cocos2d::CCTextureCache::sharedTextureCache();
cocos2d::CCTextureCache::addImage(v5, "TowerSheet.png", 0);
v6 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile(v6, "TowerSheet.plist");
v7 = GameManager::sharedState();
sub_776584((int)&v120, "secretLoop04.ogg");
GameManager::fadeInMusic((int)v7, &v120, v8, v9);
sub_774008(&v120);
a1->setKeypadEnabled(a1, 1);
a1->setKeyboardEnabled(a1, 1);
v10 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v108, v10);
m_start = a1->m_soundEffects.m_start;
if ( (unsigned int)((char *)a1->m_soundEffects.m_reserveEnd - (char *)m_start) > 0x43 )
{
v15 = (char *)((char *)a1->m_soundEffects.m_finish - (char *)m_start);
if ( (unsigned int)v15 <= 0x43 )
{
v17 = (char *)&unk_9ADE6C + (_DWORD)v15;
std::__copy_move::__copy_m(&unk_9ADE6C, (int)v17, m_start);
m_start = a1->m_soundEffects.m_finish;
v16 = v17;
}
else
{
v16 = &unk_9ADE6C;
}
a1->m_soundEffects.m_finish = (int *)std::__copy_move::__copy_m(
v16,
(int)&unk_9ADEB0,
m_start);
}
else
{
v12 = (int *)operator new(0x44u);
std::__copy_move::__copy_m(&unk_9ADE6C, (int)&unk_9ADEB0, v12);
v13 = a1->m_soundEffects.m_start;
if ( v13 )
operator delete(v13);
a1->m_soundEffects.m_start = v12;
v14 = v12 + 17;
a1->m_soundEffects.m_finish = v14;
a1->m_soundEffects.m_reserveEnd = v14;
}
v18 = time(nullptr);
srand(v18);
v19 = a1->m_soundEffects.m_start;
m_finish = a1->m_soundEffects.m_finish;
v21 = rand() % 0x7FFFFFFFu;
if ( !v21 )
v21 = 1;
LODWORD(v120.origin.x) = v21;
std::shuffle<__gnu_cxx::__normal_iterator>,std::linear_congruential_engine>(
(unsigned int)v19,
m_finish,
(unsigned int *)&v120);
v23 = (cocos2d::CCSprite *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_gradientBG.png", v22);
v24 = v23->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v25 = v23;
a1->m_background = v23;
setAnchorPoint = v24->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v120.origin, 0.0, 0.0);
setAnchorPoint(v25, &v120.origin);
a1->addChild_0(a1, a1->m_background, -3);
((void (__fastcall *)(cocos2d::CCSprite *, _DWORD))a1->m_background->setScaleX)(
a1->m_background,
(float)(v108.width + 10.0) / a1->m_background->m_obRect.size.width);
((void (__fastcall *)(cocos2d::CCSprite *, _DWORD))a1->m_background->setScaleY)(
a1->m_background,
(float)(v108.height + 10.0) / a1->m_background->m_obRect.size.height);
m_background = a1->m_background;
setPosition = m_background->setPosition;
cocos2d::CCPoint::CCPoint(&v120.origin, -5.0, -5.0);
setPosition(m_background, &v120.origin);
v29 = a1->m_background;
setColor = v29->setColor;
LOWORD(v120.origin.x) = 3613;
BYTE2(v120.origin.x) = 47;
setColor(v29, (const cocos2d::ccColor3B *)&v120);
cocos2d::CCRect::CCRect(&v119, 0.0, 0.0, 40.0, 40.0);
cocos2d::CCPoint::CCPoint(&v109, v108.width * 0.5, (float)(v108.height * 0.5) + 55.0);
v31 = cocos2d::CCLabelBMFont::create();
v32 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_messageLabel = v31;
v32->addChild(a1, v31);
m_messageLabel = a1->m_messageLabel;
v34 = m_messageLabel->setPosition;
cocos2d::CCPoint::CCPoint(&v118, 0.0, 43.0);
cocos2d::CCPoint::operator+(&v120, &v109, &v118);
v34(m_messageLabel, &v120.origin);
SecretLayer5::getMessage((SecretLayer5 *)&v120);
SecretLayer5::updateMessageLabel((int)a1, &v120);
sub_774008(&v120);
cocos2d::CCRect::CCRect(&v120, &v119);
v122.origin.x = v99;
v122.origin.y = v100;
v122.size = v121;
v35 = (cocos2d::extension::CCScale9Sprite *)cocos2d::extension::CCScale9Sprite::create(
(cocos2d::extension::CCScale9Sprite *)"square02b_small.png",
(const char *)&v120,
v122);
v36 = v35->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_inputBackground = v35;
v36->setOpacity(v35, 100);
cocos2d::CCSize::CCSize(&v110, 200.0, 40.0);
a1->m_inputBackground->setContentSize(a1->m_inputBackground, &v110);
a1->addChild_0(a1, a1->m_inputBackground, -2);
a1->m_inputBackground->setPosition(a1->m_inputBackground, &v109);
a1->m_inputBackground->setColor(a1->m_inputBackground, (const cocos2d::ccColor3B *)&unk_9ADEB0);
v37 = CCTextInputNode::create(180.0, 50.0, "...", "Thonburi");
v38 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_textInput = v37;
((void (__fastcall *)(SecretLayer5 *, CCTextInputNode *, int, void (__fastcall *)(cocos2d::CCNode *__hidden, cocos2d::CCNode *, int), int *, const char *))v38->addChild_0)(
a1,
v37,
20,
v38->addChild_0,
&dword_18,
"bigFont.fnt");
a1->m_textInput->m_delegate = &a1->TextInputDelegate;
a1->m_textInput->setPosition(a1->m_textInput, &v109);
CCTextInputNode::setMaxLabelScale(a1->m_textInput, 0.7);
CCTextInputNode::setMaxLabelWidth(a1->m_textInput, 180.0);
a1->m_textInput->m_textField->setVisible(a1->m_textInput->m_textField, 0);
m_textInput = a1->m_textInput;
m_textInput->m_maxLabelLength = 100;
sub_776584(
(int)&v120,
" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,-!?:;)(/\\\"'`*=+-_%[]<>|@&^#{}%$~");
CCTextInputNode::setAllowedChars((int)m_textInput, (int)&v120);
sub_774008(&v120);
SecretLayer5::updateSearchLabel(a1, (const char *)&unk_939830);
v40 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
v116 = SecretLayer5::onBack;
v117 = 0;
v41 = CCMenuItemSpriteExtra::create(
v40,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(SecretLayer5::onBack, (unsigned int)a1));
CCMenuItemSpriteExtra::setSizeMult(v41, 1.5);
v42 = (cocos2d::CCNode *)cocos2d::CCMenu::create((cocos2d::CCMenu *)v41, nullptr);
a1->addChild_0(a1, v42, 1);
v43 = v42->setPosition;
v44 = cocos2d::CCDirector::sharedDirector();
v45 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v44));
v46 = cocos2d::CCDirector::sharedDirector();
v47 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v46));
cocos2d::CCPoint::CCPoint(&v120.origin, v45 + 24.0, v47 - 23.0);
v43(v42, &v120.origin);
if ( PlatformToolbox::isControllerConnected() )
GameToolbox::addBackButton(a1, v41);
sub_776584((int)&v120, "GJ_secretLock4_001.png");
a1->m_wraithSprite = CCSpriteWithHue::createWithSpriteFrameName((const char **)&v120);
sub_774008(&v120);
sub_776584((int)&v120, "GJ_secretLock4_001.png");
a1->m_wraithGraySprite = CCSpriteGrayscale::createWithSpriteFrameName((const char **)&v120);
sub_774008(&v120);
m_wraithGraySprite = a1->m_wraithGraySprite;
v49 = m_wraithGraySprite->setColor;
LOWORD(v120.origin.x) = 25800;
BYTE2(v120.origin.x) = -1;
v49(m_wraithGraySprite, (const cocos2d::ccColor3B *)&v120);
a1->m_wraithSprite->addChild_0(a1->m_wraithSprite, a1->m_wraithGraySprite, 1);
a1->m_wraithGraySprite->setOpacity(a1->m_wraithGraySprite, 0);
m_wraithSprite = a1->m_wraithSprite;
v102 = a1->m_wraithGraySprite;
v51 = v102->setPosition;
cocos2d::CCPoint::CCPoint(&v118, 0.0, 0.0);
cocos2d::CCNode::convertToNodeSpace(&v120.origin, m_wraithSprite, &v118);
v51(v102, &v120.origin);
v52 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_secretLock4_eyes_001.png");
a1->m_eyesSprite = v52;
setBlendFunc = v52->setBlendFunc;
v111 = 770;
v112 = 1;
((void (__fastcall *)(cocos2d::CCSprite *, int, int))setBlendFunc)(v52, 770, 1);
a1->m_wraithSprite->addChild_0(a1->m_wraithSprite, a1->m_eyesSprite, 2);
m_eyesSprite = a1->m_eyesSprite;
v55 = m_eyesSprite->setPosition;
v103 = a1->m_wraithSprite;
cocos2d::CCPoint::CCPoint(&v118, 0.0, 0.0);
cocos2d::CCNode::convertToNodeSpace(&v120.origin, v103, &v118);
v55(m_eyesSprite, &v120.origin);
a1->m_eyesSprite->setOpacity(a1->m_eyesSprite, 0);
cocos2d::CCSprite::createWithSpriteFrameName("GJ_secretLock2_2_001.png");
v56 = cocos2d::CCNode::create();
v57 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_secretLock2_2_001.png");
v58 = v56->__vftable;
a1->m_lockSprite = v57;
v58->addChild_0(v56, v57, -1);
a1->m_wraithSprite->addChild_0(a1->m_wraithSprite, v56, -2);
v59 = v56->setPosition;
v104 = a1->m_wraithSprite;
cocos2d::CCPoint::CCPoint(&v118, 0.0, -30.0);
cocos2d::CCNode::convertToNodeSpace(&v120.origin, v104, &v118);
v59(v56, &v120.origin);
m_lockSprite = a1->m_lockSprite;
v61 = m_lockSprite->setPosition;
cocos2d::CCPoint::CCPoint(&v120.origin, 0.0, 25.0);
v61(m_lockSprite, &v120.origin);
v62 = a1->m_lockSprite;
v63 = v62->setColor;
LOWORD(v120.origin.x) = 18286;
BYTE2(v120.origin.x) = -103;
v63(v62, (const cocos2d::ccColor3B *)&v120);
((void (__fastcall *)(CCSpriteWithHue *, int))a1->m_wraithSprite->setScale)(a1->m_wraithSprite, 1067030938);
v64 = a1->m_wraithSprite;
LODWORD(v118.x) = SecretLayer5::onSubmit;
v118.y = 0.0;
v65 = CCMenuItemSpriteExtra::create(
v64,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(SecretLayer5::onSubmit, (unsigned int)a1));
v66 = v42->__vftable;
a1->m_wraithButton = v65;
v66->addChild(v42, v65);
m_wraithButton = a1->m_wraithButton;
v67 = m_wraithButton->setPosition;
cocos2d::CCPoint::CCPoint(&v115, v108.width * 0.5, (float)(v108.height * 0.5) - 25.0);
cocos2d::CCNode::convertToNodeSpace(&v120.origin, v42, &v115);
v67(m_wraithButton, &v120.origin);
CCMenuItemSpriteExtra::setSizeMult(a1->m_wraithButton, 0.7);
v68 = LoadingCircleSprite::create(0.5);
v69 = v68->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_circleSprite = v68;
((void (__fastcall *)(LoadingCircleSprite *, int))v69->setScale)(v68, 1056964608);
a1->addChild_0(a1, a1->m_circleSprite, 28);
a1->m_circleSprite->setOpacity(a1->m_circleSprite, 0);
a1->m_circleSprite->setPosition(a1->m_circleSprite, &v109);
v113 = 770;
v114 = 1;
((void (__fastcall *)(LoadingCircleSprite *, int, int))a1->m_circleSprite->setBlendFunc)(a1->m_circleSprite, 770, 1);
m_circleSprite = a1->m_circleSprite;
v71 = m_circleSprite->setColor;
*(_WORD *)((char *)&v120.origin.x + 1) = -156;
LOBYTE(v120.origin.x) = -56;
v71(m_circleSprite, (const cocos2d::ccColor3B *)&v120);
v72 = GameManager::sharedState();
GameManager::loadFont(v72, 19);
sub_776584((int)&v115, " ");
v73 = GameManager::sharedState();
FontFile = GameManager::getFontFile(v73, 19);
cocos2d::CCPoint::CCPoint(&v120.origin, 0.5, 1.0);
a1->m_messageArea = (TextArea *)TextArea::create(
(TextArea *)&v115,
(std::string)FontFile,
(const char *)0x3F800000,
1141200213,
&v120.origin,
(cocos2d::CCPoint)1101004800LL);
sub_774008(&v115);
m_messageArea = a1->m_messageArea;
v76 = m_messageArea->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v120.origin, 0.5, 0.5);
v76(m_messageArea, &v120.origin);
((void (__fastcall *)(TextArea *, int))a1->m_messageArea->setScale)(a1->m_messageArea, 1061158912);
a1->addChild_0(a1, a1->m_messageArea, 3);
v77 = a1->m_messageArea;
v78 = v77->setPosition;
cocos2d::CCPoint::CCPoint(&v115, 0.0, 60.0);
v79 = 0;
cocos2d::CCPoint::operator+(&v120, &v109, &v115);
v80 = (cocos2d::CCArray *)((int (__fastcall *)(TextArea *, cocos2d::CCRect *))v78)(v77, &v120);
v81 = (cocos2d::CCArray *)cocos2d::CCArray::create(v80);
a1->m_torchFires = v81;
cocos2d::CCObject::retain(v81);
while ( 1 )
{
v82 = cocos2d::CCSprite::createWithSpriteFrameName("towerTorchInner_001.png");
v83 = v82->setColor;
LOWORD(v120.origin.x) = 23160;
BYTE2(v120.origin.x) = -103;
v83(v82, (const cocos2d::ccColor3B *)&v120);
a1->addChild_0(a1, v82, 4);
v84 = v79 ? 195.0 : -195.0;
v85 = v82->setPosition;
cocos2d::CCPoint::CCPoint(&v120.origin, v84 + (float)(v108.width * 0.5), (float)(v108.height * 0.5) + 4.0);
v86 = (cocos2d::CCArray *)((int (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCRect *))v85)(v82, &v120);
v87 = (cocos2d::CCArray *)cocos2d::CCArray::create(v86);
v88 = (int)v82->getPosition(v82);
cocos2d::CCPoint::CCPoint(&v115, 0.0, 33.0);
cocos2d::CCPoint::operator+(&v120, v88, &v115);
LODWORD(v89.y) = 2;
LODWORD(v89.x) = &v120;
LevelAreaLayer::addTorch(a1, v89, 1065353216, COERCE_FLOAT(4), 1, 1, (int)v87, v101);
m_torchFires = a1->m_torchFires;
v90 = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(v87, 0);
cocos2d::CCArray::addObject(m_torchFires, v90);
v107 = a1->m_torchFires;
v91 = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(v87, 1u);
cocos2d::CCArray::addObject(v107, v91);
if ( v79 == 1 )
break;
v79 = 1;
}
cocos2d::CCNode::scheduleUpdate(a1);
GameLevelManager::sharedState()->m_GJOnlineRewardDelegate = &a1->GJOnlineRewardDelegate;
v92 = GameManager::sharedState();
UGV = GameManager::getUGV(v92, "38");
if ( UGV )
{
LOBYTE(v2) = UGV;
}
else
{
a1->m_uiLocked = 1;
v94 = cocos2d::CCDelayTime::create(1.2);
v120.origin.y = 0.0;
LODWORD(v120.origin.x) = SecretLayer5::showFirstDialog;
v95 = (cocos2d::CCSequence *)v94;
v96 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(a1, SecretLayer5::showFirstDialog, 0);
v97 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v95, v96, 0);
cocos2d::CCNode::runAction(a1, v97);
a1->m_textInput->setTouchEnabled(a1->m_textInput, 0);
}
}
return v2;
}