//
// GauntletLayer::scene from 0x1402fab50 to 0x1402fac86 (310 bytes)
//
// 3 xrefs:
// > GauntletSelectLayer::onPlay @ 0x1402ffe9c
// > LevelInfoLayer::onBack @ 0x140426545
// > ??> @ 0x14091e350
//
// 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:30:05 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall GauntletLayer::scene(__int64 a1, __int64 a2, __int64 a3, __int64 a4)
{
unsigned int v4; // ebx
__int64 v5; // rsi
__int64 v6; // rcx
_QWORD *v7; // rdi
v4 = a1;
v5 = cocos2d::CCScene::create(a1, a2, a3, a4);
*(_QWORD *)(cocos2d::CCApplication::sharedApplication(v6) + 232) = v5;
v7 = operator new(0x1E0u);
memset(v7, 0, 0x1E0u);
cocos2d::CCLayer::CCLayer((cocos2d::CCLayer *)v7);
*v7 = &GauntletLayer::`vftable';
v7[40] = &GauntletLayer::`vftable';
v7[41] = &GauntletLayer::`vftable';
v7[42] = &GauntletLayer::`vftable';
v7[43] = &GauntletLayer::`vftable';
v7[44] = &GauntletLayer::`vftable';
v7[51] = &GauntletLayer::`vftable';
v7[52] = 0;
v7[53] = 0;
v7[55] = 0;
v7[56] = 0;
v7[57] = 0;
v7[58] = 0;
v7[59] = 0;
if ( (unsigned __int8)GauntletLayer::init(v7, v4) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v7);
}
else
{
(*(void (__fastcall **)(_QWORD *, __int64))(*v7 + 8LL))(v7, 1);
v7 = nullptr;
}
(*(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v5 + 464LL))(v5, v7);
return v5;
}