//
// GJPathPage::unlockAnimationFinished from 0x140288e70 to 0x140288f93 (291 bytes)
//
// 2 xrefs:
// > GJPathPage::playUnlockAnimation @ 0x1402882a2
// > ??> @ 0x1406d15e0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=1
void GJPathPage::unlockAnimationFinished(GJPathPage *a1)
{
int v2; // ebx
__int64 v3; // rcx
GJPathsLayer *m_pathsLayer; // rbx
__int64 v5; // rcx
__int64 v6; // rax
cocos2d::CCTouchDispatcher *v7; // rax
_BOOL8 v8; // rdx
GJPathsLayer *v9; // rbx
GJPathPage *v10; // rbx
void *v11; // [rsp+30h] [rbp+8h]
a1->m_animationPlaying = 0;
v2 = a1->m_pathNumber + 29;
v3 = qword_1406C2EE8;
if ( !qword_1406C2EE8 )
{
v11 = operator new(0x3E0u);
qword_1406C2EE8 = sub_1401D0AE0((__int64)v11);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);
v3 = qword_1406C2EE8;
}
if ( (unsigned int)(v2 - 30) > 9 )
v2 = 0;
*(_DWORD *)(v3 + 988) = v2;
GJPathPage::onBack(a1, nullptr);
a1->m_pathsLayer->m_exiting = 0;
m_pathsLayer = a1->m_pathsLayer;
v6 = cocos2d::CCDirector::sharedDirector(v5);
v7 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 144LL))(v6);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v7, m_pathsLayer);
cocos2d::CCNode::stopAllActions(m_pathsLayer);
cocos2d::CCNode::unscheduleAllSelectors(m_pathsLayer);
m_pathsLayer->setKeypadEnabled(m_pathsLayer, 0);
LOBYTE(v8) = 1;
m_pathsLayer->removeFromParentAndCleanup(m_pathsLayer, v8);
v9 = GJPathsLayer::create();
v9->m_noElasticity = 1;
v9->show(v9);
v10 = GJPathPage::create(a1->m_pathNumber, v9);
v10->m_noElasticity = 1;
v10->show(v10);
GJPathPage::unlockAnimationStep3(v10);
}