//
// MPLobbyLayer::tryExitLobby from 0x66a7b4 to 0x66a848 (148 bytes)
//
// 1 xrefs:
// > MPLobbyLayer::FLAlert_Clicked @ 0x66a868
//
// 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:55:45 +0000
//
int __fastcall MPLobbyLayer::tryExitLobby(const char **this, int a2, int a3, int a4)
{
GJMultiplayerManager *v5; // r0
GJMultiplayerManager *v6; // r0
int result; // r0
int v8; // r2
int v9; // r2
int v10; // r3
const char **v11; // [sp+0h] [bp-10h] BYREF
int v12; // [sp+4h] [bp-Ch]
int v13; // [sp+8h] [bp-8h]
int v14; // [sp+Ch] [bp-4h]
v11 = this;
v12 = a2;
v13 = a3;
v14 = a4;
v5 = (GJMultiplayerManager *)GJMultiplayerManager::sharedState((GJMultiplayerManager *)this);
*((_DWORD *)v5 + 71) = this + 81;
v6 = (GJMultiplayerManager *)GJMultiplayerManager::sharedState(v5);
result = GJMultiplayerManager::exitLobby(v6, *(this + 84));
if ( result )
{
v8 = (int)*(this + 86);
if ( v8 )
{
*(_DWORD *)(v8 + 520) = 0;
*(this + 86) = nullptr;
}
v11 = nullptr;
v12 = 0;
v13 = 0;
std::string::__init((int *)&v11, "Leaving game...", 0xFu);
*(this + 86) = (const char *)UploadActionPopup::create((int)(this + 80), (int)&v11, v9, v10);
std::string::~string((int)&v11);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 86) + 36))(*(this + 86), 1);
return (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 86) + 656))(*(this + 86));
}
return result;
}