//
// MessagesProfilePage::onClose from 0x5f0dee to 0x5f0e56 (104 bytes)
//
// 1 xrefs:
// > MessagesProfilePage::keyBackClicked @ 0x5f0e58
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:54:27 +0000
//
int __fastcall MessagesProfilePage::onClose(MessagesProfilePage *this, cocos2d::CCObject *a2)
{
MessagesProfilePage *v2; // r4
int v3; // r0
cocos2d::CCTouchDispatcher *v4; // r0
int v5; // r0
cocos2d::CCTouchDispatcher *v6; // r0
MessageThreadsPage *v7; // r0
bool v8; // r1
int *v9; // r0
v2 = this;
if ( *((_DWORD *)this + 140) )
{
v3 = cocos2d::CCDirector::sharedDirector(this);
v4 = (cocos2d::CCTouchDispatcher *)(*(int (__fastcall **)(int))(*(_DWORD *)v3 + 80))(v3);
this = (MessagesProfilePage *)cocos2d::CCTouchDispatcher::unregisterForcePrio(v4, *((cocos2d::CCObject **)v2 + 140));
}
v5 = cocos2d::CCDirector::sharedDirector(this);
v6 = (cocos2d::CCTouchDispatcher *)(*(int (__fastcall **)(int))(*(_DWORD *)v5 + 80))(v5);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v6, v2);
v7 = (MessageThreadsPage *)MessagesProfilePage::untoggleAll(v2);
if ( *((_BYTE *)v2 + 536) )
v9 = MessagesProfilePage::create(nullptr, v8);
else
v9 = (int *)MessageThreadsPage::create(v7);
(*(void (__fastcall **)(int *))(*v9 + 656))(v9);
(*(void (__fastcall **)(MessagesProfilePage *, _DWORD))(*(_DWORD *)v2 + 536))(v2, 0);
return (*(int (__fastcall **)(MessagesProfilePage *, int))(*(_DWORD *)v2 + 264))(v2, 1);
}