//
// GameLevelManager::getGJSecretReward from 0x14025be60 to 0x14025c1ee (910 bytes)
//
// 2 xrefs:
// > SecretLayer5::onSubmit @ 0x14058cb9b
// > ??> @ 0x14091c73c
//
// This function is hookable on this platform (idp: pc, 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 11:28:46 +0000
//
// Hidden C++ exception states: #wind=6
char __fastcall GameLevelManager::getGJSecretReward(__int64 a1, const char *a2)
{
__m128i si128; // xmm6
__int64 v5; // rbx
void *v6; // r8
__int64 v8; // rbx
__int64 v9; // rax
__int64 v10; // rcx
void *v11; // rcx
__int64 v12; // rcx
__int64 v13; // rax
const char *v14; // rbx
const char *v15; // rdi
cocos2d::CCString *v16; // rax
const char *CString; // rax
cocos2d::CCString *v18; // rax
char *v19; // rax
size_t v20; // rbx
size_t v21; // r8
_QWORD *v22; // rdx
int Reserved; // [rsp+28h] [rbp-99h]
int v24; // [rsp+30h] [rbp-91h]
__int128 v25; // [rsp+48h] [rbp-79h] BYREF
__int64 v26; // [rsp+58h] [rbp-69h]
__int64 v27; // [rsp+60h] [rbp-61h]
void **v28; // [rsp+68h] [rbp-59h]
__int128 *v29; // [rsp+70h] [rbp-51h]
const char *v30; // [rsp+80h] [rbp-41h]
void *Block[2]; // [rsp+88h] [rbp-39h] BYREF
__m128i v32; // [rsp+98h] [rbp-29h]
__int128 v33; // [rsp+A8h] [rbp-19h] BYREF
__int64 v34; // [rsp+B8h] [rbp-9h]
__int64 v35; // [rsp+C0h] [rbp-1h]
_QWORD Src[4]; // [rsp+C8h] [rbp+7h] BYREF
v30 = a2;
si128 = _mm_load_si128((const __m128i *)&xmmword_1408365C0);
v32 = si128;
Block[0] = (void *)0x776572735F746567LL;
Block[1] = (void *)6582881;
v5 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 1192), Block);
if ( v32.m128i_i64[1] > 0xFuLL )
{
v6 = Block[0];
if ( (unsigned __int64)(v32.m128i_i64[1] + 1) >= 0x1000 )
{
v6 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v6);
si128 = _mm_load_si128((const __m128i *)&xmmword_1408365C0);
}
if ( v5 )
{
sub_14003D310((__int64)a2);
return 0;
}
else
{
v32 = si128;
Block[0] = (void *)0x776572735F746567LL;
Block[1] = (void *)6582881;
v8 = *(_QWORD *)(a1 + 1192);
v9 = cocos2d::CCNode::create();
cocos2d::CCDictionary::setObject(v8, v9, Block);
if ( v32.m128i_i64[1] > 0xFuLL )
{
v11 = Block[0];
if ( (unsigned __int64)(v32.m128i_i64[1] + 1) >= 0x1000 )
{
v11 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v11 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v11);
}
GameLevelManager::getBasePostString(v10, Src);
v13 = GameLevelManager::rewardSessionToken(v12, &v33);
v14 = (const char *)v13;
if ( *(_QWORD *)(v13 + 24) > 0xFu )
v14 = *(const char **)v13;
v15 = a2;
if ( *((_QWORD *)a2 + 3) > 0xFu )
v15 = *(const char **)a2;
v24 = 98;
Reserved = 103;
v16 = cocos2d::CCString::createWithFormat(
"%c%s%s%c%c%s",
87,
"mfd",
"2893",
Reserved,
v24,
(const char *)&word_14070D040);
CString = cocos2d::CCString::getCString(v16);
v18 = cocos2d::CCString::createWithFormat("&rewardKey=%s&secret=%s&chk=%s", v15, CString, v14);
v19 = (char *)cocos2d::CCString::getCString(v18);
v20 = -1;
v21 = -1;
do
++v21;
while ( v19[v21] );
sub_140044D80(Src, v19, v21);
sub_14003D310((__int64)&v33);
v28 = Block;
v29 = &v33;
v32.m128i_i64[0] = 11;
v32.m128i_i64[1] = 15;
Block[0] = (void *)0x776572735F746567LL;
Block[1] = (void *)6582881;
v22 = Src;
if ( Src[3] > 0xFu )
v22 = (_QWORD *)Src[0];
v33 = 0;
v34 = 0;
v35 = 0;
do
++v20;
while ( *((_BYTE *)v22 + v20) );
sub_14003D230(&v33, v22, v20);
v25 = 0;
*(_QWORD *)&v25 = sub_14003D460(0x40u);
v26 = 56;
v27 = 63;
strcpy((char *)v25, "https://www.boomlings.com/database/getGJSecretReward.php");
GameLevelManager::ProcessHttpRequest(
(cocos2d::CCActionManager **)a1,
(__int64)&v25,
(const char *)&v33,
(const char *)Block,
0x4Bu);
sub_14003D310((__int64)Src);
sub_14003D310((__int64)a2);
return 1;
}
}