//
// sub_10055B650 from 0x10055b650 to 0x10055bbb4 (1380 bytes)
//
// 1 xrefs:
// > sub_1008FC760 @ 0x1008fcc3e
//
// 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:07 +0000
//
void __fastcall sub_10055B650(__int64 a1, __int128 *a2, __int128 *a3, __int64 a4, int a5, int a6)
{
__int64 **i; // r13
unsigned int v7; // r14d
unsigned __int64 v8; // r14
__int64 *v9; // rbx
size_t v10; // r15
int v11; // eax
bool v12; // cl
int v13; // eax
bool v14; // cl
std::string *data; // rdi
__int64 v16; // rax
const std::string::value_type *CString; // rax
__int64 v18; // rax
const std::string::value_type *v19; // rax
const char *v20; // r14
size_t v21; // rax
size_t v22; // r15
char *v23; // rbx
size_t v24; // r12
std::string v26; // [rsp+38h] [rbp-128h] BYREF
std::string v27; // [rsp+50h] [rbp-110h] BYREF
std::string v28; // [rsp+70h] [rbp-F0h] BYREF
__int128 v29; // [rsp+90h] [rbp-D0h] BYREF
void *v30; // [rsp+A0h] [rbp-C0h]
__int128 *v31; // [rsp+A8h] [rbp-B8h]
_QWORD __dst[2]; // [rsp+B0h] [rbp-B0h] BYREF
void *v33; // [rsp+C0h] [rbp-A0h]
std::string v34; // [rsp+C8h] [rbp-98h] BYREF
int v35; // [rsp+E0h] [rbp-80h]
char v36[4]; // [rsp+E4h] [rbp-7Ch]
__int128 __s1; // [rsp+E8h] [rbp-78h] BYREF
void *v38; // [rsp+F8h] [rbp-68h]
__int128 v39; // [rsp+100h] [rbp-60h] BYREF
void *v40; // [rsp+110h] [rbp-50h]
__int128 v41; // [rsp+120h] [rbp-40h] BYREF
void *v42; // [rsp+130h] [rbp-30h]
*(_DWORD *)v36 = a6;
v35 = a5;
v31 = a3;
LOBYTE(__s1) = 18;
*(_QWORD *)((char *)&__s1 + 1) = 0x616F6C70755F7365LL;
*(_WORD *)((char *)&__s1 + 9) = 100;
for ( i = *(__int64 ***)(a1 + 728); i; i = (__int64 **)*i )
{
v7 = *((unsigned __int8 *)i + 32);
if ( (v7 & 1) != 0 )
{
v8 = (unsigned __int64)i[5];
v9 = i[6];
}
else
{
v8 = v7 >> 1;
v9 = (__int64 *)((char *)i + 33);
}
v10 = 9;
if ( v8 < 9 )
v10 = v8;
v11 = memcmp((char *)&__s1 + 1, v9, v10);
v12 = v8 >= 0xA;
if ( v11 )
v12 = v11 < 0;
if ( !v12 )
{
v13 = memcmp(v9, (char *)&__s1 + 1, v10);
v14 = v8 < 9;
if ( v13 )
v14 = v13 < 0;
if ( !v14 )
return;
++i;
}
}
data = (std::string *)(a1 + 720);
sub_1005913C0(a1 + 720, &__s1);
if ( (*(_BYTE *)a2 & 1) != 0 )
{
data = (std::string *)&v39;
sub_10001AD30(&v39, *((const void **)a2 + 2), *((_QWORD *)a2 + 1));
}
else
{
v40 = *((void **)a2 + 2);
v39 = *a2;
}
if ( (*(_BYTE *)v31 & 1) != 0 )
{
data = (std::string *)&v41;
sub_10001AD30(&v41, *((const void **)v31 + 2), *((_QWORD *)v31 + 1));
}
else
{
v42 = *((void **)v31 + 2);
v41 = *v31;
}
if ( (v39 & 1) != 0 )
{
data = &v27;
sub_10001AD30(&v27, v40, *((unsigned __int64 *)&v39 + 1));
}
else
{
v27.__r_.__value_.__r.__words[2] = (std::string::size_type)v40;
*(_OWORD *)&v27.__r_.__value_.__l.0 = v39;
}
GameLevelManager::removeDelimiterChars((__int64)data, &v27, 0);
if ( (*(_BYTE *)&v27.__r_.__value_.__s.0 & 1) != 0 )
{
data = (std::string *)v27.__r_.__value_.__l.__data_;
operator delete(v27.__r_.__value_.__l.__data_);
}
if ( (v41 & 1) != 0 )
{
data = &v28;
sub_10001AD30(&v28, v42, *((unsigned __int64 *)&v41 + 1));
}
else
{
v28.__r_.__value_.__r.__words[2] = (std::string::size_type)v42;
*(_OWORD *)&v28.__r_.__value_.__l.0 = v41;
}
GameLevelManager::removeDelimiterChars((__int64)data, &v28, 0);
if ( (*(_BYTE *)&v28.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v28.__r_.__value_.__l.__data_);
GameLevelManager::getBasePostString(&v34);
v16 = sub_10088E820(
"&soundID=%i&soundName=%s&soundDesc=%s&soundData=%s&actionCount=%i&soundCount=%i&unlisted=%i&emote=%s",
v36[0]);
CString = (const std::string::value_type *)cocos2d::CCString::getCString(v16);
std::string::append(&v34, CString);
std::string::append(&v34, "&secret=");
v18 = sub_10088E820("%c%s%s%c%c%s", (char)"7");
v19 = (const std::string::value_type *)cocos2d::CCString::getCString(v18);
std::string::append(&v34, v19);
v26.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x40u);
v26.__r_.__value_.__r.__words[0] = 65;
v26.__r_.__value_.__l.__size_ = 58;
strcpy(v26.__r_.__value_.__l.__data_, "https://www.boomlings.com/database/uploadGJEditorSound.php");
if ( (*(_BYTE *)&v34.__r_.__value_.__s.0 & 1) != 0 )
v20 = v34.__r_.__value_.__l.__data_;
else
v20 = v34.__r_.__value_.__s.__data_;
v21 = strlen(v20);
if ( v21 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v22 = v21;
if ( v21 >= 0x17 )
{
v24 = 26;
if ( (v21 | 7) != 0x17 )
v24 = (v21 | 7) + 1;
v23 = (char *)operator new(v24);
v33 = v23;
__dst[0] = v24 | 1;
__dst[1] = v22;
LABEL_43:
memmove(v23, v20, v22);
v23[v22] = 0;
if ( (__s1 & 1) == 0 )
goto LABEL_39;
goto LABEL_44;
}
LOBYTE(__dst[0]) = 2 * v21;
v23 = (char *)__dst + 1;
if ( v21 )
goto LABEL_43;
BYTE1(__dst[0]) = 0;
if ( (__s1 & 1) == 0 )
{
LABEL_39:
v30 = v38;
v29 = __s1;
goto LABEL_45;
}
LABEL_44:
sub_10001AD30(&v29, v38, *((unsigned __int64 *)&__s1 + 1));
LABEL_45:
GameLevelManager::ProcessHttpRequest(a1, &v26, (__int64)__dst, &v29, 0x45u);
if ( (v29 & 1) != 0 )
{
operator delete(v30);
if ( (__dst[0] & 1) == 0 )
{
LABEL_47:
if ( (*(_BYTE *)&v26.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_48;
goto LABEL_56;
}
}
else if ( (__dst[0] & 1) == 0 )
{
goto LABEL_47;
}
operator delete(v33);
if ( (*(_BYTE *)&v26.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_48:
if ( (*(_BYTE *)&v34.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_49;
goto LABEL_57;
}
LABEL_56:
operator delete(v26.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v34.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_49:
if ( (v41 & 1) == 0 )
goto LABEL_50;
goto LABEL_58;
}
LABEL_57:
operator delete(v34.__r_.__value_.__l.__data_);
if ( (v41 & 1) == 0 )
{
LABEL_50:
if ( (v39 & 1) == 0 )
goto LABEL_51;
goto LABEL_59;
}
LABEL_58:
operator delete(v42);
if ( (v39 & 1) == 0 )
{
LABEL_51:
if ( (__s1 & 1) == 0 )
return;
goto LABEL_52;
}
LABEL_59:
operator delete(v40);
if ( (__s1 & 1) != 0 )
LABEL_52:
operator delete(v38);
}