//
// GJMultiplayerManager::joinLobby from 0x642028 to 0x642154 (300 bytes)
//
// 1 xrefs:
// > MPLobbyLayer::onUpdateLobby @ 0x66a3c8
//
// 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:29 +0000
//
int __fastcall GJMultiplayerManager::joinLobby(GJMultiplayerManager *this, const char *a2)
{
cocos2d::CCString *v4; // r0
const char *CString; // r10
int v6; // r2
int v7; // r3
char *v8; // r2
int v9; // r3
int LastCommentIDForGame; // r6
cocos2d::CCString *v11; // r0
int v12; // r0
cocos2d::CCString *v13; // r0
char *v14; // r0
size_t v15; // r0
_DWORD v17[3]; // [sp+14h] [bp-34h] BYREF
int v18[3]; // [sp+20h] [bp-28h] BYREF
int v19[3]; // [sp+2Ch] [bp-1Ch] BYREF
int v20[3]; // [sp+38h] [bp-10h] BYREF
v4 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i_joinLobby", a2);
CString = (const char *)cocos2d::CCString::getCString(v4);
if ( GJMultiplayerManager::isDLActive(this, CString) )
return 0;
GJMultiplayerManager::addDLToActive(this, CString, v6, v7);
GJMultiplayerManager::getBasePostString((GJMultiplayerManager *)v17, (int)this, v8, v9);
LastCommentIDForGame = GJMultiplayerManager::getLastCommentIDForGame((cocos2d::CCDictionary **)this, (int)a2);
v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)&dword_54 + 3,
"mfv",
"3899",
103,
99,
&a1i2r3e45s789g[11]);
v12 = cocos2d::CCString::getCString(v11);
v13 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&gameID=%i&lastCommentID=%i&secret=%s",
a2,
LastCommentIDForGame,
v12);
v14 = (char *)cocos2d::CCString::getCString(v13);
std::string::append(v17, v14);
memset(v18, 0, sizeof(v18));
std::string::__init(v18, "https://www.geometrydash.com/database/joinMPLobby.php", 0x35u);
std::string::basic_string(v19, (int)v17);
memset(v20, 0, sizeof(v20));
v15 = strlen(CString);
std::string::__init(v20, CString, v15);
GJMultiplayerManager::ProcessHttpRequest(this, v18, (int)v19, (int)v20, 63);
std::string::~string((int)v20);
std::string::~string((int)v19);
std::string::~string((int)v18);
std::string::~string((int)v17);
return 1;
}