//
// GameLevelManager::updateDescription from 0x10057d340 to 0x10057d7d7 (1175 bytes)
//
// 2 xrefs:
// > EditLevelLayer::FLAlert_Clicked @ 0x1001e0e7b
// > CreatorSettingsPopup::setTextPopupClosed @ 0x1008b71c9
//
// 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:32:19 +0000
//
bool __fastcall GameLevelManager::updateDescription(__int64 a1, int a2, std::string *a3)
{
__int64 v4; // r14
__int64 v5; // rax
char *CString; // r12
size_t v7; // rax
std::string::size_type v8; // r15
char *data; // r13
size_t v10; // r14
__int64 v11; // rbx
__int64 v12; // r15
size_t v13; // rax
std::string::size_type v14; // r13
char *v15; // rbx
char *v16; // r15
__int64 v17; // r12
size_t v18; // r14
std::string::pointer v19; // rdi
__int64 v20; // rax
__int64 v21; // rax
const std::string::value_type *v22; // rax
const char *v23; // rbx
size_t v24; // rax
size_t v25; // r15
char *v26; // r12
size_t v27; // r13
char *v28; // r12
size_t v29; // rax
size_t v30; // rbx
char *v31; // r15
size_t v32; // r12
char v34; // [rsp+0h] [rbp-E0h]
char v35; // [rsp+0h] [rbp-E0h]
std::string *v36; // [rsp+10h] [rbp-D0h]
__int64 v37; // [rsp+20h] [rbp-C0h]
std::string v38; // [rsp+28h] [rbp-B8h] BYREF
std::string v39; // [rsp+40h] [rbp-A0h] BYREF
_QWORD v40[2]; // [rsp+60h] [rbp-80h] BYREF
void *v41; // [rsp+70h] [rbp-70h]
__int128 v42; // [rsp+78h] [rbp-68h] BYREF
void *v43; // [rsp+88h] [rbp-58h]
int v44; // [rsp+94h] [rbp-4Ch]
char *__s; // [rsp+98h] [rbp-48h]
std::string __dst[2]; // [rsp+A0h] [rbp-40h] BYREF
v4 = a1;
v44 = a2;
v5 = sub_10088E820("desc_%i", v34);
CString = (char *)cocos2d::CCString::getCString(v5);
v7 = strlen(CString);
if ( v7 >= 0xFFFFFFFFFFFFFFF8LL )
goto LABEL_56;
v8 = v7;
__s = *(char **)(a1 + 1088);
v36 = a3;
if ( v7 >= 0x17 )
{
v10 = 26;
if ( (v7 | 7) != 0x17 )
v10 = (v7 | 7) + 1;
data = (char *)operator new(v10);
__dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)data;
__dst[0].__r_.__value_.__r.__words[0] = v10 + 1;
v4 = a1;
__dst[0].__r_.__value_.__l.__size_ = v8;
goto LABEL_8;
}
__dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v7);
data = __dst[0].__r_.__value_.__s.__data_;
if ( v7 )
LABEL_8:
memmove(data, CString, v8);
data[v8] = 0;
v11 = cocos2d::CCDictionary::objectForKey((__int64)__s, (char *)__dst);
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__dst[0].__r_.__value_.__l.__data_);
if ( v11 )
return v11 == 0;
v12 = *(_QWORD *)(v4 + 1088);
__s = (char *)cocos2d::CCNode::create();
v13 = strlen(CString);
if ( v13 >= 0xFFFFFFFFFFFFFFF8LL )
LABEL_56:
sub_100003630();
v14 = v13;
if ( v13 >= 0x17 )
{
v37 = v12;
v16 = CString;
v17 = v4;
v18 = 26;
if ( (v13 | 7) != 0x17 )
v18 = (v13 | 7) + 1;
v15 = (char *)operator new(v18);
__dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)v15;
__dst[0].__r_.__value_.__r.__words[0] = v18 + 1;
v4 = v17;
CString = v16;
v12 = v37;
__dst[0].__r_.__value_.__l.__size_ = v14;
goto LABEL_19;
}
__dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v13);
v15 = __dst[0].__r_.__value_.__s.__data_;
if ( v13 )
LABEL_19:
memmove(v15, CString, v14);
v15[v14] = 0;
v19 = (std::string::pointer)v12;
cocos2d::CCDictionary::setObject(v12, (__int64)__s, (char *)__dst);
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
{
v19 = __dst[0].__r_.__value_.__l.__data_;
operator delete(__dst[0].__r_.__value_.__l.__data_);
}
if ( (*(_BYTE *)&v36->__r_.__value_.__s.0 & 1) != 0 )
{
v19 = (std::string::pointer)&v39;
sub_10001AD30(&v39, v36->__r_.__value_.__l.__data_, v36->__r_.__value_.__l.__size_);
}
else
{
v39 = *v36;
}
GameLevelManager::removeDelimiterChars((__int64)v19, &v39, 0);
if ( (*(_BYTE *)&v39.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v39.__r_.__value_.__l.__data_);
GameLevelManager::getBasePostString(__dst);
v20 = sub_10088E820("%c%s%s%c%c%s", (char)"7");
cocos2d::CCString::getCString(v20);
v21 = sub_10088E820("&levelID=%i&levelDesc=%s&secret=%s", v35);
v22 = (const std::string::value_type *)cocos2d::CCString::getCString(v21);
std::string::append(__dst, v22);
v38.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x38u);
v38.__r_.__value_.__r.__words[0] = 57;
v38.__r_.__value_.__l.__size_ = 53;
strcpy(v38.__r_.__value_.__l.__data_, "https://www.boomlings.com/database/updateGJDesc20.php");
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
v23 = __dst[0].__r_.__value_.__l.__data_;
else
v23 = __dst[0].__r_.__value_.__s.__data_;
v24 = strlen(v23);
if ( v24 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v25 = v24;
__s = CString;
if ( v24 >= 0x17 )
{
v27 = 26;
if ( (v24 | 7) != 0x17 )
v27 = (v24 | 7) + 1;
v26 = (char *)operator new(v27);
v41 = v26;
v40[0] = v27 | 1;
v40[1] = v25;
goto LABEL_37;
}
LOBYTE(v40[0]) = 2 * v24;
v26 = (char *)v40 + 1;
if ( v24 )
LABEL_37:
memmove(v26, v23, v25);
v26[v25] = 0;
v28 = __s;
v29 = strlen(__s);
if ( v29 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v30 = v29;
if ( v29 >= 0x17 )
{
v32 = 26;
if ( (v29 | 7) != 0x17 )
v32 = (v29 | 7) + 1;
v31 = (char *)operator new(v32);
v43 = v31;
*(_QWORD *)&v42 = v32 | 1;
*((_QWORD *)&v42 + 1) = v30;
v28 = __s;
goto LABEL_45;
}
LOBYTE(v42) = 2 * v29;
v31 = (char *)&v42 + 1;
if ( v29 )
LABEL_45:
memmove(v31, v28, v30);
v31[v30] = 0;
GameLevelManager::ProcessHttpRequest(v4, &v38, (__int64)v40, &v42, 0x1Bu);
v11 = 0;
if ( (v42 & 1) != 0 )
{
operator delete(v43);
if ( (v40[0] & 1) == 0 )
{
LABEL_48:
if ( (*(_BYTE *)&v38.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_49;
LABEL_54:
operator delete(v38.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) == 0 )
return v11 == 0;
goto LABEL_50;
}
}
else if ( (v40[0] & 1) == 0 )
{
goto LABEL_48;
}
operator delete(v41);
if ( (*(_BYTE *)&v38.__r_.__value_.__s.0 & 1) != 0 )
goto LABEL_54;
LABEL_49:
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
LABEL_50:
operator delete(__dst[0].__r_.__value_.__l.__data_);
return v11 == 0;
}