//
// GameLevelManager::suggestLevelStars from 0x1000a15b8 to 0x1000a17a0 (488 bytes)
//
// 2 xrefs:
// > RateStarsLayer::onRate @ 0x100080a34
// > GJRateLevelLayer::onRate @ 0x1001b184c
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall GameLevelManager::suggestLevelStars(GameLevelManager *a1, int a2, int a3, int a4)
{
cocos2d::CCString *v8; // x0
char *CString; // x21
cocos2d::CCDictionary *m_friendReqAndUserBlocks; // x19
__int64 v11; // x0
__int64 v12; // x19
cocos2d::CCDictionary *v13; // x25
cocos2d::CCNode *v14; // x26
cocos2d::CCString *v15; // x0
const char *v16; // x0
cocos2d::CCString *v17; // x0
const char *v18; // x0
std::string *v19; // x1
void *__p[2]; // [xsp+30h] [xbp-A0h] BYREF
char v21; // [xsp+47h] [xbp-89h]
void *v22[2]; // [xsp+48h] [xbp-88h] BYREF
char v23; // [xsp+5Fh] [xbp-71h]
std::string v24; // [xsp+60h] [xbp-70h] BYREF
std::string v25; // [xsp+78h] [xbp-58h] BYREF
v8 = (cocos2d::CCString *)sub_100268F4C("suggest_%i_%i_%i", a2, a3, a4);
CString = (char *)cocos2d::CCString::getCString(v8);
m_friendReqAndUserBlocks = a1->m_friendReqAndUserBlocks;
sub_100009900(&v25, CString);
v11 = cocos2d::CCDictionary::objectForKey_1(m_friendReqAndUserBlocks, &v25);
v12 = v11;
if ( SHIBYTE(v25.__r_.__value_.__r.__words[2]) < 0 )
{
operator delete(v25.__r_.__value_.__l.__data_);
if ( v12 )
return;
}
else if ( v11 )
{
return;
}
v13 = a1->m_friendReqAndUserBlocks;
v14 = cocos2d::CCNode::create();
sub_100009900(&v25, CString);
cocos2d::CCDictionary::setObject_1(v13, v14, &v25);
if ( SHIBYTE(v25.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v25.__r_.__value_.__l.__data_);
GameLevelManager::getBasePostString(&v25);
v15 = (cocos2d::CCString *)sub_100268F4C("%c%s%s%c%c%s", 87, "mfp", "3879", 103, 99, "3");
v16 = cocos2d::CCString::getCString(v15);
v17 = (cocos2d::CCString *)sub_100268F4C("&levelID=%i&stars=%i&feature=%i&secret=%s", a2, a3, a4, v16);
v18 = cocos2d::CCString::getCString(v17);
std::string::append(&v25, v18);
sub_100009900(&v24, "https://www.boomlings.com/database/suggestGJStars20.php");
if ( (v25.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v19 = &v25;
else
v19 = (std::string *)v25.__r_.__value_.__r.__words[0];
sub_100009900(v22, (char *)v19);
sub_100009900(__p, CString);
GameLevelManager::ProcessHttpRequest(a1, &v24, (char *)v22, (const std::string::value_type *)__p, 45);
if ( v21 < 0 )
operator delete(__p[0]);
if ( v23 < 0 )
operator delete(v22[0]);
if ( SHIBYTE(v24.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v24.__r_.__value_.__l.__data_);
if ( SHIBYTE(v25.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v25.__r_.__value_.__l.__data_);
}