//
// sub_1003C1980 from 0x1003c1980 to 0x1003c1ae4 (356 bytes)
//
// 6 xrefs:
// > PauseLayer::tryQuit @ 0x1003c13af
// > PauseLayer::onSideButtonPressed @ 0x1003c16f3
// > PauseLayer::handleAction @ 0x1003c32e1
// > sub_1003C3300 @ 0x1003c332b
// > PauseLayer::keyDown @ 0x1003c33b2
// > PauseLayer::customSetup @ 0x1003c0201
//
// 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 12:29:33 +0000
//
__int64 __fastcall sub_1003C1980(__int64 a1)
{
__int64 v2; // rdi
__int64 v3; // rax
float v4; // xmm1_4
_OWORD *v5; // rax
__int64 v6; // r14
char v7; // di
_OWORD *v8; // r14
__int64 result; // rax
__int64 v10; // rdi
void (__fastcall *v11)(__int64, __int64); // rax
__int64 v12; // rax
__int64 v13; // rax
__int64 v14; // rbx
_OWORD *v15; // rax
__int64 v16; // [rsp+0h] [rbp-20h] BYREF
_BYTE v17[4]; // [rsp+8h] [rbp-18h] BYREF
float v18; // [rsp+Ch] [rbp-14h]
*(_BYTE *)(a1 + 586) ^= 1u;
cocos2d::CCNode::stopActionByTag(a1, 12341);
v2 = *(_QWORD *)(a1 + 632);
cocos2d::CCNode::stopActionByTag(v2, 12341);
v3 = cocos2d::CCDirector::sharedDirector(v2, 12341);
cocos2d::CCDirector::getWinSize(v17, v3);
v4 = 0.0;
if ( *(_BYTE *)(a1 + 586) )
v4 = v18;
sub_100278250((float *)&v16, 0.0, v4);
v5 = cocos2d::CCMoveTo::create(&v16, (__m128)0x3F000000u);
v6 = cocos2d::CCEaseInOut::create(v5, 2.0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v6 + 72LL))(v6, 12341);
cocos2d::CCNode::runAction(*(_QWORD *)(a1 + 632), v6);
v7 = 75;
if ( *(_BYTE *)(a1 + 586) )
v7 = 0;
v8 = cocos2d::CCFadeTo::create(v7, (__m128)0x3F000000u);
(*(void (__fastcall **)(_OWORD *, __int64))(*(_QWORD *)v8 + 72LL))(v8, 12341);
result = cocos2d::CCNode::runAction(a1, (__int64)v8);
v10 = *(_QWORD *)(a1 + 656);
if ( v10 )
{
v11 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v10 + 344LL);
if ( *(_BYTE *)(a1 + 586) == 1 )
{
v11(v10, 1);
v12 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 656) + 488LL))(*(_QWORD *)(a1 + 656));
v13 = sub_1007FEFE0(v12, 0);
v14 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v13 + 1072LL))(v13);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v14 + 912LL))(v14, 0);
v15 = cocos2d::CCFadeTo::create(125, (__m128)0x3F000000u);
return cocos2d::CCNode::runAction(v14, (__int64)v15);
}
else
{
return ((__int64 (__fastcall *)(__int64, _QWORD))v11)(v10, 0);
}
}
return result;
}