//
// GauntletLayer::onLevel from 0x1402fcb90 to 0x1402fcbff (111 bytes)
//
// 2 xrefs:
// > GauntletLayer::setupGauntlet @ 0x1402fbf5d
// > ??> @ 0x14091e38c
//
// 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:06 +0000
//
// Hidden C++ exception states: #wind=1
char __fastcall GauntletLayer::onLevel(__int64 a1, __int64 a2)
{
cocos2d::CCArray *v2; // rbx
unsigned int v3; // eax
struct cocos2d::CCObject *v4; // rbx
__int64 v5; // r8
__int64 v6; // r9
_QWORD *v7; // rcx
void *v9; // [rsp+30h] [rbp+8h]
v2 = *(cocos2d::CCArray **)(a1 + 416);
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);
v4 = cocos2d::CCArray::objectAtIndex(v2, v3);
v7 = *(_QWORD **)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v9 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v9);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v7 = *(_QWORD **)&qword_14090BFB0;
}
return GameLevelManager::gotoLevelPage(v7, (__int64)v4, v5, v6);
}