//
// MPLobbyLayer::tryExitLobby from 0x10048aff0 to 0x10048b0c2 (210 bytes)
//
// 2 xrefs:
// > MPLobbyLayer::FLAlert_Clicked @ 0x10048b714
// > sub_10048B720 @ 0x10048b74b
//
// 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 12:30:44 +0000
//
__int64 __fastcall MPLobbyLayer::tryExitLobby(__int64 a1)
{
__int64 v1; // rax
__int64 result; // rax
__int64 v3; // rax
char *v4; // rax
char v5; // [rsp+0h] [rbp-20h] BYREF
_BYTE v6[23]; // [rsp+1h] [rbp-1Fh] BYREF
*(_QWORD *)(GJMultiplayerManager::sharedState(a1) + 360) = a1 + 424;
v1 = GJMultiplayerManager::sharedState(a1);
result = GJMultiplayerManager::exitLobby(v1, *(unsigned int *)(a1 + 448));
if ( (_BYTE)result )
{
v3 = *(_QWORD *)(a1 + 464);
if ( v3 )
{
*(_QWORD *)(v3 + 664) = 0;
*(_QWORD *)(a1 + 464) = 0;
}
v5 = 30;
strcpy(v6, "Leaving game...");
v4 = UploadActionPopup::create(a1 + 416, (__int128 *)&v5);
*(_QWORD *)(a1 + 464) = v4;
if ( (v5 & 1) != 0 )
{
operator delete(*(void **)&v6[15]);
v4 = *(char **)(a1 + 464);
}
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v4 + 72LL))(v4, 1);
return (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 464) + 1312LL))(*(_QWORD *)(a1 + 464));
}
return result;
}