//
// GameLevelManager::reportLevel from 0x14016a280 to 0x14016a51f (671 bytes)
//
// 2 xrefs:
// > InfoLayer::FLAlert_Clicked @ 0x1402bd473
// > ??> @ 0x1406cad34
//
// 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
//
// Hidden C++ exception states: #wind=4
void GameLevelManager::reportLevel(GameLevelManager *a1, int a2)
{
cocos2d::CCString *v4; // rax
const char *CString; // rax
size_t v6; // rbx
size_t v7; // r8
void *v8; // rcx
cocos2d::CCString *v9; // rax
const char *v10; // rax
cocos2d::CCString *v11; // rax
const char *v12; // rsi
cocos2d::CCString *v13; // rax
const char *v14; // rax
size_t v15; // r8
int v16; // [rsp+20h] [rbp-59h]
int v17; // [rsp+28h] [rbp-51h]
__int128 v18; // [rsp+40h] [rbp-39h] BYREF
__int64 v19; // [rsp+50h] [rbp-29h]
__int64 v20; // [rsp+58h] [rbp-21h]
__int128 *v21; // [rsp+60h] [rbp-19h]
__int128 *v22; // [rsp+68h] [rbp-11h]
void *Block[2]; // [rsp+78h] [rbp-1h] BYREF
__int128 v24; // [rsp+88h] [rbp+Fh]
__int128 v25; // [rsp+98h] [rbp+1Fh] BYREF
__int64 v26; // [rsp+A8h] [rbp+2Fh]
__int64 v27; // [rsp+B0h] [rbp+37h]
if ( !GameLevelManager::hasReportedLevel(a1, a2) )
{
if ( cocos2d::CCDictionary::count(a1->m_reportedLevels) >= 0xA )
{
cocos2d::CCDictionary::getFirstKey(a1->m_reportedLevels, &v25);
cocos2d::CCDictionary::removeObjectForKey(a1->m_reportedLevels, &v25);
sub_14003A830((__int64)&v25);
}
v4 = cocos2d::CCString::createWithFormat("%i", a2);
CString = cocos2d::CCString::getCString(v4);
*(_OWORD *)Block = 0;
v24 = 0;
v6 = -1;
v7 = -1;
do
++v7;
while ( CString[v7] );
sub_14003A930(Block, CString, v7);
cocos2d::CCDictionary::setObject(a1->m_reportedLevels, a1->m_trueString, Block);
if ( *((_QWORD *)&v24 + 1) > 0xFu )
{
v8 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v24 + 1) + 1LL) >= 0x1000 )
{
v8 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v8 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v8);
}
v17 = 98;
v16 = 103;
v9 = cocos2d::CCString::createWithFormat("%c%s%s%c%c%s", 87, "mfd", "2893", v16, v17, (const char *)&word_140531E88);
v10 = cocos2d::CCString::getCString(v9);
v11 = cocos2d::CCString::createWithFormat("levelID=%i&secret=%s", a2, v10);
v12 = cocos2d::CCString::getCString(v11);
v21 = &v18;
v22 = &v25;
v13 = cocos2d::CCString::createWithFormat("%i", a2);
v14 = cocos2d::CCString::getCString(v13);
v18 = 0;
v19 = 0;
v20 = 0;
v15 = -1;
do
++v15;
while ( v14[v15] );
sub_14003A930(&v18, v14, v15);
v25 = 0;
v26 = 0;
v27 = 0;
do
++v6;
while ( v12[v6] );
sub_14003A930(&v25, v12, v6);
*(_OWORD *)Block = 0;
*(_QWORD *)&v24 = 0;
*((_QWORD *)&v24 + 1) = 15;
Block[0] = sub_14003AA10(0x40u);
*(_QWORD *)&v24 = 52;
*((_QWORD *)&v24 + 1) = 63;
strcpy((char *)Block[0], "https://www.boomlings.com/database/reportGJLevel.php");
GameLevelManager::ProcessHttpRequest(a1, (__int64)Block, (const char *)&v25, (const char *)&v18, 18);
}
}