//
// GJMultiplayerManager::exitLobby from 0x10073a760 to 0x10073a9b3 (595 bytes)
//
// 1 xrefs:
// > MPLobbyLayer::tryExitLobby @ 0x10048b01d
//
// 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:36:26 +0000
//
bool __fastcall GJMultiplayerManager::exitLobby(__int64 a1)
{
__int64 v1; // rax
const char *CString; // r14
__int64 v3; // rax
void *v4; // rax
__int64 v5; // rax
__int64 v6; // rax
const std::string::value_type *v7; // rax
size_t v8; // rax
size_t v9; // r15
char *v10; // r12
size_t v11; // r13
char v13; // [rsp+0h] [rbp-A0h]
char v14; // [rsp+0h] [rbp-A0h]
std::string v15; // [rsp+18h] [rbp-88h] BYREF
__int128 v16; // [rsp+30h] [rbp-70h] BYREF
void *data; // [rsp+40h] [rbp-60h]
_QWORD __dst[2]; // [rsp+48h] [rbp-58h] BYREF
void *__p; // [rsp+58h] [rbp-48h]
std::string v20; // [rsp+60h] [rbp-40h] BYREF
v1 = sub_10088E820("%i_exitLobby", v13);
CString = (const char *)cocos2d::CCString::getCString(v1);
v3 = sub_1007399B0(a1, CString);
if ( !v3 )
{
v4 = cocos2d::CCNode::create();
sub_100739AC0(a1, CString, (__int64)v4);
GJMultiplayerManager::getBasePostString(&v20);
v5 = sub_10088E820("%c%s%s%c%c%s", (char)"9");
cocos2d::CCString::getCString(v5);
v6 = sub_10088E820("&gameID=%i&secret=%s", v14);
v7 = (const std::string::value_type *)cocos2d::CCString::getCString(v6);
std::string::append(&v20, v7);
v15.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x38u);
v15.__r_.__value_.__r.__words[0] = 57;
v15.__r_.__value_.__l.__size_ = 53;
strcpy(v15.__r_.__value_.__l.__data_, "https://www.geometrydash.com/database/exitMPLobby.php");
if ( (*(_BYTE *)&v20.__r_.__value_.__s.0 & 1) != 0 )
{
sub_10001AD30(&v16, v20.__r_.__value_.__l.__data_, v20.__r_.__value_.__l.__size_);
}
else
{
data = v20.__r_.__value_.__l.__data_;
v16 = *(_OWORD *)&v20.__r_.__value_.__l.0;
}
v8 = strlen(CString);
if ( v8 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v9 = v8;
if ( v8 >= 0x17 )
{
v11 = 26;
if ( (v8 | 7) != 0x17 )
v11 = (v8 | 7) + 1;
v10 = (char *)operator new(v11);
__p = v10;
__dst[0] = v11 | 1;
__dst[1] = v9;
}
else
{
LOBYTE(__dst[0]) = 2 * v8;
v10 = (char *)__dst + 1;
if ( !v8 )
{
LABEL_13:
v10[v9] = 0;
GJMultiplayerManager::ProcessHttpRequest(a1, &v15, (__int64)&v16, (__int64)__dst, 64);
if ( (__dst[0] & 1) != 0 )
{
operator delete(__p);
if ( (v16 & 1) == 0 )
{
LABEL_15:
if ( (*(_BYTE *)&v15.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_16;
goto LABEL_22;
}
}
else if ( (v16 & 1) == 0 )
{
goto LABEL_15;
}
operator delete(data);
if ( (*(_BYTE *)&v15.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_16:
if ( (*(_BYTE *)&v20.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_18:
v3 = 0;
return v3 == 0;
}
LABEL_17:
operator delete(v20.__r_.__value_.__l.__data_);
goto LABEL_18;
}
LABEL_22:
operator delete(v15.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v20.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_18;
goto LABEL_17;
}
}
memmove(v10, CString, v9);
goto LABEL_13;
}
return v3 == 0;
}