//
// MessageThreadsPage::onClose from 0x1400d91c0 to 0x1400d92a0 (224 bytes)
//
// 5 xrefs:
// > MessageThreadsPage::keyBackClicked @ 0x1400d92a9
// > MessageThreadsPage::init @ 0x1400d4964
// > ??> @ 0x140892400
// > ??> @ 0x140892410
// > ??> @ 0x140914828
//
// 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:26:27 +0000
//
__int64 __fastcall MessageThreadsPage::onClose(struct cocos2d::CCObject *a1)
{
__int64 v1; // rax
__int64 v3; // rax
struct cocos2d::CCObject *v4; // rbx
cocos2d::CCTouchDispatcher *v5; // rax
__int64 v6; // rax
cocos2d::CCTouchDispatcher *v7; // rax
__int64 v8; // rcx
__int64 v9; // rax
__int64 v10; // rdx
__int64 v11; // rax
__int64 v12; // rcx
__int64 v13; // rdx
v1 = *((_QWORD *)a1 + 98);
if ( v1 )
{
*(_QWORD *)(v1 + 600) = 0;
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)a1 + 98) + 1032LL))(*((_QWORD *)a1 + 98), 0);
}
if ( *((_QWORD *)a1 + 86) )
{
v3 = cocos2d::CCDirector::sharedDirector(a1);
v4 = *((struct cocos2d::CCObject **)a1 + 86);
v5 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 144LL))(v3);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v5, v4);
}
v6 = cocos2d::CCDirector::sharedDirector(a1);
v7 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 144LL))(v6);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v7, a1);
v9 = GJAccountManager::sharedState(v8);
LOBYTE(v10) = 1;
v11 = ProfilePage::create((unsigned int)(*(_DWORD *)(v9 + 360) - *(_DWORD *)(v9 + 364)), v10);
v12 = *(_QWORD *)v11;
*(_BYTE *)(v11 + 596) = 1;
(*(void (__fastcall **)(__int64))(v12 + 1064))(v11);
(*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)a1 + 992LL))(a1, 0);
LOBYTE(v13) = 1;
return (*(__int64 (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)a1 + 520LL))(a1, v13);
}