//
// GameLevelManager::deleteServerLevelList from 0x72def8 to 0x72e454 (1372 bytes)
//
// 2 xrefs:
// > LevelListLayer::ownerDelete @ 0xa77f14
// > ??> @ 0x64110
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void GameLevelManager::deleteServerLevelList(GameLevelManager *a1, int a2)
{
char *v4; // x0
cocos2d::CCString *v5; // x0
char *CString; // x0
cocos2d::CCString *v7; // x0
size_t v8; // x0
int *p_m_unknown2; // x0
char *v10; // x0
char *v11; // x0
char *v12; // x0
char *v13; // x0
void *v14; // x0
unsigned int *v15; // x1
int v16; // w2
unsigned int *v17; // x2
int v18; // w1
unsigned int *v19; // x1
int v20; // w2
unsigned int *p_timeoutForConnect; // x1
int timeoutForConnect; // w2
unsigned int *v23; // x1
int v24; // w2
unsigned int *v25; // x1
int v26; // w2
unsigned int *v27; // x1
int v28; // w2
unsigned int *v29; // x1
int v30; // w2
const char *v31; // [xsp+48h] [xbp+48h]
_DWORD *v32; // [xsp+70h] [xbp+70h] BYREF
__int64 v33; // [xsp+78h] [xbp+78h] BYREF
char *v34; // [xsp+80h] [xbp+80h] BYREF
char *v35; // [xsp+88h] [xbp+88h] BYREF
const char *v36; // [xsp+90h] [xbp+90h] BYREF
const char *v37; // [xsp+98h] [xbp+98h] BYREF
cocos2d::extension::CCHttpClient *v38; // [xsp+A0h] [xbp+A0h] BYREF
GameToolbox::intToString((__int64 *)&v32, (GameToolbox *)(unsigned int)a2);
if ( &a1->m_queuedLists._M_t._M_impl._M_header == (std::_Rb_tree_node_base *)std::_Rb_tree,std::less,std::allocator>::find(
(__int64)&a1->m_queuedLists,
(const void **)&v32) )
{
std::_Rb_tree,std::less,std::allocator>::_M_insert_unique(
&a1->m_queuedLists._M_t._M_impl._M_key_compare.pad,
(const void **)&v32);
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)off_50 + 7,
"mfv",
"2898",
103,
99,
"9");
CString = (char *)cocos2d::CCString::getCString(v5);
sub_D153B8((int)&v33, CString);
sub_D153B8((int)&v34, "https://www.boomlings.com/database/deleteGJLevelList.php");
GameLevelManager::getBasePostString(a1, (__int64)&v35);
v7 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&listID=%i&secret=%s",
(const char *)(unsigned int)a2,
v33);
v31 = cocos2d::CCString::getCString(v7);
v8 = strlen(v31);
sub_D15FD4(&v35, v31, v8);
sub_D153B8((int)&v36, v34);
sub_D153B8((int)&v37, v35);
sub_D18D28(&v38);
GameLevelManager::ProcessHttpRequest(a1, &v36, &v37, &v38, 62);
p_m_unknown2 = &v38[-1].m_unknown2;
if ( &v38[-1].m_unknown2 != (int *)&qword_124B6B0 )
{
if ( &pthread_create )
{
p_timeoutForConnect = (unsigned int *)&v38[-1]._timeoutForConnect;
do
timeoutForConnect = __ldaxr(p_timeoutForConnect);
while ( __stlxr(timeoutForConnect - 1, p_timeoutForConnect) );
}
else
{
timeoutForConnect = v38[-1]._timeoutForConnect;
v38[-1]._timeoutForConnect = timeoutForConnect - 1;
}
if ( timeoutForConnect <= 0 )
operator delete(p_m_unknown2);
}
v10 = (char *)(v37 - 24);
if ( v37 - 24 != (const char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v25 = (unsigned int *)(v37 - 8);
do
v26 = __ldaxr(v25);
while ( __stlxr(v26 - 1, v25) );
}
else
{
v26 = *((_DWORD *)v37 - 2);
*((_DWORD *)v37 - 2) = v26 - 1;
}
if ( v26 <= 0 )
operator delete(v10);
}
v11 = (char *)(v36 - 24);
if ( v36 - 24 != (const char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v23 = (unsigned int *)(v36 - 8);
do
v24 = __ldaxr(v23);
while ( __stlxr(v24 - 1, v23) );
}
else
{
v24 = *((_DWORD *)v36 - 2);
*((_DWORD *)v36 - 2) = v24 - 1;
}
if ( v24 <= 0 )
operator delete(v11);
}
v12 = v35 - 24;
if ( v35 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v29 = (unsigned int *)(v35 - 8);
do
v30 = __ldaxr(v29);
while ( __stlxr(v30 - 1, v29) );
}
else
{
v30 = *((_DWORD *)v35 - 2);
*((_DWORD *)v35 - 2) = v30 - 1;
}
if ( v30 <= 0 )
operator delete(v12);
}
v13 = v34 - 24;
if ( v34 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v27 = (unsigned int *)(v34 - 8);
do
v28 = __ldaxr(v27);
while ( __stlxr(v28 - 1, v27) );
}
else
{
v28 = *((_DWORD *)v34 - 2);
*((_DWORD *)v34 - 2) = v28 - 1;
}
if ( v28 <= 0 )
operator delete(v13);
}
v14 = (void *)(v33 - 24);
if ( (__int64 *)(v33 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v19 = (unsigned int *)(v33 - 8);
do
v20 = __ldaxr(v19);
while ( __stlxr(v20 - 1, v19) );
}
else
{
v20 = *(_DWORD *)(v33 - 8);
*(_DWORD *)(v33 - 8) = v20 - 1;
}
if ( v20 <= 0 )
operator delete(v14);
}
v4 = (char *)(v32 - 6);
if ( v32 - 6 != (_DWORD *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v15 = v32 - 2;
do
v16 = __ldaxr(v15);
while ( __stlxr(v16 - 1, v15) );
}
else
{
v16 = *(v32 - 2);
*(v32 - 2) = v16 - 1;
}
if ( v16 <= 0 )
goto LABEL_15;
}
}
else
{
v4 = (char *)(v32 - 6);
if ( v32 - 6 != (_DWORD *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v17 = v32 - 2;
do
v18 = __ldaxr(v17);
while ( __stlxr(v18 - 1, v17) );
}
else
{
v18 = *(v32 - 2);
*(v32 - 2) = v18 - 1;
}
if ( v18 <= 0 )
LABEL_15:
operator delete(v4);
}
}
}