//
// SecretLayer3::onBack from 0x140584e50 to 0x140584fbc (364 bytes)
//
// 3 xrefs:
// > SecretLayer3::keyBackClicked @ 0x140584fc9
// > SecretLayer3::init @ 0x14058103d
// > ??> @ 0x14092c9fc
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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:34:27 +0000
//
// Hidden C++ exception states: #wind=1
double __fastcall SecretLayer3::onBack(cocos2d::CCNode **a1)
{
__int64 v2; // rcx
__int64 v3; // rdx
cocos2d::CCNode *v4; // rbx
struct cocos2d::CCAction *v5; // rax
__int64 v6; // rbx
double result; // xmm0_8
struct cocos2d::CCFiniteTimeAction *v8; // rax
struct cocos2d::CCAction *v9; // rax
__int64 v10; // rdx
__int64 v11; // rcx
__int64 v12; // r8
__int64 v13; // r9
struct cocos2d::CCScene *v14; // rax
struct cocos2d::CCScene *v15; // rbx
__int64 v16; // rcx
cocos2d::CCDirector *v17; // rax
void *v18; // [rsp+30h] [rbp+8h]
if ( !*((_BYTE *)a1 + 424) )
{
v2 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v18 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v18);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v2 = qword_14090BFD0;
}
if ( GameManager::getUGV(v2, "12") )
{
(*((void (__fastcall **)(cocos2d::CCNode **, _QWORD))*a1 + 124))(a1, 0);
v14 = (struct cocos2d::CCScene *)SecretLayer2::scene(v11, v10, v12, v13);
v15 = cocos2d::CCTransitionFade::create(0.5, v14);
v17 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v16);
return cocos2d::CCDirector::replaceScene(v17, v15);
}
else
{
*((_BYTE *)a1 + 424) = 1;
cocos2d::CCNode::stopAllActions(a1[55]);
(*(void (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)a1[55] + 160LL))(a1[55]);
(*(void (__fastcall **)(__int64, _QWORD))(*((_QWORD *)a1[55] + 40) + 40LL))((__int64)a1[55] + 320, 0);
LOBYTE(v3) = 1;
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)a1[55] + 336LL))(a1[55], v3);
v4 = a1[55];
v5 = cocos2d::CCFadeIn::create(1.0);
cocos2d::CCNode::runAction(v4, v5);
v6 = cocos2d::CCCallFunc::create(a1, SecretLayer3::firstInteractionStep2);
v8 = cocos2d::CCDelayTime::create(2.0);
v9 = cocos2d::CCSequence::create(v8, v6, 0);
cocos2d::CCNode::runAction((cocos2d::CCNode *)a1, v9);
*(_QWORD *)&result = 0x40000000;
}
}
return result;
}