//
// SecretLayer4::onBack from 0x140588d00 to 0x140588db2 (178 bytes)
//
// 3 xrefs:
// > SecretLayer4::keyBackClicked @ 0x140588dc9
// > SecretLayer4::init @ 0x140586012
// > ??> @ 0x14092cac8
//
// 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:28 +0000
//
void __fastcall SecretLayer4::onBack(__int64 a1)
{
__int64 v2; // rcx
__int64 v3; // rdx
__int64 v4; // r8
__int64 v5; // r9
struct cocos2d::CCScene *v6; // rax
struct cocos2d::CCScene *v7; // rbx
__int64 v8; // rcx
cocos2d::CCDirector *v9; // rax
void *v10; // [rsp+30h] [rbp+8h]
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 456) + 1032LL))(*(_QWORD *)(a1 + 456), 0);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 992LL))(a1, 0);
v2 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v10 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v10);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v2 = qword_14090BFD0;
}
GameManager::fadeInMenuMusic(v2);
v6 = (struct cocos2d::CCScene *)LevelSelectLayer::scene(23, v3, v4, v5);
v7 = cocos2d::CCTransitionFade::create(0.5, v6);
v9 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v8);
cocos2d::CCDirector::replaceScene(v9, v7);
*(_BYTE *)(a1 + 488) = 1;
}