//
// GameLevelManager::sendThreadMessage from 0x825790 to 0x826068 (2264 bytes)
//
// 3 xrefs:
// > NewThreadPopup::onSend @ 0xc7b8a8
// > ThreadViewPopup::onSend @ 0xc899a4
// > ??> @ 0x76c60
//
// 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:03 +0000
//
__int64 __fastcall GameLevelManager::sendThreadMessage(
__int64 a1,
unsigned int a2,
int a3,
char *a4,
char *a5,
const char *a6,
char *a7,
unsigned __int8 a8,
char *a9,
char *a10)
{
int v17; // w22
__int64 v18; // x1
__int64 v19; // x1
__int64 v21; // x1
cocos2d::CCNode *v22; // x0
cocos2d::CCString *v23; // x0
__int64 CString; // x0
cocos2d::CCString *v25; // x0
size_t v26; // x0
char v27; // w0
__int64 v28; // x0
__int64 v29; // x1
char *v30; // x2
cocos2d::CCString *v31; // x0
size_t v32; // x0
__int64 v33; // x1
__int64 v34; // x1
__int64 v35; // x1
cocos2d::CCString *v36; // x0
size_t v37; // x0
char v38; // w0
__int64 v39; // x0
__int64 v40; // x1
char *v41; // x1
size_t v42; // x2
const char *v43; // x1
size_t v44; // x0
__int64 v45; // x1
char v46; // w0
__int64 v47; // x0
__int64 v48; // x1
char *v49; // x1
size_t v50; // x2
char v51; // w0
__int64 v52; // x0
__int64 v53; // x1
char *v54; // x1
size_t v55; // x2
char v56; // w0
__int64 v57; // x0
__int64 v58; // x1
char *v59; // x1
size_t v60; // x2
char *v61; // [xsp+68h] [xbp+68h]
void *v62; // [xsp+70h] [xbp+70h]
char *v63; // [xsp+70h] [xbp+70h]
cocos2d::CCObject *v64; // [xsp+78h] [xbp+78h]
cocos2d::CCObject *v65; // [xsp+78h] [xbp+78h]
cocos2d::CCObject *v66; // [xsp+78h] [xbp+78h]
char *v67; // [xsp+88h] [xbp+88h]
char *v68; // [xsp+88h] [xbp+88h]
__int64 v69[2]; // [xsp+98h] [xbp+98h] BYREF
char *v70; // [xsp+A8h] [xbp+A8h]
__int64 v71; // [xsp+B0h] [xbp+B0h] BYREF
__int64 v72; // [xsp+B8h] [xbp+B8h]
void *v73; // [xsp+C0h] [xbp+C0h]
_QWORD v74[2]; // [xsp+C8h] [xbp+C8h] BYREF
char *v75; // [xsp+D8h] [xbp+D8h]
__int64 v76; // [xsp+E0h] [xbp+E0h] BYREF
__int64 v77; // [xsp+E8h] [xbp+E8h]
void *v78; // [xsp+F0h] [xbp+F0h]
size_t v79[2]; // [xsp+F8h] [xbp+F8h] BYREF
void *v80; // [xsp+108h] [xbp+108h]
__int64 v81; // [xsp+110h] [xbp+110h] BYREF
__int64 v82; // [xsp+118h] [xbp+118h]
void *v83; // [xsp+120h] [xbp+120h]
size_t v84[2]; // [xsp+128h] [xbp+128h] BYREF
void *v85; // [xsp+138h] [xbp+138h]
__int64 v86; // [xsp+140h] [xbp+140h] BYREF
__int64 v87; // [xsp+148h] [xbp+148h]
void *v88; // [xsp+150h] [xbp+150h]
size_t v89[2]; // [xsp+158h] [xbp+158h] BYREF
void *v90; // [xsp+168h] [xbp+168h]
__int64 v91; // [xsp+170h] [xbp+170h] BYREF
__int64 v92; // [xsp+178h] [xbp+178h]
void *v93; // [xsp+180h] [xbp+180h]
size_t v94[2]; // [xsp+188h] [xbp+188h] BYREF
void *v95; // [xsp+198h] [xbp+198h]
__int64 v96[2]; // [xsp+1A0h] [xbp+1A0h] BYREF
void *v97; // [xsp+1B0h] [xbp+1B0h]
__int64 v98[2]; // [xsp+1B8h] [xbp+1B8h] BYREF
void *v99; // [xsp+1C8h] [xbp+1C8h]
cocos2d::CCNode *v100; // [xsp+1D0h] [xbp+1D0h] BYREF
__int64 v101; // [xsp+1D8h] [xbp+1D8h]
void *v102; // [xsp+1E0h] [xbp+1E0h]
v17 = a8;
if ( (a2 & 0x80000000) != 0 )
return 0;
v18 = (unsigned __int8)*a5 >> 1;
if ( (*a5 & 1) != 0 )
v18 = *((_QWORD *)a5 + 1);
if ( v18 )
{
if ( a2 )
goto LABEL_14;
}
else if ( a2 || a8 )
{
return 0;
}
if ( a3 <= 0 )
{
v45 = (unsigned __int8)*a7 >> 1;
if ( (*a7 & 1) != 0 )
v45 = *((_QWORD *)a7 + 1);
if ( !v45 )
return 0;
if ( a8 )
goto LABEL_14;
}
else if ( a8 )
{
goto LABEL_14;
}
v19 = (unsigned __int8)*a4 >> 1;
if ( (*a4 & 1) != 0 )
v19 = *((_QWORD *)a4 + 1);
if ( !v19 )
return 0;
LABEL_14:
v64 = *(cocos2d::CCObject **)(a1 + 1088);
v100 = nullptr;
v101 = 0;
v102 = nullptr;
std::string::__init((__int64 *)&v100, "threadSend", 0xAu);
v21 = cocos2d::CCDictionary::objectForKey(v64, &v100);
v22 = (cocos2d::CCNode *)(unsigned __int8)v100;
if ( ((unsigned __int8)v100 & 1) != 0 )
{
v66 = (cocos2d::CCObject *)v21;
operator delete(v102);
if ( !v66 )
goto LABEL_16;
return 0;
}
if ( v21 )
return 0;
LABEL_16:
v62 = *(void **)(a1 + 1088);
v65 = (cocos2d::CCObject *)cocos2d::CCNode::create(v22);
v100 = nullptr;
v101 = 0;
v102 = nullptr;
std::string::__init((__int64 *)&v100, "threadSend", 0xAu);
cocos2d::CCDictionary::setObject((int)v62, v65);
if ( ((unsigned __int8)v100 & 1) != 0 )
operator delete(v102);
*(_WORD *)(a1 + 449) = a2 == 0;
*(_BYTE *)(a1 + 448) = (a2 == 0) & v17;
GameLevelManager::getBasePostString(v69);
v23 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)off_50 + 7,
"mfd",
"2893",
103,
98,
"7");
CString = cocos2d::CCString::getCString(v23);
v25 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&threadID=%i&secret=%s",
(const char *)a2,
CString);
v61 = (char *)cocos2d::CCString::getCString(v25);
v26 = strlen(v61);
std::string::append((__int64)v69, v61, v26);
if ( !a2 )
{
if ( v17 )
std::string::append((__int64)v69, "&isDM=1", 7u);
v27 = *a4;
v71 = 0;
v72 = 0;
v73 = nullptr;
if ( (v27 & 1) != 0 )
{
std::string::__init(&v71, *((void **)a4 + 2), *((_QWORD *)a4 + 1));
}
else
{
v28 = *(_QWORD *)a4;
v29 = *((_QWORD *)a4 + 1);
v73 = *((void **)a4 + 2);
v71 = v28;
v72 = v29;
}
LevelTools::base64EncodeString((__int64)&v71, v74);
v30 = (char *)v74 + 1;
if ( (v74[0] & 1) != 0 )
v30 = v75;
v31 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&toAccountID=%i&subject=%s",
(const char *)(unsigned int)a3,
v30);
v63 = (char *)cocos2d::CCString::getCString(v31);
v32 = strlen(v63);
std::string::append((__int64)v69, v63, v32);
if ( (v74[0] & 1) != 0 )
operator delete(v75);
if ( (v71 & 1) != 0 )
operator delete(v73);
v33 = (unsigned __int8)*a7 >> 1;
if ( (*a7 & 1) != 0 )
v33 = *((_QWORD *)a7 + 1);
if ( v33 )
{
std::string::append((__int64)v69, "&targets=", 9u);
v56 = *a7;
v78 = nullptr;
v76 = 0;
v77 = 0;
if ( (v56 & 1) != 0 )
{
std::string::__init(&v76, *((void **)a7 + 2), *((_QWORD *)a7 + 1));
}
else
{
v57 = *(_QWORD *)a7;
v58 = *((_QWORD *)a7 + 1);
v78 = *((void **)a7 + 2);
v76 = v57;
v77 = v58;
}
LevelTools::base64EncodeString((__int64)&v76, v79);
if ( (v79[0] & 1) != 0 )
{
v59 = (char *)v80;
v60 = v79[1];
}
else
{
v60 = LOBYTE(v79[0]) >> 1;
v59 = (char *)v79 + 1;
}
std::string::append((__int64)v69, v59, v60);
if ( (v79[0] & 1) != 0 )
operator delete(v80);
if ( (v76 & 1) != 0 )
operator delete(v78);
}
v34 = (unsigned __int8)*a9 >> 1;
if ( (*a9 & 1) != 0 )
v34 = *((_QWORD *)a9 + 1);
if ( v34 )
{
std::string::append((__int64)v69, "&description=", 0xDu);
v81 = 0;
v82 = 0;
v51 = *a9;
v83 = nullptr;
if ( (v51 & 1) != 0 )
{
std::string::__init(&v81, *((void **)a9 + 2), *((_QWORD *)a9 + 1));
}
else
{
v52 = *(_QWORD *)a9;
v53 = *((_QWORD *)a9 + 1);
v83 = *((void **)a9 + 2);
v81 = v52;
v82 = v53;
}
LevelTools::base64EncodeString((__int64)&v81, v84);
if ( (v84[0] & 1) != 0 )
{
v54 = (char *)v85;
v55 = v84[1];
}
else
{
v55 = LOBYTE(v84[0]) >> 1;
v54 = (char *)v84 + 1;
}
std::string::append((__int64)v69, v54, v55);
if ( (v84[0] & 1) != 0 )
operator delete(v85);
if ( (v81 & 1) != 0 )
operator delete(v83);
}
v35 = (unsigned __int8)*a10 >> 1;
if ( (*a10 & 1) != 0 )
v35 = *((_QWORD *)a10 + 1);
if ( v35 )
{
std::string::append((__int64)v69, "&emote=", 7u);
v86 = 0;
v87 = 0;
v46 = *a10;
v88 = nullptr;
if ( (v46 & 1) != 0 )
{
std::string::__init(&v86, *((void **)a10 + 2), *((_QWORD *)a10 + 1));
}
else
{
v47 = *(_QWORD *)a10;
v48 = *((_QWORD *)a10 + 1);
v88 = *((void **)a10 + 2);
v86 = v47;
v87 = v48;
}
LevelTools::base64EncodeString((__int64)&v86, v89);
if ( (v89[0] & 1) != 0 )
{
v49 = (char *)v90;
v50 = v89[1];
}
else
{
v50 = LOBYTE(v89[0]) >> 1;
v49 = (char *)v89 + 1;
}
std::string::append((__int64)v69, v49, v50);
if ( (v89[0] & 1) != 0 )
operator delete(v90);
if ( (v86 & 1) != 0 )
operator delete(v88);
}
}
if ( a6 )
{
v36 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"&token=%llu", a6);
v67 = (char *)cocos2d::CCString::getCString(v36);
v37 = strlen(v67);
std::string::append((__int64)v69, v67, v37);
}
std::string::append((__int64)v69, "&body=", 6u);
v38 = *a5;
v91 = 0;
v92 = 0;
v93 = nullptr;
if ( (v38 & 1) != 0 )
{
std::string::__init(&v91, *((void **)a5 + 2), *((_QWORD *)a5 + 1));
}
else
{
v39 = *(_QWORD *)a5;
v40 = *((_QWORD *)a5 + 1);
v93 = *((void **)a5 + 2);
v91 = v39;
v92 = v40;
}
LevelTools::base64EncodeString((__int64)&v91, v94);
if ( (v94[0] & 1) != 0 )
{
v41 = (char *)v95;
v42 = v94[1];
}
else
{
v42 = LOBYTE(v94[0]) >> 1;
v41 = (char *)v94 + 1;
}
std::string::append((__int64)v69, v41, v42);
if ( (v94[0] & 1) != 0 )
operator delete(v95);
if ( (v91 & 1) != 0 )
operator delete(v93);
v96[0] = 0;
v96[1] = 0;
v97 = nullptr;
std::string::__init(v96, "https://www.boomlings.com/database/sendGJThreadMessage.php", 0x3Au);
v43 = (char *)v69 + 1;
if ( (v69[0] & 1) != 0 )
v43 = v70;
v68 = (char *)v43;
v98[0] = 0;
v98[1] = 0;
v99 = nullptr;
v44 = strlen(v43);
std::string::__init(v98, v68, v44);
v100 = nullptr;
v101 = 0;
v102 = nullptr;
std::string::__init((__int64 *)&v100, "threadSend", 0xAu);
GameLevelManager::ProcessHttpRequest((cocos2d::CCObject *)a1, v96, (__int64)v98, (char *)&v100, 91);
if ( ((unsigned __int8)v100 & 1) != 0 )
operator delete(v102);
if ( (v98[0] & 1) != 0 )
operator delete(v99);
if ( (v96[0] & 1) != 0 )
operator delete(v97);
if ( (v69[0] & 1) != 0 )
operator delete(v70);
return 1;
}