//
// SecretLayer3::onClick from 0x61c05c to 0x61c90e (2226 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:55:00 +0000
//
unsigned int __fastcall SecretLayer3::onClick(unsigned int this, cocos2d::CCObject *a2)
{
cocos2d::CCNode *v2; // r6
int v3; // r5
cocos2d::CCArray *v5; // r9
GameManager *v6; // r0
int v7; // r2
cocos2d::CCArray *v8; // r7
GameManager *v9; // r0
GameStatsManager *v10; // r0
GameStatsManager *v11; // r0
GameManager *isItemUnlocked; // r0
cocos2d::CCObject *v13; // r0
cocos2d::CCObject *v14; // r0
cocos2d::CCObject *v15; // r0
GameManager *v16; // r0
int v17; // r10
int v18; // r9
GameStatsManager *v19; // r0
GameManager *v20; // r0
cocos2d::CCObject *v21; // r0
cocos2d::CCObject *v22; // r0
cocos2d::CCObject *v23; // r0
GameManager *v24; // r0
GameStatsManager *v25; // r0
GameManager *v26; // r0
cocos2d::CCObject *v27; // r0
cocos2d::CCObject *v28; // r0
cocos2d::CCObject *v29; // r0
cocos2d::CCObject *v30; // r0
cocos2d::CCObject *v31; // r0
GameManager *v32; // r0
GameManager *v33; // r0
GameManager *v34; // r0
cocos2d::CCDirector *v35; // r4
FMODAudioEngine *v36; // r0
FMODAudioEngine *v37; // r11
FMODAudioEngine *v38; // r0
int v39; // r0
FMODAudioEngine *v40; // r11
const cocos2d::CCPoint *v41; // r7
bool v42; // r2
int v43; // r8
void (__fastcall *v44)(int, float *); // r4
CCCircleWave *v45; // r0
int v46; // r3
CCCircleWave *v47; // r8
CCCircleWave *v48; // r0
int v49; // r2
CCCircleWave *v50; // r8
GameManager *v51; // r0
GameManager *v52; // r0
GameManager *UGV; // r5
GameManager *v54; // r0
GameManager *v55; // r0
char *v56; // r5
GameManager *v57; // r0
float v58; // r1
cocos2d::CCSequence *v59; // r0
int (__fastcall *v60)(SecretLayer3 *); // r1
cocos2d::CCSequence *v61; // r5
cocos2d::CCFiniteTimeAction *v62; // r0
cocos2d::CCAction *v63; // r0
bool v64; // [sp+0h] [bp-54h]
int v65; // [sp+4h] [bp-50h]
int v66; // [sp+4h] [bp-50h]
int v67; // [sp+4h] [bp-50h]
int v68; // [sp+4h] [bp-50h]
int v69; // [sp+4h] [bp-50h]
int v70; // [sp+4h] [bp-50h]
int v71; // [sp+4h] [bp-50h]
int v72; // [sp+4h] [bp-50h]
int v73; // [sp+4h] [bp-50h]
_BYTE v74[8]; // [sp+14h] [bp-40h] BYREF
int (__fastcall *v75)(SecretLayer3 *); // [sp+1Ch] [bp-38h]
int v76; // [sp+20h] [bp-34h]
int v77; // [sp+24h] [bp-30h] BYREF
int v78; // [sp+28h] [bp-2Ch]
int v79; // [sp+2Ch] [bp-28h]
int v80; // [sp+30h] [bp-24h] BYREF
int v81; // [sp+34h] [bp-20h]
int v82; // [sp+38h] [bp-1Ch]
float v83; // [sp+3Ch] [bp-18h] BYREF
float v84; // [sp+40h] [bp-14h]
float v85; // [sp+44h] [bp-10h]
int v86; // [sp+48h] [bp-Ch]
v2 = (cocos2d::CCNode *)this;
v3 = *(unsigned __int8 *)(this + 324);
if ( !*(_BYTE *)(this + 324) )
{
v5 = (cocos2d::CCArray *)(*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2);
v6 = (GameManager *)cocos2d::CCArray::create(v5);
v8 = v6;
if ( v5 == (cocos2d::CCArray *)((char *)&dword_0 + 1) )
{
v9 = (GameManager *)GameManager::sharedState(v6);
v10 = (GameStatsManager *)GameManager::setUGV(v9, "19", (_BYTE *)&dword_0 + 1);
v11 = (GameStatsManager *)GameStatsManager::sharedState(v10);
isItemUnlocked = (GameManager *)GameStatsManager::isItemUnlocked(v11, 12, 1);
if ( !isItemUnlocked )
{
v77 = 0;
v78 = 0;
v79 = 0;
std::string::__init(&v77, "...", 3u);
v80 = 0;
v81 = 0;
v82 = 0;
std::string::__init(&v80, "The first key is hidden in a secret gauntlet...", 0x3Fu);
LOWORD(v65) = -1;
BYTE2(v65) = -1;
v13 = (cocos2d::CCObject *)DialogObject::create((int)&v77, (int)&v80, 15, 1065353216, 0, v65);
cocos2d::CCArray::addObject(v8, v13);
std::string::~string((int)&v80);
std::string::~string((int)&v77);
v77 = 0;
v78 = 0;
v79 = 0;
std::string::__init(&v77, "...", 3u);
v80 = 0;
v81 = 0;
v82 = 0;
std::string::__init(
&v80,
"Only a chosen few can find it, but I will grant you this gift...",
0x50u);
LOWORD(v66) = -1;
BYTE2(v66) = -1;
v14 = (cocos2d::CCObject *)DialogObject::create((int)&v77, (int)&v80, 15, 1065353216, 0, v66);
cocos2d::CCArray::addObject(v8, v14);
std::string::~string((int)&v80);
std::string::~string((int)&v77);
v77 = 0;
v78 = 0;
v79 = 0;
std::string::__init(&v77, "...", 3u);
v80 = 0;
v81 = 0;
v82 = 0;
std::string::__init(
&v80,
"Complete the Chaos Gauntlet, and the key will be yours...",
0x5Bu);
LOWORD(v67) = -1;
BYTE2(v67) = -1;
v15 = (cocos2d::CCObject *)DialogObject::create((int)&v77, (int)&v80, 15, 1065353216, 0, v67);
cocos2d::CCArray::addObject(v8, v15);
LABEL_9:
std::string::~string((int)&v80);
std::string::~string((int)&v77);
LABEL_15:
v35 = DialogLayer::createWithObjects(v8, (cocos2d::CCArray *)byte_4, v7);
(*(void (__fastcall **)(cocos2d::CCNode *, cocos2d::CCDirector *, int))(*(_DWORD *)v2 + 232))(v2, v35, 100);
DialogLayer::updateChatPlacement(v35, 0);
return DialogLayer::animateIn(v35, 1u);
}
v16 = (GameManager *)GameManager::sharedState(isItemUnlocked);
v17 = 100;
v18 = 255;
GameManager::setUGV(v16, "14", (_BYTE *)&dword_0 + 1);
}
else if ( v5 == (cocos2d::CCArray *)((char *)&dword_0 + 2) )
{
v19 = (GameStatsManager *)GameStatsManager::sharedState(v6);
v20 = (GameManager *)GameStatsManager::isItemUnlocked(v19, 12, 2);
if ( !v20 )
{
v77 = 0;
v78 = 0;
v79 = 0;
std::string::__init(&v77, "...", 3u);
v80 = 0;
v81 = 0;
v82 = 0;
std::string::__init(&v80, "They tried to hide it from me,\nbut I have my spies.", 0x43u);
LOWORD(v65) = -1;
BYTE2(v65) = -1;
v21 = (cocos2d::CCObject *)DialogObject::create((int)&v77, (int)&v80, 15, 1065353216, 0, v65);
cocos2d::CCArray::addObject(v8, v21);
std::string::~string((int)&v80);
std::string::~string((int)&v77);
v77 = 0;
v78 = 0;
v79 = 0;
std::string::__init(&v77, "...", 3u);
v80 = 0;
v81 = 0;
v82 = 0;
std::string::__init(&v80, "The second key is locked away in a secret chest.", 0x40u);
LOWORD(v68) = -1;
BYTE2(v68) = -1;
v22 = (cocos2d::CCObject *)DialogObject::create((int)&v77, (int)&v80, 15, 1065353216, 0, v68);
cocos2d::CCArray::addObject(v8, v22);
std::string::~string((int)&v80);
std::string::~string((int)&v77);
v77 = 0;
v78 = 0;
v79 = 0;
std::string::__init(&v77, "...", 3u);
v80 = 0;
v81 = 0;
v82 = 0;
std::string::__init(&v80, "Unlock 50 secret chests to claim the key.", 0x39u);
LOWORD(v69) = -1;
BYTE2(v69) = -1;
v23 = (cocos2d::CCObject *)DialogObject::create((int)&v77, (int)&v80, 15, 1065353216, 0, v69);
cocos2d::CCArray::addObject(v8, v23);
goto LABEL_9;
}
v24 = (GameManager *)GameManager::sharedState(v20);
v18 = 50;
v17 = 255;
GameManager::setUGV(v24, "15", (_BYTE *)&dword_0 + 1);
v3 = 50;
}
else
{
if ( v5 != (cocos2d::CCArray *)((char *)&dword_0 + 3) )
goto LABEL_15;
v25 = (GameStatsManager *)GameStatsManager::sharedState(v6);
v26 = (GameManager *)GameStatsManager::isItemUnlocked(v25, 12, 3);
if ( !v26 )
{
v77 = 0;
v78 = 0;
v79 = 0;
std::string::__init(&v77, "...", 3u);
v80 = 0;
v81 = 0;
v82 = 0;
std::string::__init(
&v80,
"The third key is hidden well.\nEven I have not been able to find it.",
0x51u);
LOWORD(v65) = -1;
BYTE2(v65) = -1;
v27 = (cocos2d::CCObject *)DialogObject::create((int)&v77, (int)&v80, 15, 1063675494, 0, v65);
cocos2d::CCArray::addObject(v8, v27);
std::string::~string((int)&v80);
std::string::~string((int)&v77);
v77 = 0;
v78 = 0;
v79 = 0;
std::string::__init(&v77, "...", 3u);
v80 = 0;
v81 = 0;
v82 = 0;
std::string::__init(
&v80,
"I suspect it is guarded by The Gatekeeper.\nRubRub's trusted pet....",
0x6Bu);
LOWORD(v70) = -1;
BYTE2(v70) = -1;
v28 = (cocos2d::CCObject *)DialogObject::create((int)&v77, (int)&v80, 15, 1061997773, 0, v70);
cocos2d::CCArray::addObject(v8, v28);
std::string::~string((int)&v80);
std::string::~string((int)&v77);
v77 = 0;
v78 = 0;
v79 = 0;
std::string::__init(&v77, "...", 3u);
v80 = 0;
v81 = 0;
v82 = 0;
std::string::__init(&v80, "To claim the key you must fool him.\nI do not know how.", 0x44u);
LOWORD(v71) = -1;
BYTE2(v71) = -1;
v29 = (cocos2d::CCObject *)DialogObject::create((int)&v77, (int)&v80, 15, 1063675494, 0, v71);
cocos2d::CCArray::addObject(v8, v29);
std::string::~string((int)&v80);
std::string::~string((int)&v77);
v77 = 0;
v78 = 0;
v79 = 0;
std::string::__init(&v77, "...", 3u);
v80 = 0;
v81 = 0;
v82 = 0;
std::string::__init(&v80, "You will find The Gatekeeper at the end of the world.", 0x3Du);
LOWORD(v72) = -1;
BYTE2(v72) = -1;
v30 = (cocos2d::CCObject *)DialogObject::create((int)&v77, (int)&v80, 15, 1065353216, 0, v72);
cocos2d::CCArray::addObject(v8, v30);
std::string::~string((int)&v80);
std::string::~string((int)&v77);
v77 = 0;
v78 = 0;
v79 = 0;
std::string::__init(&v77, "...", 3u);
v80 = 0;
v81 = 0;
v82 = 0;
std::string::__init(&v80, "Touch the ground beneath the promise, and the door will be revealed.", 0x4Cu);
LOWORD(v73) = -1;
BYTE2(v73) = -1;
v31 = (cocos2d::CCObject *)DialogObject::create((int)&v77, (int)&v80, 15, 1061997773, 0, v73);
cocos2d::CCArray::addObject(v8, v31);
std::string::~string((int)&v80);
v32 = (GameManager *)std::string::~string((int)&v77);
v33 = (GameManager *)GameManager::sharedState(v32);
GameManager::setUGV(v33, "6", (_BYTE *)&dword_0 + 1);
goto LABEL_15;
}
v34 = (GameManager *)GameManager::sharedState(v26);
v18 = 0;
v17 = 200;
GameManager::setUGV(v34, "16", (_BYTE *)&dword_0 + 1);
v3 = 255;
}
(*(void (__fastcall **)(cocos2d::CCObject *, _DWORD))(*(_DWORD *)a2 + 528))(a2, 0);
v36 = (FMODAudioEngine *)(*(int (__fastcall **)(cocos2d::CCObject *, _DWORD))(*(_DWORD *)a2 + 172))(a2, 0);
v80 = 0;
v81 = 0;
v82 = 0;
v37 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(v36);
std::string::__init(&v80, "chestClick.ogg", 0xEu);
FMODAudioEngine::playEffect(v37, (int)&v80);
v38 = (FMODAudioEngine *)std::string::~string((int)&v80);
v39 = FMODAudioEngine::sharedEngine(v38);
v80 = 0;
v81 = 0;
v82 = 0;
v40 = (FMODAudioEngine *)v39;
std::string::__init(&v80, "chestOpen01.ogg", 0xFu);
FMODAudioEngine::playEffect(v40, (int)&v80);
std::string::~string((int)&v80);
v41 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 256))(a2);
(*(void (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 96))(a2);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v74, v41);
v43 = cocos2d::CCParticleSystemQuad::create((cocos2d::CCParticleSystemQuad *)"coinPickupEffect.plist", nullptr, v42);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v43 + 792))(v43, 1);
v44 = *(void (__fastcall **)(int, float *))(*(_DWORD *)v43 + 680);
v86 = 1065353216;
v83 = (float)v3 / 255.0;
v84 = (float)v17 / 255.0;
v85 = (float)v18 / 255.0;
v44(v43, &v83);
(*(void (__fastcall **)(cocos2d::CCNode *, int, int))(*(_DWORD *)v2 + 232))(v2, v43, 1);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v43 + 92))(v43, v74);
v45 = CCCircleWave::create((CCCircleWave *)0x41C80000, 5.0, (cocos2d::CCActionTween *)0x3E99999A, 0.0, 0, v65);
v46 = *(_DWORD *)v45;
v47 = v45;
*((_BYTE *)v45 + 280) = v3;
*((_BYTE *)v45 + 282) = v18;
*((_BYTE *)v45 + 281) = v17;
(*(void (__fastcall **)(CCCircleWave *, _BYTE *))(v46 + 92))(v45, v74);
(*(void (__fastcall **)(cocos2d::CCNode *, CCCircleWave *, _DWORD))(*(_DWORD *)v2 + 232))(v2, v47, 0);
v48 = CCCircleWave::create((CCCircleWave *)0x40A00000, 1114636288, (cocos2d::CCActionTween *)0x3E99999A, 0.0, v64);
v49 = *(_DWORD *)v48;
v50 = v48;
*((_BYTE *)v48 + 280) = v3;
*((_BYTE *)v48 + 282) = v18;
*((_BYTE *)v48 + 281) = v17;
(*(void (__fastcall **)(CCCircleWave *, _BYTE *))(v49 + 92))(v48, v74);
v51 = (GameManager *)(*(int (__fastcall **)(cocos2d::CCNode *, CCCircleWave *, _DWORD))(*(_DWORD *)v2 + 232))(
v2,
v50,
0);
*((_DWORD *)v50 + 73) = 1;
*((_DWORD *)v50 + 74) = 4;
v52 = (GameManager *)GameManager::sharedState(v51);
UGV = (GameManager *)GameManager::getUGV(v52, "14");
v54 = (GameManager *)GameManager::sharedState(UGV);
v55 = (GameManager *)GameManager::getUGV(v54, "15");
v56 = (char *)v55 + (_DWORD)UGV;
v57 = (GameManager *)GameManager::sharedState(v55);
if ( &v56[GameManager::getUGV(v57, "16")] == (_BYTE *)&dword_0 + 3 )
{
v59 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create((cocos2d::CCDelayTime *)0x3F800000, v58);
v76 = 0;
v75 = SecretLayer3::revealStep1;
v60 = SecretLayer3::revealStep1;
}
else
{
*((_BYTE *)v2 + 324) = 1;
v59 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create((cocos2d::CCDelayTime *)0x3F000000, v58);
v84 = 0.0;
v83 = COERCE_FLOAT(SecretLayer3::showUnlockDialog);
v60 = SecretLayer3::showUnlockDialog;
}
v61 = v59;
v62 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(v2, v60, 0);
v63 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v61, v62, 0);
return cocos2d::CCNode::runAction(v2, v63);
}
return this;
}