//
// FriendsProfilePage::onSwitchList from 0x140216fa0 to 0x140217052 (178 bytes)
//
// 4 xrefs:
// > FriendsProfilePage::init @ 0x140213cb5
// > ??> @ 0x1408a56b0
// > ??> @ 0x1408a56c0
// > ??> @ 0x14091b7a0
//
// 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:28:21 +0000
//
__int64 __fastcall FriendsProfilePage::onSwitchList(__int64 a1, __int64 a2)
{
__int64 result; // rax
__int64 v4; // rcx
unsigned int v5; // esi
__int64 v6; // rax
struct cocos2d::CCObject *v7; // rbx
cocos2d::CCTouchDispatcher *v8; // rax
__int64 v9; // rcx
__int64 v10; // rax
cocos2d::CCTouchDispatcher *v11; // rax
void *v12; // rax
__int64 v13; // rdx
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);
v5 = result;
if ( (_DWORD)result != *(_DWORD *)(a1 + 816) )
{
v6 = cocos2d::CCDirector::sharedDirector(v4);
v7 = *(struct cocos2d::CCObject **)(a1 + 832);
v8 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 144LL))(v6);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v8, v7);
v10 = cocos2d::CCDirector::sharedDirector(v9);
v11 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v10 + 144LL))(v10);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v11, (struct cocos2d::CCObject *)a1);
v12 = FriendsProfilePage::create(v5);
(*(void (__fastcall **)(void *))(*(_QWORD *)v12 + 1064LL))(v12);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 992LL))(a1, 0);
LOBYTE(v13) = 1;
return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 520LL))(a1, v13);
}
return result;
}