//
// GJPathPage::unlockAnimationFinished from 0x140396c90 to 0x140396dbf (303 bytes)
//
// 2 xrefs:
// > GJPathPage::playUnlockAnimation @ 0x140396028
// > ??> @ 0x140923108
//
// 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:13 +0000
//
// Hidden C++ exception states: #wind=1
void __fastcall GJPathPage::unlockAnimationFinished(__int64 a1)
{
int v2; // ebx
__int64 v3; // rcx
struct cocos2d::CCObject *v4; // rbx
__int64 v5; // rcx
__int64 v6; // rax
cocos2d::CCTouchDispatcher *v7; // rax
__int64 v8; // rdx
_BYTE *v9; // rbx
int *v10; // rbx
void *v11; // [rsp+30h] [rbp+8h]
*(_BYTE *)(a1 + 692) = 0;
v2 = *(_DWORD *)(a1 + 688) + 29;
v3 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v11 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480((__int64)v11);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v3 = qword_14090BFE0;
}
if ( (unsigned int)(v2 - 30) > 9 )
v2 = 0;
*(_DWORD *)(v3 + 996) = v2;
GJPathPage::onBack(a1);
*(_BYTE *)(*(_QWORD *)(a1 + 680) + 680LL) = 0;
v4 = *(struct cocos2d::CCObject **)(a1 + 680);
v6 = cocos2d::CCDirector::sharedDirector(v5);
v7 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 144LL))(v6);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v7, v4);
cocos2d::CCNode::stopAllActions(v4);
cocos2d::CCNode::unscheduleAllSelectors(v4);
(*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)v4 + 992LL))(v4, 0);
LOBYTE(v8) = 1;
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v4 + 520LL))(v4, v8);
v9 = GJPathsLayer::create();
v9[596] = 1;
(*(void (__fastcall **)(_BYTE *))(*(_QWORD *)v9 + 1064LL))(v9);
v10 = (int *)GJPathPage::create(*(_DWORD *)(a1 + 688), (__int64)v9);
*((_BYTE *)v10 + 596) = 1;
(*(void (__fastcall **)(int *))(*(_QWORD *)v10 + 1064LL))(v10);
GJPathPage::unlockAnimationStep3(v10);
}