//
// LevelSelectLayer::scene from 0x10041f140 to 0x10041f252 (274 bytes)
//
// 8 xrefs:
// > LevelAreaLayer::onBack @ 0x100264cff
// > LevelAreaLayer::keyBackClicked @ 0x1002660bf
// > sub_1002660F0 @ 0x100266137
// > GameManager::returnToLastScene @ 0x100376b4c
// > MenuLayer::onPlay @ 0x10037c26d
// > SecretLayer4::onBack @ 0x10039b4d4
// > SecretLayer4::keyBackClicked @ 0x10039e494
// > sub_10039E4C0 @ 0x10039e50c
//
// 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 12:30:14 +0000
//
_BYTE *__fastcall LevelSelectLayer::scene(__int64 a1, __int64 a2)
{
_BYTE *v2; // rbx
_QWORD *v3; // r14
v2 = cocos2d::CCScene::create();
*(_QWORD *)(AppDelegate::get(a1, a2) + 72) = v2;
v3 = operator new(0x1E0u);
cocos2d::CCLayer::CCLayer(v3);
*v3 = off_100B41038;
v3[40] = off_100B414D8;
v3[41] = &off_100B41548;
v3[42] = off_100B41560;
v3[43] = off_100B41580;
v3[44] = off_100B415A8;
v3[51] = off_100B415D8;
v3[52] = &off_100B41608;
*((_DWORD *)v3 + 106) = 0;
v3[59] = 0;
*((_OWORD *)v3 + 27) = 0;
*((_OWORD *)v3 + 28) = 0;
*((_BYTE *)v3 + 464) = 0;
if ( (unsigned __int8)LevelSelectLayer::init(v3, (unsigned int)a1) )
{
cocos2d::CCObject::autorelease(v3);
}
else
{
(*(void (__fastcall **)(_QWORD *))(*v3 + 16LL))(v3);
v3 = nullptr;
}
(*(void (__fastcall **)(_BYTE *, _QWORD *))(*(_QWORD *)v2 + 456LL))(v2, v3);
return v2;
}