//
// sub_1000C150C from 0x1000c150c to 0x1000c1c14 (1800 bytes)
//
// 5 xrefs:
// > sub_1000C146C @ 0x1000c14c8
// > sub_1000C1DB4 @ 0x1000c1e08
// > sub_1000C1E48 @ 0x1000c1e9c
// > sub_1000C1EDC @ 0x1000c1f38
// > ShareCommentLayer::onShare @ 0x10026dbf0
//
// 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 10:58:47 +0000
//
void __fastcall sub_1000C150C(__int64 a1, void **a2, int a3, int a4, int a5)
{
void **v8; // x23
__int64 v10; // x0
char *CString; // x21
__int64 v12; // x25
__int64 v13; // x0
__int64 v14; // x25
__int64 v15; // x25
__int64 v16; // x26
__int64 v17; // x0
char *v18; // x0
char *v19; // x0
__int64 v20; // x0
size_t v21; // x0
std::string *v22; // x25
const char *v23; // x26
__int64 v24; // x0
const char *v25; // x0
__int64 v26; // x0
const std::string::value_type *v27; // x0
__int64 v28; // x0
const std::string::value_type *v29; // x0
int v30; // w8
__int64 v31; // x0
const std::string::value_type *v32; // x0
__int64 v33; // x0
const std::string::value_type *v34; // x0
__int64 v35; // x0
const std::string::value_type *v36; // x0
std::string *v37; // x8
__int64 v38; // x0
char *v39; // x0
__int64 v40; // x0
const std::string::value_type *v41; // x0
std::string *v42; // x22
size_t v43; // x0
void **v44; // x1
std::string::size_type v45; // x2
std::string *v46; // x1
std::string *v47; // x8
std::string *v48; // x1
void *v49[2]; // [xsp+38h] [xbp-238h] BYREF
char v50; // [xsp+4Fh] [xbp-221h]
void *v51[2]; // [xsp+50h] [xbp-220h] BYREF
char v52; // [xsp+67h] [xbp-209h]
std::string v53; // [xsp+68h] [xbp-208h] BYREF
void *v54[2]; // [xsp+80h] [xbp-1F0h] BYREF
char v55; // [xsp+97h] [xbp-1D9h]
void *v56[2]; // [xsp+98h] [xbp-1D8h] BYREF
char v57; // [xsp+AFh] [xbp-1C1h]
std::string v58; // [xsp+B0h] [xbp-1C0h] BYREF
void *v59[2]; // [xsp+C8h] [xbp-1A8h] BYREF
char v60; // [xsp+DFh] [xbp-191h]
void *v61[2]; // [xsp+E0h] [xbp-190h] BYREF
char v62; // [xsp+F7h] [xbp-179h]
void *v63[2]; // [xsp+F8h] [xbp-178h] BYREF
unsigned __int8 v64; // [xsp+10Fh] [xbp-161h]
std::string v65; // [xsp+110h] [xbp-160h] BYREF
std::string v66; // [xsp+128h] [xbp-148h] BYREF
std::string v67; // [xsp+140h] [xbp-130h] BYREF
std::string __p; // [xsp+160h] [xbp-110h] BYREF
__int128 v69; // [xsp+180h] [xbp-F0h] BYREF
__int64 v70; // [xsp+190h] [xbp-E0h]
std::string v71; // [xsp+1A0h] [xbp-D0h] BYREF
__int128 __dst; // [xsp+1C0h] [xbp-B0h] BYREF
void *v73; // [xsp+1D0h] [xbp-A0h]
char __s[16]; // [xsp+1D8h] [xbp-98h] BYREF
void *v75; // [xsp+1E8h] [xbp-88h]
_BYTE v76[20]; // [xsp+204h] [xbp-6Ch] BYREF
v8 = a2;
if ( *((char *)a2 + 23) < 0 )
{
sub_1000097D0(&__dst, *a2, (unsigned __int64)a2[1]);
}
else
{
__dst = *(_OWORD *)a2;
v73 = a2[2];
}
LevelTools::base64EncodeString(__s, &__dst);
if ( *((char *)v8 + 23) < 0 )
operator delete(*v8);
*(_OWORD *)v8 = *(_OWORD *)__s;
v8[2] = v75;
HIBYTE(v75) = 0;
__s[0] = 0;
if ( SHIBYTE(v73) < 0 )
{
operator delete((void *)__dst);
if ( !a3 )
{
LABEL_12:
v10 = sub_1003065B0("c_%i", a4);
CString = (char *)cocos2d::CCString::getCString(v10);
goto LABEL_13;
}
}
else if ( !a3 )
{
goto LABEL_12;
}
if ( a3 == 6 || (unsigned int)(a3 - 7) <= 1 )
goto LABEL_12;
CString = "acc_comment";
LABEL_13:
v12 = *(_QWORD *)(a1 + 1088);
sub_100009900(__s, CString);
v13 = cocos2d::CCDictionary::objectForKey(v12, __s);
v14 = v13;
if ( SHIBYTE(v75) < 0 )
{
operator delete(*(void **)__s);
if ( v14 )
return;
}
else if ( v13 )
{
return;
}
v15 = *(_QWORD *)(a1 + 1088);
v16 = cocos2d::CCNode::create(v13);
sub_100009900(__s, CString);
cocos2d::CCDictionary::setObject(v15, v16, __s);
if ( SHIBYTE(v75) < 0 )
operator delete(*(void **)__s);
sub_1000AD8CC(a1, CString);
v18 = (char *)GameManager::sharedState(v17);
if ( v18[655] < 0 )
v18 = (char *)sub_1000097D0(&v71, *((void **)v18 + 79), *((_QWORD *)v18 + 80));
else
v71 = *(std::string *)(v18 + 632);
v19 = (char *)GameManager::sharedState(v18);
if ( v19[631] < 0 )
{
v19 = (char *)sub_1000097D0(&v69, *((void **)v19 + 76), *((_QWORD *)v19 + 77));
}
else
{
v69 = *((_OWORD *)v19 + 38);
v70 = *((_QWORD *)v19 + 78);
}
if ( SHIBYTE(v71.__r_.__value_.__r.__words[2]) < 0 )
v19 = (char *)sub_1000097D0(&__p, v71.__r_.__value_.__l.__data_, v71.__r_.__value_.__l.__size_);
else
__p = v71;
v20 = GameLevelManager::removeDelimiterChars((__int64)v19, &__p, 0);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
if ( *((char *)v8 + 23) < 0 )
v20 = (__int64)sub_1000097D0(&v67, *v8, (unsigned __int64)v8[1]);
else
v67 = *(std::string *)v8;
v21 = GameLevelManager::removeDelimiterChars(v20, &v67, 1);
if ( SHIBYTE(v67.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v67.__r_.__value_.__l.__data_);
GameLevelManager::getBasePostString(v21, &v66);
if ( (v71.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v22 = &v71;
else
v22 = (std::string *)v71.__r_.__value_.__r.__words[0];
v23 = (const char *)v8;
if ( *((char *)v8 + 23) < 0 )
v23 = (const char *)*v8;
v24 = sub_1003065B0("%c%s%s%c%c%s", 87, "mfd", "2893", 103, 98, "7");
v25 = (const char *)cocos2d::CCString::getCString(v24);
v26 = sub_1003065B0("&userName=%s&comment=%s&secret=%s", (const char *)v22, v23, v25);
v27 = (const std::string::value_type *)cocos2d::CCString::getCString(v26);
std::string::append(&v66, v27);
if ( a3 == 6 )
goto LABEL_46;
if ( a3 )
{
if ( (unsigned int)(a3 - 7) > 1 )
{
LABEL_49:
std::string::append(&v66, "&cType=");
v30 = a3;
goto LABEL_50;
}
LABEL_46:
std::string::append(&v66, "&levelID=");
v31 = sub_1003065B0("%i", a4);
v32 = (const std::string::value_type *)cocos2d::CCString::getCString(v31);
std::string::append(&v66, v32);
if ( a3 == 7 && a5 >= 1 )
{
std::string::append(&v66, "&percent=");
v33 = sub_1003065B0("%i", a5);
v34 = (const std::string::value_type *)cocos2d::CCString::getCString(v33);
std::string::append(&v66, v34);
}
goto LABEL_49;
}
std::string::append(&v66, "&levelID=");
v28 = sub_1003065B0("%i", a4);
v29 = (const std::string::value_type *)cocos2d::CCString::getCString(v28);
std::string::append(&v66, v29);
if ( a5 < 1 )
goto LABEL_51;
std::string::append(&v66, "&percent=");
v30 = a5;
LABEL_50:
v35 = sub_1003065B0("%i", v30);
v36 = (const std::string::value_type *)cocos2d::CCString::getCString(v35);
std::string::append(&v66, v36);
LABEL_51:
v37 = &v71;
if ( (v71.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
v37 = (std::string *)v71.__r_.__value_.__r.__words[0];
if ( *((char *)v8 + 23) < 0 )
v8 = (void **)*v8;
v38 = sub_1003065B0("%s%s%i%i%i", (const char *)v37, (const char *)v8, a4, a5, a3);
v39 = (char *)cocos2d::CCString::getCString(v38);
sub_100009900(&v65, v39);
v40 = sub_1003065B0("%c%s%s%c%c%s", 120, "PT6", "iUrt", 119, 115, "0J");
v41 = (const std::string::value_type *)cocos2d::CCString::getCString(v40);
v42 = &v65;
std::string::append(&v65, v41);
if ( (v65.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
v42 = (std::string *)v65.__r_.__value_.__r.__words[0];
v43 = strlen((const char *)v42);
sub_10011BEE8(v42, v43, v76);
sub_10011C380(v76, __s);
sub_100009900(v61, __s);
sub_100009900(v59, "29481");
cocos2d::ZipUtils::base64EncodeEnc(v63, v61, v59);
if ( v60 < 0 )
operator delete(v59[0]);
if ( v62 < 0 )
operator delete(v61[0]);
std::string::append(&v66, "&chk=");
if ( (v64 & 0x80u) == 0 )
v44 = v63;
else
v44 = (void **)v63[0];
if ( (v64 & 0x80u) == 0 )
v45 = v64;
else
v45 = (std::string::size_type)v63[1];
std::string::append(&v66, (const std::string::value_type *)v44, v45);
if ( a3 && a3 != 6 && (unsigned int)(a3 - 7) > 1 )
{
sub_100009900(&v53, "https://www.boomlings.com/database/uploadGJAccComment20.php");
if ( (v66.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v48 = &v66;
else
v48 = (std::string *)v66.__r_.__value_.__r.__words[0];
sub_100009900(v51, (char *)v48);
sub_100009900(v49, CString);
GameLevelManager::ProcessHttpRequest(a1, &v53, (char *)v51, (const std::string::value_type *)v49, 13);
if ( v50 < 0 )
operator delete(v49[0]);
if ( v52 < 0 )
operator delete(v51[0]);
if ( (SHIBYTE(v53.__r_.__value_.__r.__words[2]) & 0x80000000) == 0 )
goto LABEL_88;
v47 = &v53;
}
else
{
sub_100009900(&v58, "https://www.boomlings.com/database/uploadGJComment21.php");
if ( (v66.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v46 = &v66;
else
v46 = (std::string *)v66.__r_.__value_.__r.__words[0];
sub_100009900(v56, (char *)v46);
sub_100009900(v54, CString);
GameLevelManager::ProcessHttpRequest(a1, &v58, (char *)v56, (const std::string::value_type *)v54, 13);
if ( v55 < 0 )
operator delete(v54[0]);
if ( v57 < 0 )
operator delete(v56[0]);
if ( (SHIBYTE(v58.__r_.__value_.__r.__words[2]) & 0x80000000) == 0 )
goto LABEL_88;
v47 = &v58;
}
operator delete(v47->__r_.__value_.__l.__data_);
LABEL_88:
if ( (char)v64 < 0 )
operator delete(v63[0]);
if ( SHIBYTE(v65.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v65.__r_.__value_.__l.__data_);
if ( SHIBYTE(v66.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v66.__r_.__value_.__l.__data_);
if ( SHIBYTE(v70) < 0 )
operator delete((void *)v69);
if ( SHIBYTE(v71.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v71.__r_.__value_.__l.__data_);
}