//
// FriendsProfilePage::onClose from 0x1006582d0 to 0x100658387 (183 bytes)
//
// 3 xrefs:
// > FriendsProfilePage::keyBackClicked @ 0x100658a85
// > sub_100658A90 @ 0x100658a9c
// > FriendsProfilePage::init @ 0x100657ee7
//
// 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
//
void __fastcall FriendsProfilePage::onClose(FriendsProfilePage *a1, cocos2d::CCObject *m_listLayer)
{
cocos2d::CCDirector *v2; // rax
cocos2d::CCTouchDispatcher *v3; // rax
cocos2d::CCDirector *v4; // rax
cocos2d::CCTouchDispatcher *v5; // rax
_BYTE *v6; // rax
GJAccountManager *v7; // rax
if ( a1->m_listLayer )
{
v2 = cocos2d::CCDirector::sharedDirector();
v3 = (cocos2d::CCTouchDispatcher *)((__int64 (__fastcall *)(cocos2d::CCDirector *, cocos2d::CCObject *))v2->getTouchDispatcher)(
v2,
m_listLayer);
m_listLayer = a1->m_listLayer;
cocos2d::CCTouchDispatcher::unregisterForcePrio(v3, m_listLayer);
}
v4 = cocos2d::CCDirector::sharedDirector();
v5 = (cocos2d::CCTouchDispatcher *)((__int64 (__fastcall *)(cocos2d::CCDirector *, cocos2d::CCObject *))v4->getTouchDispatcher)(
v4,
m_listLayer);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v5, a1);
if ( a1->m_type )
{
v6 = FriendsProfilePage::create((UserListType)0);
}
else
{
v7 = GJAccountManager::sharedState();
v6 = ProfilePage::create(v7->m_accountID - v7->m_unkInt1, 1);
v6[588] = 1;
}
(*(void (__fastcall **)(_BYTE *))(*(_QWORD *)v6 + 1288LL))(v6);
((void (__fastcall *)(FriendsProfilePage *, _QWORD))a1->setKeypadEnabled)(a1, 0);
((void (__fastcall *)(FriendsProfilePage *, __int64))a1->removeFromParentAndCleanup)(a1, 1);
}