//
// GJMultiplayerManager::exitLobby from 0xac6b44 to 0xac6da8 (612 bytes)
//
// 2 xrefs:
// > MPLobbyLayer::tryExitLobby @ 0xb05cc4
// > ??> @ 0x7d548
//
// 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:07 +0000
//
__int64 __fastcall GJMultiplayerManager::exitLobby(GJMultiplayerManager *this, const char *a2)
{
unsigned int v3; // w23
cocos2d::CCString *v4; // x0
char *CString; // x21
_BOOL4 isDLActive; // w1
__int64 result; // x0
cocos2d::CCString *v8; // x0
__int64 v9; // x0
cocos2d::CCString *v10; // x0
size_t v11; // x0
size_t v12; // x0
char *v13; // [xsp+48h] [xbp+48h]
__int64 v14; // [xsp+58h] [xbp+58h] BYREF
size_t v15; // [xsp+60h] [xbp+60h]
void *v16; // [xsp+68h] [xbp+68h]
__int64 v17[2]; // [xsp+70h] [xbp+70h] BYREF
void *v18; // [xsp+80h] [xbp+80h]
__int64 v19; // [xsp+88h] [xbp+88h] BYREF
size_t v20; // [xsp+90h] [xbp+90h]
void *v21; // [xsp+98h] [xbp+98h]
__int64 v22[2]; // [xsp+A0h] [xbp+A0h] BYREF
void *v23; // [xsp+B0h] [xbp+B0h]
v3 = (unsigned int)a2;
v4 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i_exitLobby", a2);
CString = (char *)cocos2d::CCString::getCString(v4);
isDLActive = GJMultiplayerManager::isDLActive(this, CString);
result = 0;
if ( !isDLActive )
{
GJMultiplayerManager::addDLToActive(this, CString);
GJMultiplayerManager::getBasePostString(&v14);
v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)off_50 + 7,
"mfv",
"3899",
103,
99,
"9");
v9 = cocos2d::CCString::getCString(v8);
v10 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&gameID=%i&secret=%s",
(const char *)v3,
v9);
v13 = (char *)cocos2d::CCString::getCString(v10);
v11 = strlen(v13);
std::string::append((__int64)&v14, v13, v11);
v17[0] = 0;
v17[1] = 0;
v18 = nullptr;
std::string::__init(v17, "https://www.geometrydash.com/database/exitMPLobby.php", 0x35u);
v19 = 0;
v20 = 0;
v21 = nullptr;
if ( (v14 & 1) != 0 )
{
std::string::__init(&v19, v16, v15);
}
else
{
v21 = v16;
v19 = v14;
v20 = v15;
}
v22[0] = 0;
v22[1] = 0;
v23 = nullptr;
v12 = strlen(CString);
std::string::__init(v22, CString, v12);
GJMultiplayerManager::ProcessHttpRequest(this, v17, (__int64)&v19, (__int64)v22, 64);
if ( (v22[0] & 1) != 0 )
operator delete(v23);
if ( (v19 & 1) != 0 )
operator delete(v21);
if ( (v17[0] & 1) != 0 )
operator delete(v18);
if ( (v14 & 1) != 0 )
operator delete(v16);
return 1;
}
return result;
}