//
// EditLevelLayer::scene from 0x1401782c0 to 0x140178493 (467 bytes)
//
// 7 xrefs:
// > EditLevelLayer::FLAlert_Clicked @ 0x14017c396
// > GameLevelManager::gotoLevelPage @ 0x140221406
// > GameManager::returnToLastScene @ 0x1402873f8
// > LevelBrowserLayer::onNew @ 0x1403e80f1
// > LevelInfoLayer::FLAlert_Clicked @ 0x14042627d
// > UploadPopup::onReturnToLevel @ 0x140632a0b
// > ??> @ 0x1409186a4
//
// 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:27:33 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall EditLevelLayer::scene(__int64 a1, __int64 a2, __int64 a3, __int64 a4)
{
__int64 v5; // rsi
__int64 v6; // rcx
char *v7; // rdi
v5 = cocos2d::CCScene::create(a1, a2, a3, a4);
*(_QWORD *)(cocos2d::CCApplication::sharedApplication(v6) + 232) = v5;
v7 = (char *)operator new(0x258u);
cocos2d::CCLayer::CCLayer((cocos2d::CCLayer *)v7);
*(_QWORD *)v7 = &EditLevelLayer::`vftable';
*((_QWORD *)v7 + 40) = &EditLevelLayer::`vftable';
*((_QWORD *)v7 + 41) = &EditLevelLayer::`vftable';
*((_QWORD *)v7 + 42) = &EditLevelLayer::`vftable';
*((_QWORD *)v7 + 43) = &EditLevelLayer::`vftable';
*((_QWORD *)v7 + 44) = &EditLevelLayer::`vftable';
*((_QWORD *)v7 + 51) = &EditLevelLayer::`vftable';
*((_QWORD *)v7 + 52) = &EditLevelLayer::`vftable';
*((_QWORD *)v7 + 53) = &EditLevelLayer::`vftable';
*((_QWORD *)v7 + 54) = &EditLevelLayer::`vftable';
*((_QWORD *)v7 + 55) = &EditLevelLayer::`vftable';
*((_QWORD *)v7 + 56) = &EditLevelLayer::`vftable';
*((_QWORD *)v7 + 57) = &EditLevelLayer::`vftable';
*((_QWORD *)v7 + 58) = 0;
*((_QWORD *)v7 + 59) = 0;
*((_QWORD *)v7 + 60) = 0;
*((_QWORD *)v7 + 61) = 0;
v7[496] = 0;
*((_DWORD *)v7 + 125) = 0;
*(_OWORD *)(v7 + 504) = 0;
*((_QWORD *)v7 + 65) = 0;
*((_QWORD *)v7 + 66) = 15;
v7[504] = 0;
*((_QWORD *)v7 + 67) = 0;
v7[544] = 0;
*((_QWORD *)v7 + 69) = 0;
*((_QWORD *)v7 + 70) = 0;
*(_OWORD *)(v7 + 568) = 0;
*((_QWORD *)v7 + 73) = 0;
*((_QWORD *)v7 + 74) = 15;
v7[568] = 0;
if ( (unsigned __int8)EditLevelLayer::init(v7, a1) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v7);
}
else
{
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v7 + 8LL))(v7, 1);
v7 = nullptr;
}
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v5 + 464LL))(v5, v7);
return v5;
}