//
// PlayLayer::resume from 0x14051aa00 to 0x14051ad4b (843 bytes)
//
// 2 xrefs:
// > PauseLayer::onResume @ 0x1404dad3b
// > ??> @ 0x14092ae54
//
// 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:33:35 +0000
//
// Hidden C++ exception states: #wind=7
void __fastcall PlayLayer::resume(__int64 a1)
{
__int64 v2; // rcx
__int64 v3; // rdi
__int64 v4; // rax
__int64 v5; // rdx
__int64 v6; // rcx
__int64 v7; // r8
__int64 v8; // r9
__int64 v9; // rcx
__int64 v10; // rdx
__int64 v11; // rcx
__int64 v12; // r8
__int64 v13; // r9
cocos2d::CCEGLView *v14; // rax
__int64 v15; // rcx
__int64 v16; // rcx
__int64 v17; // rdx
__int64 v18; // r8
__int64 v19; // r9
cocos2d::CCEGLView *v20; // rax
__int64 v21; // rcx
__int64 v22; // rcx
__int64 v23; // rcx
__int64 v24; // rdx
__int64 v25; // rdx
struct __timeb64 Time; // [rsp+20h] [rbp-28h] BYREF
if ( *(_BYTE *)(cocos2d::CCApplication::sharedApplication(a1) + 225) )
{
if ( *(_BYTE *)(a1 + 13130) )
{
v3 = qword_14090BF60;
if ( !qword_14090BF60 )
{
Time.time = (__time64_t)operator new(0x8A8u);
qword_14090BF60 = FMODAudioEngine::FMODAudioEngine(Time.time);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);
v3 = qword_14090BF60;
}
if ( *(_BYTE *)(v3 + 617) )
{
*(_BYTE *)(v3 + 617) = 0;
FMOD::ChannelControl::setPaused(*(_QWORD *)(v3 + 552), 0);
FMOD::ChannelControl::setPaused(*(_QWORD *)(v3 + 584), 0);
v3 = qword_14090BF60;
}
if ( !v3 )
{
Time.time = (__time64_t)operator new(0x8A8u);
qword_14090BF60 = FMODAudioEngine::FMODAudioEngine(Time.time);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);
v3 = qword_14090BF60;
}
FMOD::System::update(*(_QWORD *)(v3 + 560));
}
else
{
*(_DWORD *)(a1 + 13220) = 2;
*(_BYTE *)(a1 + 14438) = 1;
}
v4 = qword_14090BF60;
if ( !qword_14090BF60 )
{
Time.time = (__time64_t)operator new(0x8A8u);
qword_14090BF60 = FMODAudioEngine::FMODAudioEngine(Time.time);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);
v4 = qword_14090BF60;
}
*(_BYTE *)(a1 + 14944) = *(float *)(v4 + 512) <= 0.0;
*(_BYTE *)(a1 + 15431) = 0;
*(_BYTE *)(a1 + 2214) = *(_BYTE *)(a1 + 13130);
*(_BYTE *)(cocos2d::CCDirector::sharedDirector(v2) + 178) = 1;
*(_BYTE *)(cocos2d::CCEGLView::sharedOpenGLView(v6, v5, v7, v8) + 237) = 1;
v9 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
Time.time = (__time64_t)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(Time.time);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v9 = qword_14090BFD0;
}
if ( GameManager::getGameVariable(v9, "0128") )
{
v14 = (cocos2d::CCEGLView *)cocos2d::CCEGLView::sharedOpenGLView(v11, v10, v12, v13);
cocos2d::CCEGLView::toggleLockCursor(v14, 1);
}
else
{
v16 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
Time.time = (__time64_t)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(Time.time);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v16 = qword_14090BFD0;
}
if ( !GameManager::getGameVariable(v16, "0024") )
{
v20 = (cocos2d::CCEGLView *)cocos2d::CCEGLView::sharedOpenGLView(v15, v17, v18, v19);
cocos2d::CCEGLView::showCursor(v20, 0);
}
}
*(_BYTE *)(cocos2d::CCApplication::sharedApplication(v15) + 225) = 0;
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 696LL))(a1);
PlayerObject::refreshStreakState(*(_QWORD *)(a1 + 3512));
if ( *(_BYTE *)(a1 + 1058) )
PlayerObject::refreshStreakState(*(_QWORD *)(a1 + 3520));
PlayerObject::releaseAllButtons(*(_QWORD *)(a1 + 3512));
v21 = *(_QWORD *)(a1 + 3520);
if ( v21 )
PlayerObject::releaseAllButtons(v21);
v22 = *(_QWORD *)(a1 + 13888);
if ( *(_BYTE *)(v22 + 596) )
UILayer::resolveLevelControls(v22);
v23 = *(_QWORD *)(a1 + 13888);
*(_QWORD *)(v23 + 584) = -1;
*(_WORD *)(v23 + 578) = 0;
*(_BYTE *)(v23 + 580) = 0;
UILayer::resetUINodeState(v23);
LOBYTE(v24) = 1;
UILayer::toggleMenuVisibility(*(_QWORD *)(a1 + 13888), v24);
ftime64(&Time);
*(double *)(a1 + 15416) = (double)Time.millitm / 1000.0
+ (double)SLODWORD(Time.time)
- *(double *)(a1 + 15400)
+ *(double *)(a1 + 15416);
PlayLayer::updateTestModeLabel(a1, v25);
}
}