//
// GJPathPage::unlockAnimationFinished from 0x1002ecbd0 to 0x1002ecd23 (339 bytes)
//
// 1 xrefs:
// > GJPathPage::playUnlockAnimation @ 0x1002ec143
//
// 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:28:24 +0000
//
__int64 __fastcall GJPathPage::unlockAnimationFinished(__int64 a1)
{
unsigned int v2; // r14d
__int64 v3; // rdi
__int16 *v4; // rsi
__int64 v5; // rax
__int64 v6; // rax
__int64 v7; // rax
_BYTE *v8; // r14
__int64 v9; // rax
__int64 v10; // rax
char *v11; // r14
char *v12; // rbx
__int16 v14; // [rsp+Ch] [rbp-14h] BYREF
char v15; // [rsp+Eh] [rbp-12h]
*(_BYTE *)(a1 + 692) = 0;
v2 = *(_DWORD *)(a1 + 688) + 29;
v3 = GameStatsManager::sharedState();
v4 = (__int16 *)v2;
GameStatsManager::updateActivePath(v3, v2);
if ( !*(_BYTE *)(a1 + 692) )
{
v5 = cocos2d::CCDirector::sharedDirector(v3, v2);
v6 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 160LL))(v5);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v6, a1);
cocos2d::CCNode::stopAllActions(a1);
cocos2d::CCNode::unscheduleAllSelectors(a1);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1072LL))(a1, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 528LL))(a1, 1);
v7 = *(_QWORD *)(a1 + 680);
v15 = -1;
v14 = -1;
v3 = *(_QWORD *)(v7 + 672);
v4 = &v14;
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v3 + 960LL))(v3, &v14);
}
v8 = *(_BYTE **)(a1 + 680);
v8[680] = 0;
v9 = cocos2d::CCDirector::sharedDirector(v3, v4);
v10 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 160LL))(v9);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v10, v8);
cocos2d::CCNode::stopAllActions((__int64)v8);
cocos2d::CCNode::unscheduleAllSelectors((__int64)v8);
(*(void (__fastcall **)(_BYTE *, _QWORD))(*(_QWORD *)v8 + 1072LL))(v8, 0);
(*(void (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v8 + 528LL))(v8, 1);
v11 = GJPathsLayer::create();
v11[596] = 1;
(*(void (__fastcall **)(char *))(*(_QWORD *)v11 + 1312LL))(v11);
v12 = GJPathPage::create(*(_DWORD *)(a1 + 688), (__int64)v11);
v12[596] = 1;
(*(void (__fastcall **)(char *))(*(_QWORD *)v12 + 1312LL))(v12);
return GJPathPage::unlockAnimationStep3(v12);
}