//
// GameLevelManager::deleteServerEditorSound from 0x8475e4 to 0x8478dc (760 bytes)
//
// 2 xrefs:
// > EditorSoundConfigInfoLayer::startServerDelete @ 0xccde98
// > ??> @ 0xe79e8
//
// 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::deleteServerEditorSound(
cocos2d::CCObject *a1,
const char *a2,
char *a3,
__int64 *a4)
{
unsigned int v6; // w25
cocos2d::CCString *v8; // x0
const char *CString; // x0
size_t v10; // x0
cocos2d::CCString *v12; // x0
__int64 v13; // x0
cocos2d::CCString *v14; // x0
size_t v15; // x0
const char *v16; // x1
size_t v17; // x0
char *v18; // [xsp+58h] [xbp+58h]
char *v19; // [xsp+58h] [xbp+58h]
char *v20; // [xsp+58h] [xbp+58h]
__int64 v21; // [xsp+60h] [xbp+60h] BYREF
size_t v22; // [xsp+68h] [xbp+68h]
void *v23; // [xsp+70h] [xbp+70h]
__int64 v24[2]; // [xsp+78h] [xbp+78h] BYREF
void *v25; // [xsp+88h] [xbp+88h]
__int64 v26[2]; // [xsp+90h] [xbp+90h] BYREF
void *v27; // [xsp+A0h] [xbp+A0h]
__int64 v28[2]; // [xsp+A8h] [xbp+A8h] BYREF
void *v29; // [xsp+B8h] [xbp+B8h]
__int64 v30; // [xsp+C0h] [xbp+C0h] BYREF
size_t v31; // [xsp+C8h] [xbp+C8h]
void *v32; // [xsp+D0h] [xbp+D0h]
v6 = (unsigned int)a2;
v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"es_del_%i", a2);
CString = (const char *)cocos2d::CCString::getCString(v8);
v21 = 0;
v18 = (char *)CString;
v22 = 0;
v23 = nullptr;
v10 = strlen(CString);
std::string::__init(&v21, v18, v10);
if ( std::__tree::__count_unique((__int64)a1 + 720, (__int64)&v21) )
{
if ( (v21 & 1) != 0 )
LABEL_3:
operator delete(v23);
}
else
{
std::__tree::__emplace_unique_key_args(
(__int64)a1 + 720,
(__int64)&v21,
&v21);
GameLevelManager::getBasePostString(v24);
v12 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)off_50 + 7,
"mfv",
"2898",
103,
99,
"9");
v13 = cocos2d::CCString::getCString(v12);
v14 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&soundID=%i&secret=%s",
(const char *)v6,
v13);
v19 = (char *)cocos2d::CCString::getCString(v14);
v15 = strlen(v19);
std::string::append((__int64)v24, v19, v15);
GameLevelManager::appendModReason((int)a1, (__int64)v24, a3, a4);
v26[0] = 0;
v26[1] = 0;
v27 = nullptr;
std::string::__init(v26, "https://www.boomlings.com/database/deleteGJEditorSound.php", 0x3Au);
v16 = (char *)v24 + 1;
if ( (v24[0] & 1) != 0 )
v16 = (const char *)v25;
v20 = (char *)v16;
v28[0] = 0;
v28[1] = 0;
v29 = nullptr;
v17 = strlen(v16);
std::string::__init(v28, v20, v17);
v30 = 0;
v31 = 0;
v32 = nullptr;
if ( (v21 & 1) != 0 )
{
std::string::__init(&v30, v23, v22);
}
else
{
v30 = v21;
v31 = v22;
v32 = v23;
}
GameLevelManager::ProcessHttpRequest(a1, v26, (__int64)v28, (char *)&v30, 72);
if ( (v30 & 1) != 0 )
operator delete(v32);
if ( (v28[0] & 1) != 0 )
operator delete(v29);
if ( (v26[0] & 1) != 0 )
operator delete(v27);
if ( (v24[0] & 1) != 0 )
operator delete(v25);
if ( (v21 & 1) != 0 )
goto LABEL_3;
}
return _stack_chk_guard;
}