//
// GameLevelManager::suggestLevelStars from 0x1402352d0 to 0x140235638 (872 bytes)
//
// 4 xrefs:
// > sub_14041B5F0 @ 0x14041b689
// > RateStarsLayer::onRate @ 0x14055ef79
// > GJRateLevelLayer::onRate @ 0x14056053c
// > ??> @ 0x14091bfb0
//
// 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:32 +0000
//
// Hidden C++ exception states: #wind=4
char __fastcall GameLevelManager::suggestLevelStars(__int64 a1, int a2, int a3, int a4, unsigned __int8 a5, int a6)
{
cocos2d::CCString *v10; // rax
const char *CString; // rax
const char *v12; // rsi
size_t v13; // rdi
size_t v14; // r8
__int64 v15; // rbx
void *v16; // r8
size_t v18; // r8
__int64 v19; // rbx
__int64 v20; // rax
__int64 v21; // rcx
void *v22; // rcx
cocos2d::CCString *v23; // rax
const char *v24; // rax
cocos2d::CCString *v25; // rax
char *v26; // rax
size_t v27; // r8
size_t v28; // r8
_QWORD *v29; // rdx
__int128 v30; // [rsp+48h] [rbp-91h] BYREF
__int64 v31; // [rsp+58h] [rbp-81h]
__int64 v32; // [rsp+60h] [rbp-79h]
__int128 v33; // [rsp+68h] [rbp-71h] BYREF
__int64 v34; // [rsp+78h] [rbp-61h]
__int64 v35; // [rsp+80h] [rbp-59h]
__int128 *v36; // [rsp+88h] [rbp-51h]
void *Block[2]; // [rsp+98h] [rbp-41h] BYREF
__int128 v38; // [rsp+A8h] [rbp-31h]
_QWORD Src[4]; // [rsp+B8h] [rbp-21h] BYREF
v10 = cocos2d::CCString::createWithFormat("suggest_%i_%i_%i", a2, a3, a4);
CString = cocos2d::CCString::getCString(v10);
v12 = CString;
*(_OWORD *)Block = 0;
v38 = 0;
v13 = -1;
v14 = -1;
do
++v14;
while ( CString[v14] );
sub_14003D230(Block, CString, v14);
v15 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 1200), Block);
if ( *((_QWORD *)&v38 + 1) > 0xFu )
{
v16 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v38 + 1) + 1LL) >= 0x1000 )
{
v16 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v16 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v16);
}
if ( v15 )
return 0;
*(_OWORD *)Block = 0;
v38 = 0;
v18 = -1;
do
++v18;
while ( v12[v18] );
sub_14003D230(Block, v12, v18);
v19 = *(_QWORD *)(a1 + 1200);
v20 = cocos2d::CCNode::create();
cocos2d::CCDictionary::setObject(v19, v20, Block);
if ( *((_QWORD *)&v38 + 1) > 0xFu )
{
v22 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v38 + 1) + 1LL) >= 0x1000 )
{
v22 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v22 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v22);
}
GameLevelManager::getBasePostString(v21, Src);
v23 = cocos2d::CCString::createWithFormat("%c%s%s%c%c%s", 87, "mfp", "3879", 103, 99, (const char *)&word_14070D054);
v24 = cocos2d::CCString::getCString(v23);
v25 = cocos2d::CCString::createWithFormat(
"&levelID=%i&stars=%i&feature=%i&coin=%i&demonDiff=%i&secret=%s",
a2,
a3,
a4,
a5,
a6,
v24);
v26 = (char *)cocos2d::CCString::getCString(v25);
v27 = -1;
do
++v27;
while ( v26[v27] );
sub_140044D80(Src, v26, v27);
v36 = &v33;
v30 = 0;
v31 = 0;
v32 = 0;
v28 = -1;
do
++v28;
while ( v12[v28] );
sub_14003D230(&v30, v12, v28);
v29 = Src;
if ( Src[3] > 0xFu )
v29 = (_QWORD *)Src[0];
v33 = 0;
v34 = 0;
v35 = 0;
do
++v13;
while ( *((_BYTE *)v29 + v13) );
sub_14003D230(&v33, v29, v13);
*(_OWORD *)Block = 0;
v38 = 0u;
Block[0] = sub_14003D460(0x40u);
*(_QWORD *)&v38 = 55;
*((_QWORD *)&v38 + 1) = 63;
strcpy((char *)Block[0], "https://www.boomlings.com/database/suggestGJStars20.php");
GameLevelManager::ProcessHttpRequest(
(cocos2d::CCActionManager **)a1,
(__int64)Block,
(const char *)&v33,
(const char *)&v30,
0x33u);
sub_14003D310((__int64)Src);
return 1;
}