//
// GameLevelManager::updateDescription from 0x82ab70 to 0x82af48 (984 bytes)
//
// 3 xrefs:
// > EditLevelLayer::FLAlert_Clicked @ 0x7f1c54
// > CreatorSettingsPopup::setTextPopupClosed @ 0xc97b64
// > ??> @ 0x8b0a8
//
// 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 12:55:05 +0000
//
__int64 __fastcall GameLevelManager::updateDescription(GameLevelManager *a1, const char *a2, char *a3)
{
unsigned int v4; // w26
char *DescKey; // x24
size_t v7; // x0
size_t v8; // x19
__int64 v9; // x27
unsigned __int64 v10; // x0
char *v11; // x3
__int64 v12; // x19
__int64 result; // x0
__int64 v14; // x22
cocos2d::CCObject *v15; // x19
size_t v16; // x0
char v17; // w0
__int64 v18; // x0
size_t v19; // x1
__int64 v20; // x22
cocos2d::CCString *v21; // x0
__int64 CString; // x0
cocos2d::CCString *v23; // x0
size_t v24; // x0
const char *v25; // x1
size_t v26; // x0
size_t v27; // x0
char *v28; // [xsp+68h] [xbp+68h]
char *v29; // [xsp+68h] [xbp+68h]
__int64 v30[2]; // [xsp+78h] [xbp+78h] BYREF
void *v31; // [xsp+88h] [xbp+88h]
__int64 v32[2]; // [xsp+90h] [xbp+90h] BYREF
void *v33; // [xsp+A0h] [xbp+A0h]
__int64 v34[2]; // [xsp+A8h] [xbp+A8h] BYREF
void *v35; // [xsp+B8h] [xbp+B8h]
unsigned __int64 v36; // [xsp+C0h] [xbp+C0h] BYREF
size_t v37; // [xsp+C8h] [xbp+C8h]
void *v38; // [xsp+D0h] [xbp+D0h]
v4 = (unsigned int)a2;
v36 = 0;
DescKey = (char *)GameLevelManager::getDescKey(a1, a2);
v37 = 0;
v38 = nullptr;
v7 = strlen(DescKey);
v8 = v7;
v9 = *((_QWORD *)a1 + 136);
if ( v7 > 0xFFFFFFFFFFFFFFEFLL )
sub_62C79C();
if ( v7 > 0x16 )
{
v10 = (v7 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v36 = v10 | 1;
v11 = (char *)operator new(v10);
v38 = v11;
v37 = v8;
LABEL_4:
v11 = (char *)memcpy(v11, DescKey, v8);
goto LABEL_5;
}
LOBYTE(v36) = 2 * v7;
v11 = (char *)&v36 + 1;
if ( v7 )
goto LABEL_4;
LABEL_5:
v11[v8] = 0;
v12 = cocos2d::CCDictionary::objectForKey(v9, &v36);
if ( (v36 & 1) != 0 )
{
operator delete(v38);
result = 0;
if ( v12 )
return result;
}
else
{
result = 0;
if ( v12 )
return result;
}
v14 = *((_QWORD *)a1 + 136);
v15 = (cocos2d::CCObject *)cocos2d::CCNode::create(nullptr);
v36 = 0;
v37 = 0;
v38 = nullptr;
v16 = strlen(DescKey);
std::string::__init((__int64 *)&v36, DescKey, v16);
cocos2d::CCDictionary::setObject(v14, v15);
if ( (v36 & 1) != 0 )
operator delete(v38);
v17 = *a3;
v36 = 0;
v37 = 0;
v38 = nullptr;
if ( (v17 & 1) != 0 )
{
std::string::__init((__int64 *)&v36, *((void **)a3 + 2), *((_QWORD *)a3 + 1));
}
else
{
v18 = *(_QWORD *)a3;
v19 = *((_QWORD *)a3 + 1);
v38 = *((void **)a3 + 2);
v36 = v18;
v37 = v19;
}
GameLevelManager::removeDelimiterChars((__int64)a1, (__int64)&v36, 0);
if ( (v36 & 1) != 0 )
operator delete(v38);
GameLevelManager::getBasePostString(v30);
v20 = (__int64)(a3 + 1);
if ( (*a3 & 1) != 0 )
v20 = *((_QWORD *)a3 + 2);
v21 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)off_50 + 7,
"mfd",
"2893",
103,
98,
"7");
CString = cocos2d::CCString::getCString(v21);
v23 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&levelID=%i&levelDesc=%s&secret=%s",
(const char *)v4,
v20,
CString);
v28 = (char *)cocos2d::CCString::getCString(v23);
v24 = strlen(v28);
std::string::append((__int64)v30, v28, v24);
v32[0] = 0;
v32[1] = 0;
v33 = nullptr;
std::string::__init(v32, "https://www.boomlings.com/database/updateGJDesc20.php", 0x35u);
v25 = (char *)v30 + 1;
if ( (v30[0] & 1) != 0 )
v25 = (const char *)v31;
v29 = (char *)v25;
v34[0] = 0;
v34[1] = 0;
v35 = nullptr;
v26 = strlen(v25);
std::string::__init(v34, v29, v26);
v36 = 0;
v37 = 0;
v38 = nullptr;
v27 = strlen(DescKey);
std::string::__init((__int64 *)&v36, DescKey, v27);
GameLevelManager::ProcessHttpRequest(a1, v32, (__int64)v34, (char *)&v36, 27);
if ( (v36 & 1) != 0 )
operator delete(v38);
if ( (v34[0] & 1) != 0 )
operator delete(v35);
if ( (v32[0] & 1) != 0 )
operator delete(v33);
if ( (v30[0] & 1) != 0 )
operator delete(v31);
return 1;
}