//
// GameLevelManager::downloadUserMessage from 0x4b755c to 0x4b769e (322 bytes)
//
// 1 xrefs:
// > GJMessagePopup::init @ 0x5e0e52
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:50:10 +0000
//
int __fastcall GameLevelManager::downloadUserMessage(GameLevelManager *this, const char *a2, int a3)
{
const char *v3; // r11
const char *MessageKey; // r10
int result; // r0
int v9; // r2
int v10; // r3
cocos2d::CCString *v11; // r0
int CString; // r0
cocos2d::CCString *v13; // r0
char *v14; // r0
size_t v15; // r0
size_t v16; // r0
char *v17[3]; // [sp+14h] [bp-38h] BYREF
int v18[3]; // [sp+20h] [bp-2Ch] BYREF
int v19[3]; // [sp+2Ch] [bp-20h] BYREF
int v20[3]; // [sp+38h] [bp-14h] BYREF
MessageKey = (const char *)GameLevelManager::getMessageKey(this, a2);
result = GameLevelManager::isDLActive(this, MessageKey);
if ( !result )
{
GameLevelManager::addDLToActive(this, MessageKey, v9, v10);
GameLevelManager::getBasePostString((GameLevelManager *)v17);
v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)&dword_54 + 3,
"mfd",
"2893",
103,
98,
&a1i2r3e45s789g[9]);
CString = cocos2d::CCString::getCString(v11);
v13 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&messageID=%i&secret=%s",
a2,
CString);
v14 = (char *)cocos2d::CCString::getCString(v13);
std::string::append(v17, v14);
if ( a3 )
std::string::append(v17, "&isSender=1");
memset(v18, 0, sizeof(v18));
std::string::__init(v18, "https://www.boomlings.com/database/downloadGJMessage20.php", 0x3Au);
v19[0] = 0;
v19[1] = 0;
if ( ((int)v17[0] & 1) == 0 )
v3 = (char *)v17 + 1;
v19[2] = 0;
if ( ((int)v17[0] & 1) != 0 )
v3 = v17[2];
v15 = strlen(v3);
std::string::__init(v19, v3, v15);
memset(v20, 0, sizeof(v20));
v16 = strlen(MessageKey);
std::string::__init(v20, MessageKey, v16);
GameLevelManager::ProcessHttpRequest(this, v18, (int)v19, (int)v20, 44);
std::string::~string((int)v20);
std::string::~string((int)v19);
std::string::~string((int)v18);
return std::string::~string((int)v17);
}
return result;
}