//
// LevelEditorLayer::onPausePlaytest from 0x1403ffb00 to 0x1403ffcaf (431 bytes)
//
// 5 xrefs:
// > EditorUI::onPlaytest @ 0x1401b480b
// > EditorUI::handleAction @ 0x1401c1d05
// > ??> @ 0x1408c6944
// > ??> @ 0x1408c6954
// > ??> @ 0x140925988
//
// 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:31:54 +0000
//
__int64 __fastcall LevelEditorLayer::onPausePlaytest(__int64 a1)
{
__int64 v2; // rax
__int64 v3; // rdi
__int64 v4; // rdx
__int64 v5; // rcx
__int64 v6; // r8
__int64 v7; // r9
bool v8; // zf
__int64 v9; // rax
__int64 v10; // rsi
__int64 v11; // rdi
__int64 v12; // rax
__int64 v13; // rax
__int64 v14; // rcx
__int64 v15; // rdx
cocos2d::CCDirector *v16; // rax
__int64 v17; // rcx
cocos2d::CCNode *v18; // rcx
__int64 v19; // rax
__int64 v20; // rdx
__int64 v21; // rcx
__int64 result; // rax
v2 = cocos2d::CCDirector::sharedDirector(a1);
*(_BYTE *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 176LL))(v2) + 156) = 0;
v3 = *(_QWORD *)(a1 + 13888);
*(_QWORD *)(v3 + 584) = -1;
*(_WORD *)(v3 + 578) = 0;
*(_BYTE *)(v3 + 580) = 0;
UILayer::resetUINodeState(v3);
UILayer::toggleMenuVisibility(v3, 0);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v3 + 336LL))(v3, 0);
*(_BYTE *)(cocos2d::CCEGLView::sharedOpenGLView(v5, v4, v6, v7) + 237) = 0;
v8 = *(_BYTE *)(v3 + 626) == 0;
*(_BYTE *)(v3 + 627) = 0;
if ( v8
&& *(_BYTE *)(v3 + 596)
&& (v9 = *(_QWORD *)(v3 + 640)) != 0
&& ((v10 = v9 + 72, v11 = v9 + 104, *(_QWORD *)(v9 + 88)) || *(_QWORD *)(v9 + 120)) )
{
v12 = GJKeybindManager::sharedState();
GJKeybindManager::applyMovementOverride(v12, v10, v11);
}
else
{
v13 = GJKeybindManager::sharedState();
GJKeybindManager::clearMovementOverride(v13);
}
LevelEditorLayer::quickUpdateAllPositions((_QWORD *)a1);
if ( *(_BYTE *)(a1 + 14680) )
{
v15 = *(_QWORD *)(a1 + 12672);
*(_BYTE *)(a1 + 14680) = 0;
GJBaseGameLayer::removeObjectFromSection(a1, v15);
GJBaseGameLayer::removeObjectFromSection(a1, *(_QWORD *)(a1 + 12680));
}
if ( *(_BYTE *)(a1 + 14673) )
{
v16 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v14);
cocos2d::CCDirector::resetSmoothFixCounter(v16);
*(_BYTE *)(cocos2d::CCDirector::sharedDirector(v17) + 178) = 0;
}
v18 = *(cocos2d::CCNode **)(a1 + 3512);
*(_DWORD *)(a1 + 2204) = 2;
cocos2d::CCNode::pauseSchedulerAndActions(v18);
cocos2d::CCNode::pauseSchedulerAndActions(*(cocos2d::CCNode **)(a1 + 3520));
*(_DWORD *)(a1 + 14880) = *(_DWORD *)(a1 + 816);
v19 = *(_QWORD *)a1;
*(_BYTE *)(a1 + 2214) = 1;
(*(void (__fastcall **)(__int64))(v19 + 1312))(a1);
*(_DWORD *)(a1 + 14884) = *(_DWORD *)(a1 + 424);
result = GJBaseGameLayer::pauseAudio(v21, v20);
if ( *(_BYTE *)(a1 + 14667) )
*(_BYTE *)(a1 + 14840) = 1;
return result;
}