//
// GameLevelManager::getGJSecretReward from 0x4bc134 to 0x4bc294 (352 bytes)
//
// 1 xrefs:
// > SecretLayer5::onSubmit @ 0x6e5ae8
//
// 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:18 +0000
//
int __fastcall GameLevelManager::getGJSecretReward(GameLevelManager *a1, int a2)
{
const char *v2; // r10
int v5; // r2
int v6; // r3
const char *v7; // r4
cocos2d::CCString *v8; // r0
int CString; // r7
cocos2d::CCString *v10; // r0
char *v11; // r0
size_t v12; // r0
char *v14[3]; // [sp+10h] [bp-40h] BYREF
char v15; // [sp+1Ch] [bp-34h] BYREF
int v16[3]; // [sp+28h] [bp-28h] BYREF
int v17[3]; // [sp+34h] [bp-1Ch] BYREF
int v18[3]; // [sp+40h] [bp-10h] BYREF
if ( GameLevelManager::isDLActive(a1, "get_sreward") )
return 0;
GameLevelManager::addDLToActive(a1, "get_sreward", v5, v6);
GameLevelManager::getBasePostString((GameLevelManager *)v14);
if ( (*(_BYTE *)a2 & 1) != 0 )
v7 = *(const char **)(a2 + 8);
else
v7 = (const char *)(a2 + 1);
v8 = (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(v8);
GameLevelManager::rewardSessionToken((GameLevelManager *)&v15);
v10 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&rewardKey=%s&secret=%s&chk=%s",
v7,
CString);
v11 = (char *)cocos2d::CCString::getCString(v10);
std::string::append(v14, v11);
std::string::~string((int)&v15);
memset(v16, 0, sizeof(v16));
std::string::__init(v16, "https://www.boomlings.com/database/getGJSecretReward.php", 0x38u);
v17[0] = 0;
v17[1] = 0;
if ( ((int)v14[0] & 1) == 0 )
v2 = (char *)v14 + 1;
v17[2] = 0;
if ( ((int)v14[0] & 1) != 0 )
v2 = v14[2];
v12 = strlen(v2);
std::string::__init(v17, v2, v12);
memset(v18, 0, sizeof(v18));
std::string::__init(v18, "get_sreward", 0xBu);
GameLevelManager::ProcessHttpRequest(a1, v16, (int)v17, (int)v18, 75);
std::string::~string((int)v18);
std::string::~string((int)v17);
std::string::~string((int)v16);
std::string::~string((int)v14);
return 1;
}