//
// LevelBrowserLayer::dLevelBrowserLayer from 0x1403e1d20 to 0x1403e1f3f (543 bytes)
//
// 5 xrefs:
// > sub_1403E1CE0 @ 0x1403e1cef
// > sub_14042AB40 @ 0x14042ad2a
// > sub_1406B547D @ 0x1406b5484
// > ??> @ 0x1408c9d1c
// > ??> @ 0x140924e9c
//
// 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:31:41 +0000
//
void __fastcall LevelBrowserLayer::dLevelBrowserLayer(__int64 a1)
{
__int64 v2; // rdi
__int64 v3; // rax
cocos2d::CCTouchDispatcher *v4; // rax
cocos2d::CCNotificationCenter *v5; // rax
__int64 v6; // rcx
cocos2d::CCNotificationCenter *v7; // rax
cocos2d::CCObject *v8; // rcx
cocos2d::CCObject *v9; // rcx
cocos2d::CCObject *v10; // rcx
cocos2d::CCObject *v11; // rcx
__int64 v12; // rax
void *v13; // rax
__int64 v14; // rax
void *v15; // rax
*(_QWORD *)a1 = &LevelBrowserLayer::`vftable';
*(_QWORD *)(a1 + 320) = &LevelBrowserLayer::`vftable';
*(_QWORD *)(a1 + 328) = &LevelBrowserLayer::`vftable';
*(_QWORD *)(a1 + 336) = &LevelBrowserLayer::`vftable';
*(_QWORD *)(a1 + 344) = &LevelBrowserLayer::`vftable';
*(_QWORD *)(a1 + 352) = &LevelBrowserLayer::`vftable';
*(_QWORD *)(a1 + 408) = &LevelBrowserLayer::`vftable';
*(_QWORD *)(a1 + 432) = &LevelBrowserLayer::`vftable';
v2 = a1 + 544;
*(_QWORD *)(a1 + 544) = &LevelBrowserLayer::`vftable';
*(_QWORD *)(a1 + 552) = &LevelBrowserLayer::`vftable';
*(_QWORD *)(a1 + 560) = &LevelBrowserLayer::`vftable';
*(_QWORD *)(a1 + 568) = &LevelBrowserLayer::`vftable';
*(_QWORD *)(a1 + 576) = &LevelBrowserLayer::`vftable';
*(_QWORD *)(a1 + 584) = &LevelBrowserLayer::`vftable';
if ( *(_BYTE *)(a1 + 748) )
{
v3 = cocos2d::CCDirector::sharedDirector(a1);
v4 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 144LL))(v3);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v4, (struct cocos2d::CCObject *)a1);
}
v5 = (cocos2d::CCNotificationCenter *)cocos2d::CCNotificationCenter::sharedNotificationCenter(a1);
cocos2d::CCNotificationCenter::removeObserver(v5, (struct cocos2d::CCObject *)a1, "LevelSelectionChangedNotification");
v7 = (cocos2d::CCNotificationCenter *)cocos2d::CCNotificationCenter::sharedNotificationCenter(v6);
cocos2d::CCNotificationCenter::removeObserver(v7, (struct cocos2d::CCObject *)a1, "LevelsImportedNotification");
v8 = *(cocos2d::CCObject **)(a1 + 656);
if ( v8 )
cocos2d::CCObject::release(v8);
v9 = *(cocos2d::CCObject **)(a1 + 736);
if ( v9 )
cocos2d::CCObject::release(v9);
v10 = *(cocos2d::CCObject **)(a1 + 664);
if ( v10 )
cocos2d::CCObject::release(v10);
v11 = *(cocos2d::CCObject **)(a1 + 832);
if ( v11 )
cocos2d::CCObject::release(v11);
if ( !*(_BYTE *)(a1 + 748) )
{
v12 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v13 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v13);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v12 = qword_14090BFD0;
}
*(_DWORD *)(v12 + 740) = 7;
}
v14 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v15 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v15);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v14 = *(_QWORD *)&qword_14090BFB0;
}
if ( *(_QWORD *)(v14 + 1352) == v2 )
*(_QWORD *)(v14 + 1352) = 0;
cocos2d::CCLayerColor::~CCLayerColor((cocos2d::CCLayerColor *)a1);
}