//
// GameLevelManager::updateThread from 0x4bfc98 to 0x4bfed6 (574 bytes)
//
// 21 xrefs:
// > GameLevelManager::addThreadMembers @ 0x4bff8a
// > ThreadDescPopup::sendDescription @ 0x7486d6
// > ThreadViewPopup::requestDeleteMessage @ 0x749c7e
// > MemberListPopup::onAddPolicy @ 0x74b29a
// > MemberListPopup::FLAlert_Clicked @ 0x74b356
// > MemberListPopup::FLAlert_Clicked @ 0x74b3c4
// > MemberListPopup::FLAlert_Clicked @ 0x74b432
// > ThreadOptionsPopup::onMuteRow @ 0x74b8ca
// > ThreadOptionsPopup::onPinRow @ 0x74b95a
// > ThreadOptionsPopup::FLAlert_Clicked @ 0x74bdca
// > ThreadOptionsPopup::FLAlert_Clicked @ 0x74be20
// > ThreadOptionsPopup::FLAlert_Clicked @ 0x74befc
// > ThreadOptionsPopup::FLAlert_Clicked @ 0x74bf64
// > InvitesPopup::acceptInvite @ 0x74c532
// > InvitesPopup::FLAlert_Clicked @ 0x74c726
// > MessageThreadsPage::onMarkRead @ 0x74fe40
// > MessageThreadsPage::FLAlert_Clicked @ 0x7515f2
// > MessageThreadsPage::FLAlert_Clicked @ 0x75164e
// > MessageThreadsPage::FLAlert_Clicked @ 0x7516de
// > ThreadDescPopup::onSave @ 0x75493c
// > RenameThreadPopup::onSave @ 0x754b00
//
// 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:50:22 +0000
//
int __fastcall GameLevelManager::updateThread(GameManager *a1, const char *a2, int a3, unsigned __int8 *a4)
{
int v9; // r3
cocos2d::CCString *v11; // r0
const char *CString; // r0
int v13; // r5
const char *v14; // r7
size_t v15; // r0
int v16; // r5
cocos2d::CCNode *v17; // r0
cocos2d::CCObject *v18; // r0
size_t v19; // r0
cocos2d::CCString *v20; // r0
int v21; // r0
cocos2d::CCString *v22; // r0
char *v23; // r0
int v24; // r3
int v25; // r3
const char *v26; // r1
size_t v27; // r0
size_t v28; // r0
char *v29; // r1
size_t v30; // r2
cocos2d::CCObject *v31; // [sp+10h] [bp-5Ch]
cocos2d::CCObject *v32; // [sp+10h] [bp-5Ch]
int v33; // [sp+14h] [bp-58h]
char *v34[3]; // [sp+1Ch] [bp-50h] BYREF
int v35[3]; // [sp+28h] [bp-44h] BYREF
_DWORD v36[3]; // [sp+34h] [bp-38h] BYREF
int v37[3]; // [sp+40h] [bp-2Ch] BYREF
int v38[3]; // [sp+4Ch] [bp-20h] BYREF
int v39; // [sp+58h] [bp-14h] BYREF
int v40; // [sp+5Ch] [bp-10h]
int v41; // [sp+60h] [bp-Ch]
if ( (int)a2 < 0 || a3 <= 0 )
return 0;
if ( !a2 && a3 != 3 )
{
if ( a3 != 1 )
return 0;
v9 = *a4;
if ( !((v9 & 1) != 0 ? *((_DWORD *)a4 + 1) : v9 >> 1) )
return 0;
}
v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"threadUpd_%i_%i", a2, a3);
CString = (const char *)cocos2d::CCString::getCString(v11);
v39 = 0;
v40 = 0;
v41 = 0;
v13 = *((_DWORD *)a1 + 187);
v14 = CString;
v15 = strlen(CString);
std::string::__init(&v39, v14, v15);
v16 = cocos2d::CCDictionary::objectForKey(v13, &v39);
v17 = (cocos2d::CCNode *)std::string::~string((int)&v39);
if ( v16 )
return 0;
v33 = *((_DWORD *)a1 + 187);
v18 = (cocos2d::CCObject *)cocos2d::CCNode::create(v17);
v39 = 0;
v40 = 0;
v41 = 0;
v31 = v18;
v19 = strlen(v14);
std::string::__init(&v39, v14, v19);
cocos2d::CCDictionary::setObject(v33, v31);
std::string::~string((int)&v39);
GameLevelManager::getBasePostString((GameLevelManager *)v34);
v20 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)&dword_54 + 3,
"mfd",
"2893",
103,
98,
&a1i2r3e45s789g[9]);
v21 = cocos2d::CCString::getCString(v20);
v22 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&threadID=%i&mode=%i&secret=%s",
a2,
a3,
v21);
v23 = (char *)cocos2d::CCString::getCString(v22);
std::string::append(v34, v23);
v24 = *a4;
if ( (v24 & 1) != 0 )
v25 = *((_DWORD *)a4 + 1);
else
v25 = v24 >> 1;
if ( v25 )
{
std::string::append(v34, "&value=");
std::string::basic_string(v35, (int)a4);
LevelTools::base64EncodeString(v36, v35);
if ( (v36[0] & 1) != 0 )
{
v29 = (char *)v36[2];
v30 = v36[1];
}
else
{
v30 = (int)LOBYTE(v36[0]) >> 1;
v29 = (char *)v36 + 1;
}
std::string::append(v34, v29, v30);
std::string::~string((int)v36);
std::string::~string((int)v35);
}
memset(v37, 0, sizeof(v37));
std::string::__init(v37, "https://www.boomlings.com/database/updateGJThread.php", 0x35u);
v38[0] = 0;
v38[1] = 0;
if ( ((int)v34[0] & 1) == 0 )
v26 = (char *)v34 + 1;
v38[2] = 0;
if ( ((int)v34[0] & 1) != 0 )
v26 = v34[2];
v32 = (cocos2d::CCObject *)v26;
v27 = strlen(v26);
std::string::__init(v38, v32, v27);
v39 = 0;
v40 = 0;
v41 = 0;
v28 = strlen(v14);
std::string::__init(&v39, v14, v28);
GameLevelManager::ProcessHttpRequest(a1, v37, (int)v38, (int)&v39, 95);
std::string::~string((int)&v39);
std::string::~string((int)v38);
std::string::~string((int)v37);
std::string::~string((int)v34);
return 1;
}