//
// MenuLayer::dMenuLayer from 0x140471dc0 to 0x140471f0e (334 bytes)
//
// 3 xrefs:
// > sub_1404755D8 @ 0x1404755df
// > ??> @ 0x1407b43f0
// > ??> @ 0x1409281d8
//
// 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:32:39 +0000
//
// Hidden C++ exception states: #wind=1
cocos2d::CCLayer *__fastcall MenuLayer::dMenuLayer(cocos2d::CCLayer *Block, char a2)
{
__int64 v4; // rcx
void *v5; // rax
__int64 v6; // rax
void *v7; // rax
*(_QWORD *)Block = &MenuLayer::`vftable';
*((_QWORD *)Block + 40) = &MenuLayer::`vftable';
*((_QWORD *)Block + 41) = &MenuLayer::`vftable';
*((_QWORD *)Block + 42) = &MenuLayer::`vftable';
*((_QWORD *)Block + 43) = &MenuLayer::`vftable';
*((_QWORD *)Block + 44) = &MenuLayer::`vftable';
*((_QWORD *)Block + 51) = &MenuLayer::`vftable';
*((_QWORD *)Block + 52) = &MenuLayer::`vftable';
*((_QWORD *)Block + 53) = &MenuLayer::`vftable';
v4 = qword_14090C070;
if ( !qword_14090C070 )
{
v5 = operator new(0x3D0u);
qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v5);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);
v4 = qword_14090C070;
}
MusicDownloadManager::removeMusicDownloadDelegate(v4, (char *)Block + 424);
v6 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v7 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v7);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v6 = qword_14090BFD0;
}
*(_QWORD *)(v6 + 592) = 0;
MenuLayer::willClose(Block);
cocos2d::CCLayer::~CCLayer(Block);
if ( (a2 & 1) != 0 )
j_j_free(Block);
return Block;
}