//
// GameLevelManager::claimNotificationReward from 0x827b64 to 0x827e28 (708 bytes)
//
// 2 xrefs:
// > GJNotificationCell::onClaimReward @ 0x73634c
// > ??> @ 0x7bf88
//
// 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:04 +0000
//
__int64 __fastcall GameLevelManager::claimNotificationReward(GameLevelManager *this, const char *a2)
{
unsigned int v3; // w24
cocos2d::CCString *v4; // x0
char *CString; // x21
_BOOL4 isDLActive; // w1
__int64 result; // x0
cocos2d::CCString *v8; // x0
__int64 v9; // x25
char *v10; // x3
cocos2d::CCString *v11; // x0
size_t v12; // x0
const char *v13; // x1
size_t v14; // x0
size_t v15; // x0
char *v16; // [xsp+58h] [xbp+58h]
char *v17; // [xsp+58h] [xbp+58h]
__int64 v18[2]; // [xsp+60h] [xbp+60h] BYREF
void *v19; // [xsp+70h] [xbp+70h]
void *v20[2]; // [xsp+78h] [xbp+78h] BYREF
void *v21; // [xsp+88h] [xbp+88h]
__int64 v22[2]; // [xsp+90h] [xbp+90h] BYREF
void *v23; // [xsp+A0h] [xbp+A0h]
__int64 v24[2]; // [xsp+A8h] [xbp+A8h] BYREF
void *v25; // [xsp+B8h] [xbp+B8h]
__int64 v26[2]; // [xsp+C0h] [xbp+C0h] BYREF
void *v27; // [xsp+D0h] [xbp+D0h]
v3 = (unsigned int)a2;
v4 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"notifReward_%i", a2);
CString = (char *)cocos2d::CCString::getCString(v4);
isDLActive = GameLevelManager::isDLActive(this, CString);
result = 0;
if ( !isDLActive )
{
GameLevelManager::addDLToActive(this, CString);
GameLevelManager::getBasePostString(v18);
v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)off_50 + 7,
"mfd",
"2893",
103,
98,
"7");
v9 = cocos2d::CCString::getCString(v8);
GameLevelManager::rewardSessionToken(v20);
v10 = (char *)v20 + 1;
if ( ((__int64)v20[0] & 1) != 0 )
v10 = (char *)v21;
v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"¬ificationID=%i&secret=%s&chk=%s",
(const char *)v3,
v9,
v10);
v16 = (char *)cocos2d::CCString::getCString(v11);
v12 = strlen(v16);
std::string::append((__int64)v18, v16, v12);
if ( ((__int64)v20[0] & 1) != 0 )
operator delete(v21);
v22[0] = 0;
v22[1] = 0;
v23 = nullptr;
std::string::__init(v22, "https://www.boomlings.com/database/claimGJNotificationReward.php", 0x40u);
v13 = (char *)v18 + 1;
if ( (v18[0] & 1) != 0 )
v13 = (const char *)v19;
v17 = (char *)v13;
v24[0] = 0;
v24[1] = 0;
v25 = nullptr;
v14 = strlen(v13);
std::string::__init(v24, v17, v14);
v26[0] = 0;
v26[1] = 0;
v27 = nullptr;
v15 = strlen(CString);
std::string::__init(v26, CString, v15);
GameLevelManager::ProcessHttpRequest(this, v22, (__int64)v24, (char *)v26, 110);
if ( (v26[0] & 1) != 0 )
operator delete(v27);
if ( (v24[0] & 1) != 0 )
operator delete(v25);
if ( (v22[0] & 1) != 0 )
operator delete(v23);
if ( (v18[0] & 1) != 0 )
operator delete(v19);
return 1;
}
return result;
}