//
// GameLevelManager::updateUserScore from 0x140236270 to 0x140237d64 (6900 bytes)
//
// 11 xrefs:
// > CreatorLayer::init @ 0x140136a04
// > EditorSoundConfigInfoLayer::onLike @ 0x140195b26
// > InfoLayer::loadPage @ 0x1403d19f5
// > LeaderboardsLayer::selectLeaderboard @ 0x1403dc77b
// > LevelInfoLayer::onRateStars @ 0x140423702
// > LevelInfoLayer::onLike @ 0x140424030
// > LevelLeaderboard::init @ 0x140429598
// > LevelListLayer::onLike @ 0x14042f9b0
// > ProfilePage::init @ 0x14055188b
// > UploadPopup::onReturnToLevel @ 0x140632ace
// > ??> @ 0x14091bfec
//
// 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:33 +0000
//
// Hidden C++ exception states: #wind=68
void __fastcall GameLevelManager::updateUserScore(__int64 a1)
{
__int64 v2; // rbx
void *v3; // r8
__int64 v4; // rbx
__int64 v5; // rax
void *v6; // rcx
__int64 v7; // rdx
__int64 v8; // rcx
__int64 v9; // rcx
__int64 v10; // rcx
__int64 v11; // rcx
__int64 v12; // rcx
__int64 v13; // rcx
__int64 v14; // rdx
__int64 v15; // rax
__int64 v16; // rcx
__int64 v17; // rcx
__int64 v18; // rcx
int v19; // r12d
int v20; // esi
int v21; // r13d
int v22; // r14d
int v23; // edi
const char *v24; // r15
int v25; // ebx
cocos2d::CCString *v26; // rax
const char *CString; // rax
unsigned int v28; // esi
cocos2d::CCString *v29; // rax
char *v30; // rax
size_t v31; // rbx
size_t v32; // r8
__int64 v33; // rcx
__int64 v34; // rax
__int64 v35; // rcx
_OWORD *DemonLevelsString; // rax
char v37; // r15
void *v38; // rcx
unsigned int CompletedDailyLevels; // r14d
unsigned int v40; // r12d
size_t v41; // r13
void **v42; // rdx
__int64 v43; // rcx
unsigned int CompletedWeeklyLevels; // r14d
__int64 v45; // r9
__int64 v46; // rcx
__int64 v47; // rcx
__int64 i; // r14
_DWORD *v49; // rax
_DWORD *v50; // rdi
__int64 v51; // rcx
unsigned int CompletedEventLevels; // edi
void **v53; // rax
void *v54; // rdx
void **v55; // rax
void *v56; // rdx
void **v57; // rax
void *v58; // rdx
__int64 v59; // rax
__int64 v60; // rcx
_OWORD *StarLevelsString; // rax
char v62; // r15
void *v63; // rcx
unsigned int v64; // r15d
size_t v65; // rdi
void **v66; // rdx
__int64 v67; // rcx
__int64 v68; // r9
__int64 v69; // rcx
__int64 v70; // rcx
__int64 j; // r14
_DWORD *v72; // rax
_DWORD *v73; // rdi
__int64 v74; // rcx
unsigned int v75; // edi
void **v76; // rax
void *v77; // rdx
void **v78; // rax
void *v79; // rdx
void **v80; // rax
void *v81; // rdx
__int64 v82; // rax
cocos2d::CCString *v83; // rax
char *v84; // rax
size_t v85; // r8
cocos2d::CCString *v86; // rax
char *v87; // rax
size_t v88; // r8
cocos2d::CCString *v89; // rax
char *v90; // rax
size_t v91; // r8
cocos2d::CCString *v92; // rax
char *v93; // rax
size_t v94; // r8
cocos2d::CCString *v95; // rax
char *v96; // rax
size_t v97; // r8
cocos2d::CCString *v98; // rax
char *v99; // rax
size_t v100; // r8
cocos2d::CCString *v101; // rax
char *v102; // rax
size_t v103; // r8
cocos2d::CCString *v104; // rax
char *v105; // rax
size_t v106; // r8
__int64 v107; // rax
cocos2d::CCString *v108; // rax
char *v109; // rax
size_t v110; // r8
__int64 v111; // rax
cocos2d::CCString *v112; // rax
char *v113; // rax
size_t v114; // r8
__int64 v115; // rax
cocos2d::CCString *v116; // rax
char *v117; // rax
size_t v118; // r8
__int64 v119; // rax
cocos2d::CCString *v120; // rax
char *v121; // rax
size_t v122; // r8
__int64 v123; // rax
cocos2d::CCString *v124; // rax
char *v125; // rax
size_t v126; // r8
__int64 v127; // rax
cocos2d::CCString *v128; // rax
char *v129; // rax
size_t v130; // r8
__int64 v131; // rax
cocos2d::CCString *v132; // rax
char *v133; // rax
size_t v134; // r8
__int64 v135; // rax
cocos2d::CCString *v136; // rax
char *v137; // rax
size_t v138; // r8
__int64 v139; // rax
cocos2d::CCString *v140; // rax
char *v141; // rax
size_t v142; // r8
cocos2d::CCString *v143; // rax
char *v144; // rax
size_t v145; // r8
cocos2d::CCString *v146; // rax
char *v147; // rax
size_t v148; // r8
cocos2d::CCString *v149; // rax
char *v150; // rax
size_t v151; // r8
cocos2d::CCString *v152; // rax
char *v153; // rax
size_t v154; // r8
void **v155; // rdx
cocos2d::CCString *v156; // rax
char *v157; // rax
size_t v158; // r8
cocos2d::CCString *v159; // rax
char *v160; // rax
size_t v161; // r8
cocos2d::CCString *v162; // rax
char *v163; // rax
size_t v164; // r8
cocos2d::CCString *v165; // rax
char *v166; // rax
size_t v167; // r8
__int128 *v168; // r8
__int128 *v169; // r9
__int64 v170; // rdx
size_t v171; // r8
void *v172; // rcx
const char *v173; // r8
const char *v174; // rdx
cocos2d::CCString *v175; // rax
char *v176; // rax
size_t v177; // r8
_QWORD *v178; // rdx
void *v179; // rcx
void *v180; // rcx
uintptr_t Reserved; // [rsp+20h] [rbp-140h]
__int64 v182; // [rsp+28h] [rbp-138h]
int v183; // [rsp+80h] [rbp-E0h]
int v184; // [rsp+E0h] [rbp-80h]
unsigned int v185; // [rsp+E0h] [rbp-80h]
int v186; // [rsp+E4h] [rbp-7Ch]
int v187; // [rsp+E4h] [rbp-7Ch]
int v188; // [rsp+E8h] [rbp-78h]
int v189; // [rsp+E8h] [rbp-78h]
void *v190; // [rsp+F0h] [rbp-70h]
void *v191; // [rsp+F0h] [rbp-70h]
void *v192; // [rsp+F0h] [rbp-70h]
void *v193; // [rsp+F0h] [rbp-70h]
void *v194; // [rsp+F0h] [rbp-70h]
int v195; // [rsp+F0h] [rbp-70h]
void *v196; // [rsp+F0h] [rbp-70h]
void *v197; // [rsp+F0h] [rbp-70h]
unsigned int v198; // [rsp+F8h] [rbp-68h]
unsigned int v199; // [rsp+FCh] [rbp-64h]
unsigned int Stat; // [rsp+100h] [rbp-60h]
unsigned int v201; // [rsp+104h] [rbp-5Ch]
unsigned int v202; // [rsp+108h] [rbp-58h]
unsigned int v203; // [rsp+10Ch] [rbp-54h]
void *v204; // [rsp+110h] [rbp-50h]
int v205; // [rsp+110h] [rbp-50h]
int v206; // [rsp+118h] [rbp-48h]
int v207; // [rsp+11Ch] [rbp-44h]
int v208; // [rsp+120h] [rbp-40h]
int v209; // [rsp+124h] [rbp-3Ch]
int v210; // [rsp+128h] [rbp-38h]
size_t Size[2]; // [rsp+138h] [rbp-28h] BYREF
__int64 v213; // [rsp+148h] [rbp-18h]
unsigned __int64 v214; // [rsp+150h] [rbp-10h]
__int128 v215; // [rsp+158h] [rbp-8h] BYREF
__int64 v216; // [rsp+168h] [rbp+8h]
unsigned __int64 v217; // [rsp+170h] [rbp+10h]
void *v218[2]; // [rsp+178h] [rbp+18h] BYREF
__int64 v219; // [rsp+188h] [rbp+28h]
unsigned __int64 v220; // [rsp+190h] [rbp+30h]
_QWORD Src[4]; // [rsp+198h] [rbp+38h] BYREF
void *v222[2]; // [rsp+1B8h] [rbp+58h] BYREF
__int128 v223; // [rsp+1C8h] [rbp+68h]
__int128 v224; // [rsp+1D8h] [rbp+78h] BYREF
__int64 v225; // [rsp+1E8h] [rbp+88h]
__int64 v226; // [rsp+1F0h] [rbp+90h]
void *Block[2]; // [rsp+1F8h] [rbp+98h] BYREF
__int128 v228; // [rsp+208h] [rbp+A8h]
_QWORD v229[4]; // [rsp+218h] [rbp+B8h] BYREF
_QWORD v230[4]; // [rsp+238h] [rbp+D8h] BYREF
_QWORD v231[4]; // [rsp+258h] [rbp+F8h] BYREF
__int128 v232; // [rsp+278h] [rbp+118h] BYREF
__int64 v233; // [rsp+288h] [rbp+128h]
__int64 v234; // [rsp+290h] [rbp+130h]
LODWORD(Size[0]) = 0;
*(_OWORD *)Block = 0;
v228 = 0u;
sub_14003D230(Block, "user_score", 0xAu);
v2 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 1192), Block);
if ( *((_QWORD *)&v228 + 1) > 0xFu )
{
v3 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v228 + 1) + 1LL) >= 0x1000 )
{
v3 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v3 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v3);
}
if ( !v2 )
{
*(_OWORD *)v222 = 0;
v223 = 0u;
sub_14003D230(v222, "user_score", 0xAu);
v4 = *(_QWORD *)(a1 + 1192);
v5 = cocos2d::CCNode::create();
cocos2d::CCDictionary::setObject(v4, v5, v222);
if ( *((_QWORD *)&v223 + 1) > 0xFu )
{
v6 = v222[0];
if ( (unsigned __int64)(*((_QWORD *)&v223 + 1) + 1LL) >= 0x1000 )
{
v6 = *((void **)v222[0] - 1);
if ( (unsigned __int64)((char *)v222[0] - (char *)v6 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v6);
}
*(_QWORD *)&v223 = 0;
*((_QWORD *)&v223 + 1) = 15;
LOBYTE(v222[0]) = 0;
v7 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
Size[0] = (size_t)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(Size[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v7 = qword_14090BFD0;
}
sub_14003F4F0((__int64)v229, v7 + 656);
v8 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
Size[0] = (size_t)operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(Size[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v8 = qword_14090BFE0;
}
Stat = GameStatsManager::getStat(v8, "6");
v9 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
Size[0] = (size_t)operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(Size[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v9 = qword_14090BFE0;
}
LODWORD(Size[0]) = GameStatsManager::getStat(v9, "28");
v10 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v190 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v190);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v10 = qword_14090BFE0;
}
v203 = GameStatsManager::getStat(v10, "13");
v11 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v191 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v191);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v11 = qword_14090BFE0;
}
v199 = GameStatsManager::getStat(v11, &word_14070D048);
v12 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v192 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v192);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v12 = qword_14090BFE0;
}
v201 = GameStatsManager::getStat(v12, &word_14070D038);
v13 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v193 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v193);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v13 = qword_14090BFE0;
}
v198 = GameStatsManager::getStat(v13, "12");
v14 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v194 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v194);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v14 = qword_14090BFD0;
}
v202 = *(_DWORD *)(v14 + 948);
v195 = *(_BYTE *)(v14 + 944) != 0 ? 2 : 0;
switch ( v202 )
{
case 1u:
v184 = *(_DWORD *)(v14 + 760) - *(_DWORD *)(v14 + 764);
break;
case 2u:
v184 = *(_DWORD *)(v14 + 772) - *(_DWORD *)(v14 + 776);
break;
case 3u:
v184 = *(_DWORD *)(v14 + 784) - *(_DWORD *)(v14 + 788);
break;
case 4u:
v184 = *(_DWORD *)(v14 + 796) - *(_DWORD *)(v14 + 800);
break;
case 5u:
v184 = *(_DWORD *)(v14 + 808) - *(_DWORD *)(v14 + 812);
break;
case 6u:
v184 = *(_DWORD *)(v14 + 820) - *(_DWORD *)(v14 + 824);
break;
case 7u:
v184 = *(_DWORD *)(v14 + 832) - *(_DWORD *)(v14 + 836);
break;
case 8u:
v184 = *(_DWORD *)(v14 + 916) - *(_DWORD *)(v14 + 920);
break;
default:
v184 = *(_DWORD *)(v14 + 748) - *(_DWORD *)(v14 + 752);
break;
}
v15 = sub_14003F4F0((__int64)&v232, (__int64)v229);
GameLevelManager::removeDelimiterChars(v16, v15, 0);
GameLevelManager::getBasePostString(v17, Src);
v18 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v204 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v204);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v18 = qword_14090BFD0;
}
v188 = *(_DWORD *)(v18 + 916) - *(_DWORD *)(v18 + 920);
v186 = *(_DWORD *)(v18 + 832) - *(_DWORD *)(v18 + 836);
v206 = *(_DWORD *)(v18 + 904) - *(_DWORD *)(v18 + 908);
v207 = *(_DWORD *)(v18 + 820) - *(_DWORD *)(v18 + 824);
v208 = *(_DWORD *)(v18 + 808) - *(_DWORD *)(v18 + 812);
v209 = *(_DWORD *)(v18 + 796) - *(_DWORD *)(v18 + 800);
v210 = *(_DWORD *)(v18 + 784) - *(_DWORD *)(v18 + 788);
v205 = *(_DWORD *)(v18 + 772) - *(_DWORD *)(v18 + 776);
v19 = *(_DWORD *)(v18 + 760) - *(_DWORD *)(v18 + 764);
v20 = *(_DWORD *)(v18 + 748) - *(_DWORD *)(v18 + 752);
v21 = *(_DWORD *)(v18 + 868) - *(_DWORD *)(v18 + 872);
v22 = *(_DWORD *)(v18 + 856) - *(_DWORD *)(v18 + 860);
v23 = *(_DWORD *)(v18 + 844) - *(_DWORD *)(v18 + 848);
v24 = (const char *)v229;
if ( v229[3] > 0xFu )
v24 = (const char *)v229[0];
v25 = *(unsigned __int8 *)(v18 + 944);
v26 = cocos2d::CCString::createWithFormat("%c%s%s%c%c%s", 87, "mfd", "2893", 103, 98, (const char *)&word_14070D040);
CString = cocos2d::CCString::getCString(v26);
v183 = v20;
v28 = v184;
v29 = cocos2d::CCString::createWithFormat(
"&userName=%s&stars=%i&moons=%i&demons=%i&diamonds=%i&icon=%i&color1=%i&color2=%i&color3=%i&iconType=%i&coins"
"=%i&userCoins=%i&special=%i&gameVersion=%i&secret=%s&accIcon=%i&accShip=%i&accBall=%i&accBird=%i&accDart=%i&"
"accRobot=%i&accGlow=%i&accSpider=%i&accExplosion=%i&accSwing=%i&accJetpack=%i",
v24,
Stat,
LODWORD(Size[0]),
v199,
v203,
v184,
v23,
v22,
v21,
v202,
v201,
v198,
v195,
22,
CString,
v183,
v19,
v205,
v210,
v209,
v208,
v25,
v207,
v206,
v186,
v188);
v30 = (char *)cocos2d::CCString::getCString(v29);
v31 = -1;
v32 = -1;
do
++v32;
while ( v30[v32] );
sub_140044D80(Src, v30, v32);
v34 = GJAccountManager::sharedState(v33);
v35 = (unsigned int)(*(_DWORD *)(v34 + 360) - *(_DWORD *)(v34 + 364));
if ( *(_DWORD *)(v34 + 360) - *(_DWORD *)(v34 + 364) <= 0 )
{
*(_OWORD *)v218 = 0;
v219 = 0;
v220 = 15;
LOBYTE(v218[0]) = 0;
DemonLevelsString = v218;
v37 = 18;
}
else
{
DemonLevelsString = GameLevelManager::getDemonLevelsString(a1, &v232);
v37 = 17;
}
*(_OWORD *)Block = *DemonLevelsString;
*(_OWORD *)Size = DemonLevelsString[1];
v228 = *(_OWORD *)Size;
*((_QWORD *)DemonLevelsString + 2) = 0;
*((_QWORD *)DemonLevelsString + 3) = 15;
*(_BYTE *)DemonLevelsString = 0;
if ( (v37 & 2) != 0 )
{
v37 &= ~2u;
if ( v220 > 0xF )
{
v38 = v218[0];
if ( v220 + 1 >= 0x1000 )
{
v38 = *((void **)v218[0] - 1);
if ( (unsigned __int64)((char *)v218[0] - (char *)v38 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v38);
}
}
if ( (v37 & 1) != 0 )
{
v37 &= ~1u;
sub_14003D310((__int64)&v232);
}
v185 = 0;
CompletedDailyLevels = 0;
v40 = 0;
v189 = 0;
v187 = 0;
v41 = Size[0];
if ( Size[0] )
{
sub_140044D80(Src, "&dinfo=", 7u);
v42 = Block;
if ( *((_QWORD *)&v228 + 1) > 0xFu )
v42 = (void **)Block[0];
sub_140044D80(Src, v42, Size[0]);
v43 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
Size[0] = (size_t)operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(Size[0]);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v43 = *(_QWORD *)&qword_14090BFB0;
}
CompletedWeeklyLevels = GameLevelManager::getCompletedWeeklyLevels(v43);
v185 = CompletedWeeklyLevels;
v45 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
Size[0] = (size_t)operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(Size[0]);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v45 = *(_QWORD *)&qword_14090BFB0;
}
v40 = 0;
v46 = *(_QWORD *)(v45 + 1032);
if ( v46 )
{
v47 = *(_QWORD *)(v46 + 56);
if ( v47 )
{
for ( i = *(_QWORD *)(v47 + 288); ; i = *(_QWORD *)(i + 288) )
{
v49 = (_DWORD *)_RTDynamicCast(
*(_QWORD *)(v47 + 264),
0,
&cocos2d::CCObject `RTTI Type Descriptor',
&GJGameLevel `RTTI Type Descriptor',
0);
v50 = v49;
if ( v49 && v49[255] - v49[256] == 10 && v49[233] - v49[232] == 100 )
{
v51 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
Size[0] = (size_t)operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(Size[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v51 = qword_14090BFE0;
}
if ( (unsigned __int8)GameStatsManager::hasCompletedLevel(v51, v50) )
++v40;
}
v47 = i;
if ( !i )
break;
}
v45 = *(_QWORD *)&qword_14090BFB0;
CompletedWeeklyLevels = v185;
}
}
if ( !v45 )
{
Size[0] = (size_t)operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(Size[0]);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v45 = *(_QWORD *)&qword_14090BFB0;
}
CompletedEventLevels = GameLevelManager::getCompletedEventLevels(v45, 10, 10);
v187 = CompletedEventLevels;
sub_140044D80(Src, "&dinfow=", 8u);
v53 = (void **)GameToolbox::intToString(v218, CompletedWeeklyLevels);
v54 = v53;
if ( (unsigned __int64)v53[3] > 0xF )
v54 = *v53;
sub_140044D80(Src, v54, (size_t)v53[2]);
sub_14003D310((__int64)v218);
sub_140044D80(Src, "&dinfog=", 8u);
v55 = (void **)GameToolbox::intToString(v218, v40);
v56 = v55;
if ( (unsigned __int64)v55[3] > 0xF )
v56 = *v55;
sub_140044D80(Src, v56, (size_t)v55[2]);
sub_14003D310((__int64)v218);
sub_140044D80(Src, "&dinfoe=", 8u);
v57 = (void **)GameToolbox::intToString(v218, CompletedEventLevels);
v58 = v57;
if ( (unsigned __int64)v57[3] > 0xF )
v58 = *v57;
sub_140044D80(Src, v58, (size_t)v57[2]);
sub_14003D310((__int64)v218);
v41 = v228;
CompletedDailyLevels = 0;
}
v59 = GJAccountManager::sharedState(v35);
v60 = (unsigned int)(*(_DWORD *)(v59 + 360) - *(_DWORD *)(v59 + 364));
if ( *(_DWORD *)(v59 + 360) - *(_DWORD *)(v59 + 364) <= 0 )
{
*(_OWORD *)v218 = 0;
v219 = 0;
v220 = 15;
LOBYTE(v218[0]) = 0;
StarLevelsString = v218;
v62 = v37 | 8;
}
else
{
StarLevelsString = GameLevelManager::getStarLevelsString(a1, &v224);
v62 = v37 | 4;
}
*(_OWORD *)v222 = *StarLevelsString;
*(_OWORD *)Size = StarLevelsString[1];
v223 = *(_OWORD *)Size;
*((_QWORD *)StarLevelsString + 2) = 0;
*((_QWORD *)StarLevelsString + 3) = 15;
*(_BYTE *)StarLevelsString = 0;
if ( (v62 & 8) != 0 )
{
v62 &= ~8u;
if ( v220 > 0xF )
{
v63 = v218[0];
if ( v220 + 1 >= 0x1000 )
{
v63 = *((void **)v218[0] - 1);
if ( (unsigned __int64)((char *)v218[0] - (char *)v63 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v63);
}
}
if ( (v62 & 4) != 0 )
sub_14003D310((__int64)&v224);
v64 = 0;
v65 = Size[0];
if ( Size[0] )
{
sub_140044D80(Src, "&sinfo=", 7u);
v66 = v222;
if ( *((_QWORD *)&v223 + 1) > 0xFu )
v66 = (void **)v222[0];
sub_140044D80(Src, v66, Size[0]);
v67 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
Size[0] = (size_t)operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(Size[0]);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v67 = *(_QWORD *)&qword_14090BFB0;
}
CompletedDailyLevels = GameLevelManager::getCompletedDailyLevels(v67);
LODWORD(Size[0]) = CompletedDailyLevels;
v68 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v196 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v196);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v68 = *(_QWORD *)&qword_14090BFB0;
}
v64 = 0;
v69 = *(_QWORD *)(v68 + 1032);
if ( v69 )
{
v70 = *(_QWORD *)(v69 + 56);
if ( v70 )
{
for ( j = *(_QWORD *)(v70 + 288); ; j = *(_QWORD *)(j + 288) )
{
v72 = (_DWORD *)_RTDynamicCast(
*(_QWORD *)(v70 + 264),
0,
&cocos2d::CCObject `RTTI Type Descriptor',
&GJGameLevel `RTTI Type Descriptor',
0);
v73 = v72;
if ( v72 && v72[255] - v72[256] < 10 && v72[233] - v72[232] == 100 )
{
v74 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v197 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v197);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v74 = qword_14090BFE0;
}
if ( (unsigned __int8)GameStatsManager::hasCompletedLevel(v74, v73) )
++v64;
}
v70 = j;
if ( !j )
break;
}
v68 = *(_QWORD *)&qword_14090BFB0;
CompletedDailyLevels = Size[0];
}
}
if ( !v68 )
{
Size[0] = (size_t)operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(Size[0]);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v68 = *(_QWORD *)&qword_14090BFB0;
}
v75 = GameLevelManager::getCompletedEventLevels(v68, 1, 9);
v189 = v75;
sub_140044D80(Src, "&sinfod=", 8u);
v76 = (void **)GameToolbox::intToString(&v232, CompletedDailyLevels);
v77 = v76;
if ( (unsigned __int64)v76[3] > 0xF )
v77 = *v76;
sub_140044D80(Src, v77, (size_t)v76[2]);
sub_14003D310((__int64)&v232);
sub_140044D80(Src, "&sinfog=", 8u);
v78 = (void **)GameToolbox::intToString(&v232, v64);
v79 = v78;
if ( (unsigned __int64)v78[3] > 0xF )
v79 = *v78;
sub_140044D80(Src, v79, (size_t)v78[2]);
sub_14003D310((__int64)&v232);
sub_140044D80(Src, "&sinfoe=", 8u);
v80 = (void **)GameToolbox::intToString(&v232, v75);
v81 = v80;
if ( (unsigned __int64)v80[3] > 0xF )
v81 = *v80;
sub_140044D80(Src, v81, (size_t)v80[2]);
sub_14003D310((__int64)&v232);
v65 = v223;
}
v215 = 0;
v216 = 0;
v217 = 15;
LOBYTE(v215) = 0;
v82 = GJAccountManager::sharedState(v60);
v83 = cocos2d::CCString::createWithFormat(
(const char *)&word_1406ED6F8,
(unsigned int)(*(_DWORD *)(v82 + 360) - *(_DWORD *)(v82 + 364)));
v84 = (char *)cocos2d::CCString::getCString(v83);
v85 = -1;
do
++v85;
while ( v84[v85] );
sub_140044D80(&v215, v84, v85);
v86 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v198);
v87 = (char *)cocos2d::CCString::getCString(v86);
v88 = -1;
do
++v88;
while ( v87[v88] );
sub_140044D80(&v215, v87, v88);
v89 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v199);
v90 = (char *)cocos2d::CCString::getCString(v89);
v91 = -1;
do
++v91;
while ( v90[v91] );
sub_140044D80(&v215, v90, v91);
v92 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, Stat);
v93 = (char *)cocos2d::CCString::getCString(v92);
v94 = -1;
do
++v94;
while ( v93[v94] );
sub_140044D80(&v215, v93, v94);
v95 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v201);
v96 = (char *)cocos2d::CCString::getCString(v95);
v97 = -1;
do
++v97;
while ( v96[v97] );
sub_140044D80(&v215, v96, v97);
v98 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v202);
v99 = (char *)cocos2d::CCString::getCString(v98);
v100 = -1;
do
++v100;
while ( v99[v100] );
sub_140044D80(&v215, v99, v100);
v101 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v28);
v102 = (char *)cocos2d::CCString::getCString(v101);
v103 = -1;
do
++v103;
while ( v102[v103] );
sub_140044D80(&v215, v102, v103);
v104 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v203);
v105 = (char *)cocos2d::CCString::getCString(v104);
v106 = -1;
do
++v106;
while ( v105[v106] );
sub_140044D80(&v215, v105, v106);
v107 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
Size[0] = (size_t)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(Size[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v107 = qword_14090BFD0;
}
v108 = cocos2d::CCString::createWithFormat(
(const char *)&word_1406ED6F8,
(unsigned int)(*(_DWORD *)(v107 + 748) - *(_DWORD *)(v107 + 752)));
v109 = (char *)cocos2d::CCString::getCString(v108);
v110 = -1;
do
++v110;
while ( v109[v110] );
sub_140044D80(&v215, v109, v110);
v111 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
Size[0] = (size_t)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(Size[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v111 = qword_14090BFD0;
}
v112 = cocos2d::CCString::createWithFormat(
(const char *)&word_1406ED6F8,
(unsigned int)(*(_DWORD *)(v111 + 760) - *(_DWORD *)(v111 + 764)));
v113 = (char *)cocos2d::CCString::getCString(v112);
v114 = -1;
do
++v114;
while ( v113[v114] );
sub_140044D80(&v215, v113, v114);
v115 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
Size[0] = (size_t)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(Size[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v115 = qword_14090BFD0;
}
v116 = cocos2d::CCString::createWithFormat(
(const char *)&word_1406ED6F8,
(unsigned int)(*(_DWORD *)(v115 + 772) - *(_DWORD *)(v115 + 776)));
v117 = (char *)cocos2d::CCString::getCString(v116);
v118 = -1;
do
++v118;
while ( v117[v118] );
sub_140044D80(&v215, v117, v118);
v119 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
Size[0] = (size_t)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(Size[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v119 = qword_14090BFD0;
}
v120 = cocos2d::CCString::createWithFormat(
(const char *)&word_1406ED6F8,
(unsigned int)(*(_DWORD *)(v119 + 784) - *(_DWORD *)(v119 + 788)));
v121 = (char *)cocos2d::CCString::getCString(v120);
v122 = -1;
do
++v122;
while ( v121[v122] );
sub_140044D80(&v215, v121, v122);
v123 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
Size[0] = (size_t)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(Size[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v123 = qword_14090BFD0;
}
v124 = cocos2d::CCString::createWithFormat(
(const char *)&word_1406ED6F8,
(unsigned int)(*(_DWORD *)(v123 + 796) - *(_DWORD *)(v123 + 800)));
v125 = (char *)cocos2d::CCString::getCString(v124);
v126 = -1;
do
++v126;
while ( v125[v126] );
sub_140044D80(&v215, v125, v126);
v127 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
Size[0] = (size_t)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(Size[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v127 = qword_14090BFD0;
}
v128 = cocos2d::CCString::createWithFormat(
(const char *)&word_1406ED6F8,
(unsigned int)(*(_DWORD *)(v127 + 808) - *(_DWORD *)(v127 + 812)));
v129 = (char *)cocos2d::CCString::getCString(v128);
v130 = -1;
do
++v130;
while ( v129[v130] );
sub_140044D80(&v215, v129, v130);
v131 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
Size[0] = (size_t)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(Size[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v131 = qword_14090BFD0;
}
v132 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, *(unsigned __int8 *)(v131 + 944));
v133 = (char *)cocos2d::CCString::getCString(v132);
v134 = -1;
do
++v134;
while ( v133[v134] );
sub_140044D80(&v215, v133, v134);
v135 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
Size[0] = (size_t)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(Size[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v135 = qword_14090BFD0;
}
v136 = cocos2d::CCString::createWithFormat(
(const char *)&word_1406ED6F8,
(unsigned int)(*(_DWORD *)(v135 + 820) - *(_DWORD *)(v135 + 824)));
v137 = (char *)cocos2d::CCString::getCString(v136);
v138 = -1;
do
++v138;
while ( v137[v138] );
sub_140044D80(&v215, v137, v138);
v139 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
Size[0] = (size_t)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(Size[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v139 = qword_14090BFD0;
}
v140 = cocos2d::CCString::createWithFormat(
(const char *)&word_1406ED6F8,
(unsigned int)(*(_DWORD *)(v139 + 904) - *(_DWORD *)(v139 + 908)));
v141 = (char *)cocos2d::CCString::getCString(v140);
v142 = -1;
do
++v142;
while ( v141[v142] );
sub_140044D80(&v215, v141, v142);
if ( v41 )
{
v143 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v41);
v144 = (char *)cocos2d::CCString::getCString(v143);
v145 = -1;
do
++v145;
while ( v144[v145] );
sub_140044D80(&v215, v144, v145);
v146 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v185);
v147 = (char *)cocos2d::CCString::getCString(v146);
v148 = -1;
do
++v148;
while ( v147[v148] );
sub_140044D80(&v215, v147, v148);
v149 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v40);
v150 = (char *)cocos2d::CCString::getCString(v149);
v151 = -1;
do
++v151;
while ( v150[v151] );
sub_140044D80(&v215, v150, v151);
if ( v187 > 0 )
{
v152 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8);
v153 = (char *)cocos2d::CCString::getCString(v152);
v154 = -1;
do
++v154;
while ( v153[v154] );
sub_140044D80(&v215, v153, v154);
}
}
if ( v65 )
{
v155 = v222;
if ( *((_QWORD *)&v223 + 1) > 0xFu )
v155 = (void **)v222[0];
sub_140044D80(&v215, v155, v65);
v156 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, CompletedDailyLevels);
v157 = (char *)cocos2d::CCString::getCString(v156);
v158 = -1;
do
++v158;
while ( v157[v158] );
sub_140044D80(&v215, v157, v158);
v159 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v64);
v160 = (char *)cocos2d::CCString::getCString(v159);
v161 = -1;
do
++v161;
while ( v160[v161] );
sub_140044D80(&v215, v160, v161);
if ( v189 > 0 )
{
v162 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, (unsigned int)v189);
v163 = (char *)cocos2d::CCString::getCString(v162);
v164 = -1;
do
++v164;
while ( v163[v164] );
sub_140044D80(&v215, v163, v164);
}
}
LODWORD(v182) = 67;
LODWORD(Reserved) = 112;
v165 = cocos2d::CCString::createWithFormat("%c%s%s%c%c%s", 120, "I35", "fsAa", Reserved, v182, "Rg");
v166 = (char *)cocos2d::CCString::getCString(v165);
v167 = -1;
do
++v167;
while ( v166[v167] );
sub_140044D80(&v215, v166, v167);
v168 = &v215;
if ( v217 > 0xF )
v168 = (__int128 *)v215;
v169 = &v215;
if ( v217 > 0xF )
v169 = (__int128 *)v215;
v170 = -1;
do
++v170;
while ( *((_BYTE *)v168 + v170) );
sub_14007E1A0((__int64)v169, v170, Size);
sub_14007E470((unsigned __int8 *)Size, &v232);
*(_OWORD *)Size = 0;
v213 = 0;
v214 = 0;
v171 = -1;
do
++v171;
while ( *((_BYTE *)&v232 + v171) );
sub_14003D230(Size, &v232, v171);
v224 = 0;
v225 = 5;
v226 = 15;
strcpy((char *)&v224, "85271");
cocos2d::ZipUtils::base64EncodeEnc(v231, Size, &v224);
if ( v214 > 0xF )
{
v172 = (void *)Size[0];
if ( v214 + 1 >= 0x1000 )
{
v172 = *(void **)(Size[0] - 8);
if ( Size[0] - (unsigned __int64)v172 - 8 > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v172);
}
v213 = 0;
v214 = 15;
LOBYTE(Size[0]) = 0;
sub_1402190E0(v230, 0xAu);
v173 = (const char *)v231;
if ( v231[3] > 0xFu )
v173 = (const char *)v231[0];
v174 = (const char *)v230;
if ( v230[3] > 0xFu )
v174 = (const char *)v230[0];
v175 = cocos2d::CCString::createWithFormat("&seed=%s&seed2=%s", v174, v173);
v176 = (char *)cocos2d::CCString::getCString(v175);
v177 = -1;
do
++v177;
while ( v176[v177] );
sub_140044D80(Src, v176, v177);
Size[0] = (size_t)&v224;
v224 = 0;
v225 = 0;
v226 = 0;
*(_QWORD *)&v224 = sub_14003D460(0x20u);
v225 = 17;
v226 = 31;
strcpy((char *)v224, "Update user score");
v178 = Src;
if ( Src[3] > 0xFu )
v178 = (_QWORD *)Src[0];
v232 = 0;
v233 = 0;
v234 = 0;
do
++v31;
while ( *((_BYTE *)v178 + v31) );
sub_14003D230(&v232, v178, v31);
*(_OWORD *)v218 = 0;
v219 = 0;
v220 = 0;
v218[0] = sub_14003D460(0x40u);
v219 = 58;
v220 = 63;
strcpy((char *)v218[0], "https://www.boomlings.com/database/updateGJUserScore22.php");
GameLevelManager::ProcessHttpRequest(
(cocos2d::CCActionManager **)a1,
(__int64)v218,
(const char *)&v232,
(const char *)&v224,
0xAu);
sub_14003D310((__int64)v230);
sub_14003D310((__int64)v231);
sub_14003D310((__int64)&v215);
if ( *((_QWORD *)&v223 + 1) > 0xFu )
{
v179 = v222[0];
if ( (unsigned __int64)(*((_QWORD *)&v223 + 1) + 1LL) >= 0x1000 )
{
v179 = *((void **)v222[0] - 1);
if ( (unsigned __int64)((char *)v222[0] - (char *)v179 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v179);
}
if ( *((_QWORD *)&v228 + 1) > 0xFu )
{
v180 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v228 + 1) + 1LL) >= 0x1000 )
{
v180 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v180 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v180);
}
sub_14003D310((__int64)Src);
sub_14003D310((__int64)v229);
}
}