//
// GameLevelManager::downloadUserMessage from 0x14015aa80 to 0x14015acc0 (576 bytes)
//
// 2 xrefs:
// > GJMessagePopup::init @ 0x140297d40
// > ??> @ 0x1406caa04
//
// 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
//
// Hidden C++ exception states: #wind=3
void GameLevelManager::downloadUserMessage(GameLevelManager *a1, int a2, bool a3)
{
cocos2d::CCString *v6; // rax
const char *CString; // rdi
__int64 v8; // rcx
cocos2d::CCString *v9; // rax
const char *v10; // rax
cocos2d::CCString *v11; // rax
char *v12; // rax
size_t v13; // rbx
size_t v14; // r8
size_t v15; // r8
_QWORD *v16; // rdx
int v17; // [rsp+20h] [rbp-79h]
int v18; // [rsp+28h] [rbp-71h]
__int128 v19; // [rsp+40h] [rbp-59h] BYREF
__int64 v20; // [rsp+50h] [rbp-49h]
__int64 v21; // [rsp+58h] [rbp-41h]
__int128 v22; // [rsp+60h] [rbp-39h] BYREF
__int64 v23; // [rsp+70h] [rbp-29h]
__int64 v24; // [rsp+78h] [rbp-21h]
__int128 v25; // [rsp+80h] [rbp-19h] BYREF
__int64 v26; // [rsp+90h] [rbp-9h]
__int64 v27; // [rsp+98h] [rbp-1h]
__int128 *v28; // [rsp+A0h] [rbp+7h]
__int128 *v29; // [rsp+A8h] [rbp+Fh]
_QWORD Src[4]; // [rsp+B8h] [rbp+1Fh] BYREF
v6 = cocos2d::CCString::createWithFormat("message_%i", a2);
CString = cocos2d::CCString::getCString(v6);
if ( !GameLevelManager::isDLActive(a1, CString) )
{
GameLevelManager::addDLToActive(a1, CString);
GameLevelManager::getBasePostString(v8, Src);
v18 = 98;
v17 = 103;
v9 = cocos2d::CCString::createWithFormat("%c%s%s%c%c%s", 87, "mfd", "2893", v17, v18, (const char *)&word_140531E88);
v10 = cocos2d::CCString::getCString(v9);
v11 = cocos2d::CCString::createWithFormat("&messageID=%i&secret=%s", a2, v10);
v12 = (char *)cocos2d::CCString::getCString(v11);
v13 = -1;
v14 = -1;
do
++v14;
while ( v12[v14] );
sub_140041270(Src, v12, v14);
if ( a3 )
sub_140041270(Src, "&isSender=1", 0xBu);
v28 = &v22;
v29 = &v25;
v22 = 0;
v23 = 0;
v24 = 0;
v15 = -1;
do
++v15;
while ( CString[v15] );
sub_14003A930(&v22, CString, v15);
v16 = Src;
if ( Src[3] > 0xFu )
v16 = (_QWORD *)Src[0];
v25 = 0;
v26 = 0;
v27 = 0;
do
++v13;
while ( *((_BYTE *)v16 + v13) );
sub_14003A930(&v25, v16, v13);
v19 = 0;
*(_QWORD *)&v19 = sub_14003AA10(0x40u);
v20 = 58;
v21 = 63;
strcpy((char *)v19, "https://www.boomlings.com/database/downloadGJMessage20.php");
GameLevelManager::ProcessHttpRequest(a1, (__int64)&v19, (const char *)&v25, (const char *)&v22, 38);
sub_14003A830((__int64)Src);
}
}