//
// GameLevelManager::updateEditorSoundDescription from 0x8478dc to 0x847bf4 (792 bytes)
//
// 2 xrefs:
// > EditorSoundConfigInfoLayer::soundPackDescSaved @ 0xccf720
// > ??> @ 0x614e0
//
// 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:21 +0000
//
__int64 __fastcall GameLevelManager::updateEditorSoundDescription(
cocos2d::CCObject *a1,
const char *a2,
__int64 a3,
__int64 a4)
{
unsigned int v7; // w26
cocos2d::CCString *v8; // x0
unsigned int v9; // w22
size_t v10; // x0
__int64 v12; // x27
__int64 v13; // x23
cocos2d::CCString *v14; // x0
__int64 v15; // x0
cocos2d::CCString *v16; // x0
size_t v17; // x0
const char *v18; // x1
size_t v19; // x0
const char *v20; // x1
size_t v21; // x0
char *CString; // [xsp+68h] [xbp+68h]
char *v23; // [xsp+68h] [xbp+68h]
char *v24; // [xsp+68h] [xbp+68h]
char *v25; // [xsp+68h] [xbp+68h]
__int64 v26[2]; // [xsp+70h] [xbp+70h] BYREF
void *v27; // [xsp+80h] [xbp+80h]
__int64 v28[2]; // [xsp+88h] [xbp+88h] BYREF
void *v29; // [xsp+98h] [xbp+98h]
__int64 v30[2]; // [xsp+A0h] [xbp+A0h] BYREF
void *v31; // [xsp+B0h] [xbp+B0h]
__int64 v32[2]; // [xsp+B8h] [xbp+B8h] BYREF
void *v33; // [xsp+C8h] [xbp+C8h]
__int64 v34[2]; // [xsp+D0h] [xbp+D0h] BYREF
void *v35; // [xsp+E0h] [xbp+E0h]
v7 = (unsigned int)a2;
v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"es_desc_%i", a2);
v9 = 0;
v26[0] = 0;
CString = (char *)cocos2d::CCString::getCString(v8);
v26[1] = 0;
v27 = nullptr;
v10 = strlen(CString);
std::string::__init(v26, CString, v10);
if ( !std::__tree::__count_unique((__int64)a1 + 720, (__int64)v26) )
{
std::__tree::__emplace_unique_key_args(
(__int64)a1 + 720,
(__int64)v26,
v26);
GameLevelManager::getBasePostString(v28);
v12 = a3 + 1;
if ( (*(_BYTE *)a3 & 1) != 0 )
v12 = *(_QWORD *)(a3 + 16);
v13 = a4 + 1;
if ( (*(_BYTE *)a4 & 1) != 0 )
v13 = *(_QWORD *)(a4 + 16);
v14 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)off_50 + 7,
"mfv",
"2898",
103,
99,
"9");
v15 = cocos2d::CCString::getCString(v14);
v16 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&soundID=%i&soundDesc=%s&emote=%s&secret=%s",
(const char *)v7,
v12,
v13,
v15);
v23 = (char *)cocos2d::CCString::getCString(v16);
v17 = strlen(v23);
std::string::append((__int64)v28, v23, v17);
v30[0] = 0;
v30[1] = 0;
v31 = nullptr;
std::string::__init(v30, "https://www.boomlings.com/database/updateGJSoundDesc.php", 0x38u);
v18 = (char *)v28 + 1;
if ( (v28[0] & 1) != 0 )
v18 = (const char *)v29;
v24 = (char *)v18;
v32[0] = 0;
v32[1] = 0;
v33 = nullptr;
v19 = strlen(v18);
std::string::__init(v32, v24, v19);
v20 = (char *)v26 + 1;
if ( (v26[0] & 1) != 0 )
v20 = (const char *)v27;
v25 = (char *)v20;
v34[0] = 0;
v34[1] = 0;
v35 = nullptr;
v21 = strlen(v20);
std::string::__init(v34, v25, v21);
GameLevelManager::ProcessHttpRequest(a1, v30, (__int64)v32, (char *)v34, 73);
if ( (v34[0] & 1) != 0 )
operator delete(v35);
if ( (v32[0] & 1) != 0 )
operator delete(v33);
if ( (v30[0] & 1) != 0 )
operator delete(v31);
v9 = 1;
if ( (v28[0] & 1) != 0 )
operator delete(v29);
}
if ( (v26[0] & 1) != 0 )
operator delete(v27);
return v9;
}