//
// LevelPage::playStep3 from 0x1404471e0 to 0x1404472d6 (246 bytes)
//
// 2 xrefs:
// > LevelPage::playStep2 @ 0x140447198
// > ??> @ 0x14092723c
//
// 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:23 +0000
//
// Hidden C++ exception states: #wind=2
bool __fastcall LevelPage::playStep3(__int64 a1)
{
__int64 v2; // rax
unsigned int v3; // ebx
__int64 v4; // rax
__int64 MainLevelString; // rax
__int64 v6; // rbx
void **v7; // rcx
void *v8; // rdx
struct cocos2d::CCScene *v9; // rax
struct cocos2d::CCScene *v10; // rbx
__int64 v11; // rcx
cocos2d::CCDirector *v12; // rax
_BYTE v14[40]; // [rsp+20h] [rbp-28h] BYREF
void *v15; // [rsp+50h] [rbp+8h]
v2 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v15 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v15);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v2 = qword_14090BFD0;
}
*(_DWORD *)(v2 + 740) = 9;
v3 = *(_DWORD *)(*(_QWORD *)(a1 + 424) + 328LL) - *(_DWORD *)(*(_QWORD *)(a1 + 424) + 332LL);
v4 = LocalLevelManager::sharedState(a1);
MainLevelString = LocalLevelManager::getMainLevelString(v4, v14, v3);
v6 = MainLevelString;
v7 = (void **)(*(_QWORD *)(a1 + 424) + 408LL);
if ( v7 != (void **)MainLevelString )
{
v8 = (void *)MainLevelString;
if ( *(_QWORD *)(MainLevelString + 24) > 0xFu )
v8 = *(void **)MainLevelString;
sub_1400405A0(v7, v8, *(_QWORD *)(MainLevelString + 16));
}
sub_14003D310(v6);
v9 = (struct cocos2d::CCScene *)PlayLayer::scene(*(_QWORD *)(a1 + 424), 0);
v10 = cocos2d::CCTransitionFade::create(0.5, v9);
v12 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v11);
return cocos2d::CCDirector::replaceScene(v12, v10);
}