//
// MPLobbyLayer::tryExitLobby from 0xb05c8c to 0xb05d94 (264 bytes)
//
// 2 xrefs:
// > MPLobbyLayer::FLAlert_Clicked @ 0xb05ddc
// > ??> @ 0x4a710
//
// This function is hookable on this platform (idp: arm, 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 13:01:23 +0000
//
__int64 __fastcall MPLobbyLayer::tryExitLobby(MPLobbyLayer *this)
{
GJMultiplayerManager *v2; // x0
GJMultiplayerManager *v3; // x0
__int64 v4; // x0
__int64 v5; // x0
char v6; // w1
__int64 v8[2]; // [xsp+30h] [xbp+30h] BYREF
void *v9; // [xsp+40h] [xbp+40h]
v2 = (GJMultiplayerManager *)GJMultiplayerManager::sharedState(_stack_chk_guard);
*((_QWORD *)v2 + 45) = (char *)this + 424;
v3 = (GJMultiplayerManager *)GJMultiplayerManager::sharedState(v2);
if ( (unsigned __int8)GJMultiplayerManager::exitLobby(v3, (const char *)*((unsigned int *)this + 112)) )
{
v4 = *((_QWORD *)this + 58);
if ( v4 )
{
*(_QWORD *)(v4 + 664) = 0;
*((_QWORD *)this + 58) = 0;
}
v8[0] = 0;
v8[1] = 0;
v9 = nullptr;
std::string::__init(v8, "Leaving game...", 0xFu);
v5 = UploadActionPopup::create((__int64)this + 416, (char *)v8);
v6 = v8[0];
*((_QWORD *)this + 58) = v5;
if ( (v6 & 1) != 0 )
{
operator delete(v9);
v5 = *((_QWORD *)this + 58);
}
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v5 + 72LL))(v5, 1);
(*(void (__fastcall **)(_QWORD))(**((_QWORD **)this + 58) + 1312LL))(*((_QWORD *)this + 58));
}
return _stack_chk_guard;
}