//
// GameManager::dataLoaded from 0x1402826b0 to 0x140284d78 (9928 bytes)
//
// 2 xrefs:
// > ??> @ 0x14075e170
// > ??> @ 0x14091d0cc
//
// 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:29:02 +0000
//
// Hidden C++ exception states: #wind=47
void __fastcall GameManager::dataLoaded(__int64 a1, DS_Dictionary *a2)
{
__int64 v4; // rax
struct ObjectDecoderDelegate *v5; // rbx
ObjectDecoder *v6; // rax
cocos2d::CCObject *DictForKey; // rax
cocos2d::CCObject *v8; // rbx
cocos2d::CCObject *v9; // rcx
cocos2d::CCObject *v10; // rax
__int64 v11; // rcx
cocos2d::CCObject *v12; // rbx
cocos2d::CCObject *v13; // rcx
__int64 v14; // rcx
__int64 v15; // r14
void *v16; // r8
__int64 v17; // rbx
void *v18; // rcx
void *v19; // rcx
cocos2d::CCObject *v20; // rax
cocos2d::CCObject *v21; // rbx
__int64 v22; // rcx
cocos2d::CCObject *v23; // rcx
cocos2d::CCObject *v24; // rax
cocos2d::CCObject *v25; // rbx
cocos2d::CCObject *v26; // rcx
__int64 StringForKey; // rax
__int64 v28; // rax
int v29; // eax
int v30; // ebx
float v31; // xmm0_4
int v32; // eax
int v33; // ebx
float v34; // xmm0_4
int v35; // eax
int v36; // ebx
float v37; // xmm0_4
int v38; // eax
int v39; // ebx
float v40; // xmm0_4
int v41; // eax
int v42; // ebx
float v43; // xmm0_4
signed int v44; // r14d
int v45; // eax
int v46; // ebx
int v47; // eax
float v48; // xmm0_4
int v49; // eax
int v50; // ebx
int v51; // eax
float v52; // xmm0_4
int v53; // eax
int v54; // ebx
int v55; // eax
float v56; // xmm0_4
int v57; // eax
int v58; // ebx
int v59; // eax
float v60; // xmm0_4
int v61; // eax
int v62; // ebx
int v63; // eax
float v64; // xmm0_4
int v65; // eax
int v66; // ebx
int v67; // eax
float v68; // xmm0_4
int v69; // eax
int v70; // ebx
int v71; // eax
float v72; // xmm0_4
int v73; // eax
int v74; // ebx
int v75; // eax
float v76; // xmm0_4
int v77; // eax
int v78; // ebx
int v79; // eax
float v80; // xmm0_4
int v81; // eax
int v82; // ebx
int v83; // eax
float v84; // xmm0_4
int v85; // eax
int v86; // ebx
int v87; // eax
float v88; // xmm0_4
int v89; // eax
int v90; // eax
int v91; // ebx
float v92; // xmm0_4
__int64 v93; // rdx
__int64 v94; // rcx
__int64 v95; // r8
__int64 v96; // r15
cocos2d::CCObject *v97; // rax
cocos2d::CCObject *v98; // rbx
__int64 v99; // rcx
cocos2d::CCObject *v100; // rcx
__int64 v101; // rcx
__int64 v102; // rcx
__int64 v103; // rcx
__int64 v104; // rbx
int v105; // eax
unsigned int v106; // r15d
int v107; // r8d
__int64 v108; // rax
int v109; // eax
int v110; // r12d
__int64 v111; // rdx
__int64 v112; // rcx
__int64 v113; // r8
__int64 v114; // rcx
int v115; // eax
int v116; // eax
int v117; // eax
int v118; // eax
__m128 v119; // xmm0
_QWORD *v120; // r13
_QWORD *v121; // rbx
void *v122; // rcx
int v123; // eax
int v124; // r13d
int i; // ebx
int v126; // eax
__m128 v127; // xmm11
float FloatForKey; // xmm10_4
float v129; // xmm9_4
float v130; // xmm8_4
float v131; // xmm7_4
float v132; // xmm6_4
__int32 v133; // eax
_OWORD *v134; // rax
__m128 v135; // xmm11
__m128 v136; // xmm11
__m128 v137; // xmm11
__m128 v138; // xmm0
__m128 v139; // xmm0
int v140; // eax
int v141; // eax
int v142; // eax
int v143; // eax
__int64 *v144; // rax
__int64 v145; // rcx
__int64 *v146; // rax
__int64 v147; // rcx
__int64 *v148; // rax
__int64 v149; // rcx
__int64 *v150; // rax
__int64 v151; // rcx
__int64 *v152; // rax
__int64 v153; // rcx
__int64 v154; // rax
__int64 v155; // rax
__int64 v156; // rax
__int64 v157; // rax
__int64 v158; // rax
__int64 v159; // rax
__int64 v160; // rax
float v161; // xmm6_4
float v162; // xmm0_4
__int64 v163; // rax
__int64 v164; // rcx
__int64 v165; // rbx
__int64 v166; // rax
int v167; // eax
__int64 v168; // rax
__int64 v169; // rax
__int64 v170; // rax
__int64 ShaPassword; // rax
__int64 v172; // rcx
__int64 v173; // rax
__int64 v174; // rcx
__int64 v175; // rax
__int64 v176; // rax
int v177; // eax
int v178; // ebx
float v179; // xmm0_4
__int64 v180; // rdx
__int64 v181; // rcx
__int64 v182; // r8
int v183; // eax
cocos2d::CCArray *v184; // r13
unsigned int j; // r15d
int v186; // edx
int v187; // ecx
__crt_locale_pointers *v188; // r8
struct cocos2d::CCObject *v189; // rax
cocos2d::CCString *v190; // rax
__int64 v191; // rcx
const char *CString; // rbx
__int64 v193; // r8
unsigned __int64 v194; // rdx
void *v195; // rcx
__int64 v196; // rax
size_t v197; // r8
__int64 v198; // rcx
__int64 MainLevel; // rbx
__int64 v200; // rcx
__int64 v201; // rcx
__int64 v202; // rcx
__int64 v203; // rbx
__int64 v204; // rcx
__int64 v205; // rcx
__int64 v206; // rcx
__int64 v207; // rcx
__int64 v208; // rcx
__int64 v209; // rcx
__int64 v210; // rcx
__int64 v211; // rcx
__int64 v212; // rcx
__int64 v213; // rcx
__int64 v214; // rcx
__int64 v215; // rcx
__int64 v216; // rcx
__int64 v217; // rcx
__int64 v218; // rcx
__int64 v219; // rcx
unsigned __int8 BoolForKey; // al
__int64 v221; // rbx
__int64 v222; // rsi
__int64 v223; // rax
__int64 v224; // rsi
__int64 v225; // rbx
__int64 v226; // rax
__int64 v227; // rsi
__int64 v228; // rbx
__int64 v229; // rax
__int64 v230; // rdx
__int64 v231; // rcx
__int64 v232; // r8
cocos2d::CCString *v233; // rax
int v234; // ebx
void *v235; // r8
__int64 v236; // rbx
struct cocos2d::CCString *v237; // rax
void *v238; // rcx
cocos2d::CCString *v239; // rax
int v240; // ebx
void *v241; // r8
__int64 v242; // rbx
struct cocos2d::CCString *v243; // rax
void *v244; // rcx
void *v245; // [rsp+38h] [rbp-D0h]
void *v246; // [rsp+38h] [rbp-D0h]
void *v247; // [rsp+38h] [rbp-D0h]
void *v248; // [rsp+38h] [rbp-D0h]
void *v249; // [rsp+38h] [rbp-D0h]
void *v250; // [rsp+38h] [rbp-D0h]
void *v251; // [rsp+38h] [rbp-D0h]
void *v252; // [rsp+38h] [rbp-D0h]
void *v253; // [rsp+38h] [rbp-D0h]
void *v254; // [rsp+38h] [rbp-D0h]
void *v255; // [rsp+38h] [rbp-D0h]
void *v256; // [rsp+38h] [rbp-D0h]
void *v257; // [rsp+38h] [rbp-D0h]
void *v258; // [rsp+38h] [rbp-D0h]
void *v259; // [rsp+38h] [rbp-D0h]
void *v260; // [rsp+38h] [rbp-D0h]
void *v261; // [rsp+38h] [rbp-D0h]
void *v262; // [rsp+38h] [rbp-D0h]
void *v263; // [rsp+38h] [rbp-D0h]
void *v264; // [rsp+38h] [rbp-D0h]
void *v265; // [rsp+38h] [rbp-D0h]
void *v266; // [rsp+38h] [rbp-D0h]
void *v267; // [rsp+38h] [rbp-D0h]
void *v268; // [rsp+38h] [rbp-D0h]
void *v269; // [rsp+38h] [rbp-D0h]
void *v270; // [rsp+40h] [rbp-C8h] BYREF
void *Src; // [rsp+48h] [rbp-C0h]
void *Src_8[2]; // [rsp+50h] [rbp-B8h] BYREF
__m128 v273; // [rsp+60h] [rbp-A8h]
void *Block_8[2]; // [rsp+70h] [rbp-98h] BYREF
__int64 v275; // [rsp+80h] [rbp-88h]
unsigned __int64 v276; // [rsp+88h] [rbp-80h]
v4 = GJObjectDecoder::sharedDecoder();
v5 = (struct ObjectDecoderDelegate *)(v4 + 320);
if ( !v4 )
v5 = nullptr;
v6 = (ObjectDecoder *)ObjectDecoder::sharedDecoder();
ObjectDecoder::setDelegate(v6, v5);
if ( !*(_QWORD *)(a1 + 432) )
{
DictForKey = DS_Dictionary::getDictForKey(a2, "valueKeeper", 0);
v8 = DictForKey;
if ( *(cocos2d::CCObject **)(a1 + 432) != DictForKey )
{
if ( DictForKey )
cocos2d::CCObject::retain(DictForKey);
v9 = *(cocos2d::CCObject **)(a1 + 432);
if ( v9 )
cocos2d::CCObject::release(v9);
*(_QWORD *)(a1 + 432) = v8;
}
}
v10 = *(cocos2d::CCObject **)(a1 + 440);
if ( !v10 )
{
v12 = DS_Dictionary::getDictForKey(a2, "localKeeper", 0);
if ( !v12 )
v12 = (cocos2d::CCObject *)cocos2d::CCDictionary::create(v11);
v10 = *(cocos2d::CCObject **)(a1 + 440);
if ( v10 != v12 )
{
if ( v12 )
cocos2d::CCObject::retain(v12);
v13 = *(cocos2d::CCObject **)(a1 + 440);
if ( v13 )
cocos2d::CCObject::release(v13);
*(_QWORD *)(a1 + 440) = v12;
v10 = v12;
}
}
v14 = *(_QWORD *)(a1 + 432);
if ( v14 && v10 )
{
v275 = 13;
v276 = 15;
strcpy((char *)Block_8, "autoBackupDir");
HIWORD(Block_8[1]) = 0;
v15 = cocos2d::CCDictionary::objectForKey(v14, Block_8);
if ( v276 > 0xF )
{
v16 = Block_8[0];
if ( v276 + 1 >= 0x1000 )
{
v16 = *((void **)Block_8[0] - 1);
if ( (unsigned __int64)((char *)Block_8[0] - (char *)v16 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v16);
}
v275 = 0;
v276 = 15;
LOBYTE(Block_8[0]) = 0;
if ( v15 )
{
v273.m128_u64[0] = 13;
v273.m128_u64[1] = 15;
strcpy((char *)Src_8, "autoBackupDir");
HIWORD(Src_8[1]) = 0;
v17 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 440), Src_8);
sub_14003D310((__int64)Src_8);
if ( !v17 )
{
v273.m128_u64[0] = 13;
v273.m128_u64[1] = 15;
strcpy((char *)Src_8, "autoBackupDir");
HIWORD(Src_8[1]) = 0;
cocos2d::CCDictionary::setObject(*(_QWORD *)(a1 + 440), v15, Src_8);
if ( v273.m128_u64[1] > 0xF )
{
v18 = Src_8[0];
if ( v273.m128_u64[1] + 1 >= 0x1000 )
{
v18 = *((void **)Src_8[0] - 1);
if ( (unsigned __int64)((char *)Src_8[0] - (char *)v18 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v18);
}
}
v273.m128_u64[0] = 13;
v273.m128_u64[1] = 15;
strcpy((char *)Src_8, "autoBackupDir");
HIWORD(Src_8[1]) = 0;
cocos2d::CCDictionary::removeObjectForKey(*(_QWORD *)(a1 + 432), Src_8);
if ( v273.m128_u64[1] > 0xF )
{
v19 = Src_8[0];
if ( v273.m128_u64[1] + 1 >= 0x1000 )
{
v19 = *((void **)Src_8[0] - 1);
if ( (unsigned __int64)((char *)Src_8[0] - (char *)v19 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v19);
}
}
}
v20 = DS_Dictionary::getDictForKey(a2, "unlockValueKeeper", 0);
v21 = v20;
v22 = *(_QWORD *)(a1 + 456);
if ( v22 )
{
GameToolbox::mergeDictsSaveLargestInt(v22, (__int64)v20);
}
else if ( v20 )
{
cocos2d::CCObject::retain(v20);
v23 = *(cocos2d::CCObject **)(a1 + 456);
if ( v23 )
cocos2d::CCObject::release(v23);
*(_QWORD *)(a1 + 456) = v21;
}
if ( !*(_QWORD *)(a1 + 464) )
{
v24 = DS_Dictionary::getDictForKey(a2, "customObjectDict", 0);
v25 = v24;
if ( *(cocos2d::CCObject **)(a1 + 464) != v24 )
{
if ( v24 )
cocos2d::CCObject::retain(v24);
v26 = *(cocos2d::CCObject **)(a1 + 464);
if ( v26 )
cocos2d::CCObject::release(v26);
*(_QWORD *)(a1 + 464) = v25;
}
}
StringForKey = DS_Dictionary::getStringForKey(a2, Src_8, "playerUDID");
sub_140059C40(a1 + 624, StringForKey);
sub_14003D310((__int64)Src_8);
v28 = DS_Dictionary::getStringForKey(a2, Src_8, "playerName");
sub_140059C40(a1 + 656, v28);
sub_14003D310((__int64)Src_8);
DS_Dictionary::getIntegerForKey(a2, "playerUserID");
v30 = v29;
*(_DWORD *)(a1 + 700) = v29;
v31 = (float)((float)rand() / 32767.0) * 1000.0;
*(_DWORD *)(a1 + 696) = (int)v31;
*(_DWORD *)(a1 + 692) = v30 + (int)v31;
DS_Dictionary::getIntegerForKey(a2, "playerFrame");
v33 = v32;
*(_DWORD *)(a1 + 756) = v32;
v34 = (float)((float)rand() / 32767.0) * 1000.0;
*(_DWORD *)(a1 + 752) = (int)v34;
*(_DWORD *)(a1 + 748) = v33 + (int)v34;
DS_Dictionary::getIntegerForKey(a2, "playerColor");
v36 = v35;
*(_DWORD *)(a1 + 852) = v35;
v37 = (float)((float)rand() / 32767.0) * 1000.0;
*(_DWORD *)(a1 + 848) = (int)v37;
*(_DWORD *)(a1 + 844) = v36 + (int)v37;
DS_Dictionary::getIntegerForKey(a2, "playerColor2");
v39 = v38;
*(_DWORD *)(a1 + 864) = v38;
v40 = (float)((float)rand() / 32767.0) * 1000.0;
*(_DWORD *)(a1 + 860) = (int)v40;
*(_DWORD *)(a1 + 856) = v39 + (int)v40;
DS_Dictionary::getIntegerForKey(a2, "playerColor3");
v42 = v41;
*(_DWORD *)(a1 + 876) = v41;
v43 = (float)((float)rand() / 32767.0) * 1000.0;
*(_DWORD *)(a1 + 872) = (int)v43;
*(_DWORD *)(a1 + 868) = v42 + (int)v43;
DS_Dictionary::getIntegerForKey(a2, "playerShip");
v44 = 1;
if ( v45 >= 1 )
{
DS_Dictionary::getIntegerForKey(a2, "playerShip");
v46 = v47;
}
else
{
v46 = 1;
}
*(_DWORD *)(a1 + 768) = v46;
v48 = (float)((float)rand() / 32767.0) * 1000.0;
*(_DWORD *)(a1 + 764) = (int)v48;
*(_DWORD *)(a1 + 760) = (int)v48 + v46;
DS_Dictionary::getIntegerForKey(a2, "playerBall");
if ( v49 >= 1 )
{
DS_Dictionary::getIntegerForKey(a2, "playerBall");
v50 = v51;
}
else
{
v50 = 1;
}
*(_DWORD *)(a1 + 780) = v50;
v52 = (float)((float)rand() / 32767.0) * 1000.0;
*(_DWORD *)(a1 + 776) = (int)v52;
*(_DWORD *)(a1 + 772) = (int)v52 + v50;
DS_Dictionary::getIntegerForKey(a2, "playerBird");
if ( v53 >= 1 )
{
DS_Dictionary::getIntegerForKey(a2, "playerBird");
v54 = v55;
}
else
{
v54 = 1;
}
*(_DWORD *)(a1 + 792) = v54;
v56 = (float)((float)rand() / 32767.0) * 1000.0;
*(_DWORD *)(a1 + 788) = (int)v56;
*(_DWORD *)(a1 + 784) = (int)v56 + v54;
DS_Dictionary::getIntegerForKey(a2, "playerDart");
if ( v57 >= 1 )
{
DS_Dictionary::getIntegerForKey(a2, "playerDart");
v58 = v59;
}
else
{
v58 = 1;
}
*(_DWORD *)(a1 + 804) = v58;
v60 = (float)((float)rand() / 32767.0) * 1000.0;
*(_DWORD *)(a1 + 800) = (int)v60;
*(_DWORD *)(a1 + 796) = (int)v60 + v58;
DS_Dictionary::getIntegerForKey(a2, "playerRobot");
if ( v61 >= 1 )
{
DS_Dictionary::getIntegerForKey(a2, "playerRobot");
v62 = v63;
}
else
{
v62 = 1;
}
*(_DWORD *)(a1 + 816) = v62;
v64 = (float)((float)rand() / 32767.0) * 1000.0;
*(_DWORD *)(a1 + 812) = (int)v64;
*(_DWORD *)(a1 + 808) = (int)v64 + v62;
DS_Dictionary::getIntegerForKey(a2, "playerSpider");
if ( v65 >= 1 )
{
DS_Dictionary::getIntegerForKey(a2, "playerSpider");
v66 = v67;
}
else
{
v66 = 1;
}
*(_DWORD *)(a1 + 828) = v66;
v68 = (float)((float)rand() / 32767.0) * 1000.0;
*(_DWORD *)(a1 + 824) = (int)v68;
*(_DWORD *)(a1 + 820) = (int)v68 + v66;
DS_Dictionary::getIntegerForKey(a2, "playerJetpack");
if ( v69 >= 1 )
{
DS_Dictionary::getIntegerForKey(a2, "playerJetpack");
v70 = v71;
}
else
{
v70 = 1;
}
*(_DWORD *)(a1 + 924) = v70;
v72 = (float)((float)rand() / 32767.0) * 1000.0;
*(_DWORD *)(a1 + 920) = (int)v72;
*(_DWORD *)(a1 + 916) = (int)v72 + v70;
DS_Dictionary::getIntegerForKey(a2, "playerSwing");
if ( v73 >= 1 )
{
DS_Dictionary::getIntegerForKey(a2, "playerSwing");
v74 = v75;
}
else
{
v74 = 1;
}
*(_DWORD *)(a1 + 840) = v74;
v76 = (float)((float)rand() / 32767.0) * 1000.0;
*(_DWORD *)(a1 + 836) = (int)v76;
*(_DWORD *)(a1 + 832) = (int)v76 + v74;
DS_Dictionary::getIntegerForKey(a2, "playerStreak");
if ( v77 >= 1 )
{
DS_Dictionary::getIntegerForKey(a2, "playerStreak");
v78 = v79;
}
else
{
v78 = 1;
}
*(_DWORD *)(a1 + 888) = v78;
v80 = (float)((float)rand() / 32767.0) * 1000.0;
*(_DWORD *)(a1 + 884) = (int)v80;
*(_DWORD *)(a1 + 880) = (int)v80 + v78;
DS_Dictionary::getIntegerForKey(a2, "playerShipStreak");
if ( v81 >= 1 )
{
DS_Dictionary::getIntegerForKey(a2, "playerShipStreak");
v82 = v83;
}
else
{
v82 = 1;
}
*(_DWORD *)(a1 + 900) = v82;
v84 = (float)((float)rand() / 32767.0) * 1000.0;
*(_DWORD *)(a1 + 896) = (int)v84;
*(_DWORD *)(a1 + 892) = (int)v84 + v82;
DS_Dictionary::getIntegerForKey(a2, "playerDeathEffect");
if ( v85 >= 1 )
{
DS_Dictionary::getIntegerForKey(a2, "playerDeathEffect");
v86 = v87;
}
else
{
v86 = 1;
}
*(_DWORD *)(a1 + 912) = v86;
v88 = (float)((float)rand() / 32767.0) * 1000.0;
*(_DWORD *)(a1 + 908) = (int)v88;
*(_DWORD *)(a1 + 904) = (int)v88 + v86;
*(_BYTE *)(a1 + 944) = DS_Dictionary::getBoolForKey(a2, "playerGlow");
DS_Dictionary::getIntegerForKey(a2, "playerIconType");
*(_DWORD *)(a1 + 948) = v89;
DS_Dictionary::getIntegerForKey(a2, "secretNumber");
v91 = v90;
v92 = (float)((float)rand() / 32767.0) * 1000.0;
*(_DWORD *)(a1 + 940) = (int)v92;
*(_DWORD *)(a1 + 936) = v91 + (int)v92;
*(_BYTE *)(a1 + 1132) = GameManager::getGameVariable(a1, "0028");
if ( GameManager::getGameVariable(a1, "0220") || GameManager::getGameVariable(a1, "0221") )
{
GameManager::setGameVariable(a1, "0243", 1u);
GameManager::setGameVariable(a1, "0220", 0);
GameManager::setGameVariable(a1, "0221", 0);
}
v96 = AchievementManager::sharedState(v94, v93, v95);
v97 = DS_Dictionary::getDictForKey(a2, "reportedAchievements", 0);
v98 = v97;
v99 = *(_QWORD *)(v96 + 352);
if ( v99 )
{
GameToolbox::mergeDictsSaveLargestInt(v99, (__int64)v97);
}
else if ( v97 )
{
cocos2d::CCObject::retain(v97);
v100 = *(cocos2d::CCObject **)(v96 + 352);
if ( v100 )
cocos2d::CCObject::release(v100);
*(_QWORD *)(v96 + 352) = v98;
}
v101 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v270 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v270);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v101 = qword_14090BFE0;
}
GameStatsManager::dataLoaded(v101, a2);
v102 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v270 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v270);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v102 = *(_QWORD *)&qword_14090BFB0;
}
GameLevelManager::dataLoaded(v102, a2);
v103 = qword_14090C070;
if ( !qword_14090C070 )
{
v270 = operator new(0x3D0u);
qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v270);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);
v103 = qword_14090C070;
}
MusicDownloadManager::dataLoaded(v103, a2);
v104 = GJKeybindManager::sharedState();
if ( a2 )
{
DS_Dictionary::getIntegerForKey(a2, "GJKB_Version");
v106 = v105;
if ( v105 > 0 )
{
DS_Dictionary::getStringForKey(a2, Src_8, "GJKB_Binds");
if ( v273.m128_u64[0]
&& (LODWORD(v270) = 0,
LOBYTE(v107) = 1,
GJKeybindManager::parseBindsBlob(v104, (unsigned int)Src_8, v107, (unsigned int)&v270, 0),
(_DWORD)v270) )
{
GJKeybindManager::applyNewDefaults(v104, v106);
}
else
{
GJKeybindManager::loadDefaults(v104);
}
sub_14003D310((__int64)Src_8);
}
}
v108 = EditorSFXManager::sharedState();
EditorSFXManager::dataLoaded(v108, a2);
DS_Dictionary::getIntegerForKey(a2, "binaryVersion");
v110 = v109;
*(_BYTE *)(AchievementManager::sharedState(v112, v111, v113) + 360) = 1;
if ( !qword_14090BFE0 )
{
v270 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v270);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
}
GameStatsManager::recountSpecialStats();
if ( !*(_BYTE *)(a1 + 512) )
{
if ( !qword_14090BFE0 )
{
v270 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v270);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
}
GameStatsManager::tryFixPathBug();
if ( !qword_14090BFE0 )
{
v270 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v270);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
}
GameStatsManager::verifyPathAchievements();
}
if ( !qword_14090BFE0 )
{
v270 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v270);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
}
if ( !(unsigned __int8)GameStatsManager::isItemUnlocked(v114, 12, 16) )
*(_QWORD *)(a1 + 1164) = 0;
*(_BYTE *)(a1 + 953) = DS_Dictionary::getBoolForKey(a2, "showSongMarkers");
*(_BYTE *)(a1 + 954) = DS_Dictionary::getBoolForKey(a2, "showBPMMarkers");
*(_BYTE *)(a1 + 956) = DS_Dictionary::getBoolForKey(a2, "showProgressBar");
*(_BYTE *)(a1 + 960) = DS_Dictionary::getBoolForKey(a2, "clickedEditor");
*(_BYTE *)(a1 + 959) = DS_Dictionary::getBoolForKey(a2, "clickedGarage");
*(_BYTE *)(a1 + 961) = DS_Dictionary::getBoolForKey(a2, "clickedName");
*(_BYTE *)(a1 + 962) = DS_Dictionary::getBoolForKey(a2, "clickedPractice");
*(_BYTE *)(a1 + 963) = DS_Dictionary::getBoolForKey(a2, "showedEditorGuide");
*(_BYTE *)(a1 + 964) = DS_Dictionary::getBoolForKey(a2, "showedRateDiffDialog");
*(_BYTE *)(a1 + 965) = DS_Dictionary::getBoolForKey(a2, "showedRateStarDialog");
*(_BYTE *)(a1 + 966) = DS_Dictionary::getBoolForKey(a2, "showedLowDetailDialog");
*(_BYTE *)(a1 + 1056) = DS_Dictionary::getBoolForKey(a2, "hasRatedGame");
if ( !*(_BYTE *)(a1 + 512) )
{
*(_BYTE *)(a1 + 957) = DS_Dictionary::getBoolForKey(a2, "performanceMode");
*(_BYTE *)(a1 + 955) = DS_Dictionary::getBoolForKey(a2, "recordGameplay");
DS_Dictionary::getIntegerForKey(a2, "bootups");
*(_DWORD *)(a1 + 1052) = v115 + 1;
*(float *)(a1 + 704) = DS_Dictionary::getFloatForKey(a2, "bgVolume");
*(float *)(a1 + 708) = DS_Dictionary::getFloatForKey(a2, "sfxVolume");
DS_Dictionary::getIntegerForKey(a2, "timeOffset");
v119 = (__m128)COERCE_UNSIGNED_INT((float)v116);
*(_DWORD *)(a1 + 712) = v119.m128_i32[0];
DS_Dictionary::getIntegerForKey(a2, "resolution");
*(_DWORD *)(a1 + 1088) = v117;
DS_Dictionary::getIntegerForKey(a2, "texQuality");
*(_DWORD *)(a1 + 1092) = v118;
*(float *)(a1 + 1136) = DS_Dictionary::getFloatForKey(a2, "customFPSTarget");
v119.m128_f32[0] = DS_Dictionary::getFloatForKey(a2, "scrollSensitivity");
*(_DWORD *)(a1 + 1140) = v119.m128_i32[0];
if ( v119.m128_f32[0] <= 0.0 )
*(_DWORD *)(a1 + 1140) = 1065353216;
v120 = *(_QWORD **)(a1 + 1144);
v121 = (_QWORD *)v120[1];
while ( !*((_BYTE *)v121 + 25) )
{
sub_140068DC0(a1 + 1144, a1 + 1144, v121[2]);
v122 = v121;
v121 = (_QWORD *)*v121;
j_j_free(v122);
}
v120[1] = v120;
*v120 = v120;
v120[2] = v120;
*(_QWORD *)(a1 + 1152) = 0;
DS_Dictionary::getIntegerForKey(a2, "winStateCount");
v124 = v123;
for ( i = 0; i < v124; ++i )
{
swprintf((wchar_t *const)Block_8, 0x20u, "ws_%d_k", i);
*(double *)v119.m128_u64 = DS_Dictionary::getIntegerForKey(a2, (const char *)Block_8);
LODWORD(v270) = v126;
if ( v126 )
{
v273.m128_i8[12] = 0;
swprintf((wchar_t *const)Block_8, 0x20u, "ws_%d_cx", i);
v119.m128_f32[0] = DS_Dictionary::getFloatForKey(a2, (const char *)Block_8);
v127 = v119;
swprintf((wchar_t *const)Block_8, 0x20u, "ws_%d_cy", i);
FloatForKey = DS_Dictionary::getFloatForKey(a2, (const char *)Block_8);
swprintf((wchar_t *const)Block_8, 0x20u, "ws_%d_w", i);
v129 = DS_Dictionary::getFloatForKey(a2, (const char *)Block_8);
swprintf((wchar_t *const)Block_8, 0x20u, "ws_%d_h", i);
v130 = DS_Dictionary::getFloatForKey(a2, (const char *)Block_8);
swprintf((wchar_t *const)Block_8, 0x20u, "ws_%d_s", i);
v131 = DS_Dictionary::getFloatForKey(a2, (const char *)Block_8);
swprintf((wchar_t *const)Block_8, 0x20u, "ws_%d_so", i);
v132 = DS_Dictionary::getFloatForKey(a2, (const char *)Block_8);
swprintf((wchar_t *const)Block_8, 0x20u, "ws_%d_v", i);
DS_Dictionary::getIntegerForKey(a2, (const char *)Block_8);
v273.m128_i32[2] = v133;
v134 = (_OWORD *)sub_14017FF90((__int64 *)(a1 + 1144), (int *)&v270);
v135 = _mm_shuffle_ps(v127, v127, 225);
v135.m128_f32[0] = FloatForKey;
v136 = _mm_shuffle_ps(v135, v135, 198);
v136.m128_f32[0] = v129;
v137 = _mm_shuffle_ps(v136, v136, 39);
v137.m128_f32[0] = v130;
*(__m128 *)Src_8 = _mm_shuffle_ps(v137, v137, 57);
*v134 = *(_OWORD *)Src_8;
v138 = v273;
v138.m128_f32[0] = v131;
v139 = _mm_shuffle_ps(v138, v138, 225);
v139.m128_f32[0] = v132;
v119 = _mm_shuffle_ps(v139, v139, 225);
v273 = v119;
v134[1] = v119;
}
}
DS_Dictionary::getIntegerForKey(a2, "customMenuSongID");
*(_DWORD *)(a1 + 1164) = v140;
DS_Dictionary::getIntegerForKey(a2, "customPracticeSongID");
*(_DWORD *)(a1 + 1168) = v141;
DS_Dictionary::getIntegerForKey(a2, "idNameSortMode");
*(_DWORD *)(a1 + 1172) = v142;
DS_Dictionary::getIntegerForKey(a2, "newsLastReadID");
*(_DWORD *)(a1 + 1176) = v143;
v144 = (__int64 *)DS_Dictionary::getStringForKey(a2, Src_8, "dpad01");
GameManager::loadDpadFromString(v145, a1 + 1308, v144);
v146 = (__int64 *)DS_Dictionary::getStringForKey(a2, Src_8, "dpad02");
GameManager::loadDpadFromString(v147, a1 + 1348, v146);
v148 = (__int64 *)DS_Dictionary::getStringForKey(a2, Src_8, "dpad03");
GameManager::loadDpadFromString(v149, a1 + 1388, v148);
v150 = (__int64 *)DS_Dictionary::getStringForKey(a2, Src_8, "dpad04");
GameManager::loadDpadFromString(v151, a1 + 1428, v150);
v152 = (__int64 *)DS_Dictionary::getStringForKey(a2, Src_8, "dpad05");
GameManager::loadDpadFromString(v153, a1 + 1468, v152);
v154 = DS_Dictionary::getStringForKey(a2, Src_8, "dpadLayout01");
sub_140059C40(a1 + 1512, v154);
sub_14003D310((__int64)Src_8);
v155 = DS_Dictionary::getStringForKey(a2, Src_8, "dpadLayout02");
sub_140059C40(a1 + 1544, v155);
sub_14003D310((__int64)Src_8);
v156 = DS_Dictionary::getStringForKey(a2, Src_8, "dpadLayout03");
sub_140059C40(a1 + 1576, v156);
sub_14003D310((__int64)Src_8);
v157 = DS_Dictionary::getStringForKey(a2, Src_8, "dpadLayoutDual01");
sub_140059C40(a1 + 1608, v157);
sub_14003D310((__int64)Src_8);
v158 = DS_Dictionary::getStringForKey(a2, Src_8, "dpadLayoutDual02");
sub_140059C40(a1 + 1640, v158);
sub_14003D310((__int64)Src_8);
v159 = DS_Dictionary::getStringForKey(a2, Src_8, "dpadLayoutDual03");
sub_140059C40(a1 + 1672, v159);
sub_14003D310((__int64)Src_8);
v160 = DS_Dictionary::getStringForKey(a2, Src_8, "recentEmotes");
sub_140059C40(a1 + 1704, v160);
sub_14003D310((__int64)Src_8);
*(float *)(a1 + 1760) = DS_Dictionary::getFloatForKey(a2, "practiceOpacity");
v161 = DS_Dictionary::getFloatForKey(a2, "practicePosY");
v162 = DS_Dictionary::getFloatForKey(a2, "practicePosX");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v270, v162, v161);
cocos2d::CCPoint::operator=(a1 + 1752, v163);
v165 = GJAccountManager::sharedState(v164);
v166 = DS_Dictionary::getStringForKey(a2, Src_8, "GJA_001");
sub_140059C40(v165 + 328, v166);
sub_14003D310((__int64)Src_8);
DS_Dictionary::getIntegerForKey(a2, "GJA_003");
*(_DWORD *)(v165 + 360) = v167;
v168 = DS_Dictionary::getStringForKey(a2, Src_8, "GJA_002");
sub_140059C40(v165 + 464, v168);
sub_14003D310((__int64)Src_8);
v169 = DS_Dictionary::getStringForKey(a2, Src_8, "GJA_005");
sub_140059C40(v165 + 376, v169);
sub_14003D310((__int64)Src_8);
if ( *(_QWORD *)(v165 + 480) && !*(_QWORD *)(v165 + 392) )
{
v170 = sub_14003F4F0((__int64)Src_8, v165 + 464);
ShaPassword = GJAccountManager::getShaPassword(Block_8, v170);
sub_140059C40(v165 + 376, ShaPassword);
sub_14003D310((__int64)Block_8);
}
GJMultiplayerManager::sharedState();
}
if ( v110 < 40 )
*(_DWORD *)(a1 + 712) = 0;
GameManager::prepareDPadSettings(a1);
v173 = GJAccountManager::sharedState(v172);
v174 = (unsigned int)(*(_DWORD *)(v173 + 360) - *(_DWORD *)(v173 + 364));
if ( *(_DWORD *)(v173 + 360) - *(_DWORD *)(v173 + 364) > 0 )
{
v175 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v270 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v270);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v175 = *(_QWORD *)&qword_14090BFB0;
}
*(_DWORD *)(v175 + 1336) = 4;
v176 = GJAccountManager::sharedState(v174);
sub_14003F4F0((__int64)Src_8, v176 + 328);
sub_140059C40(a1 + 656, (__int64)Src_8);
sub_14003D310((__int64)Src_8);
}
DS_Dictionary::getIntegerForKey(a2, "hasRP");
v178 = v177;
*(_DWORD *)(a1 + 1072) = v177;
v179 = (float)((float)rand() / 32767.0) * 1000.0;
*(_DWORD *)(a1 + 1068) = (int)v179;
*(_DWORD *)(a1 + 1064) = (int)v179 + v178;
*(_BYTE *)(a1 + 1076) = DS_Dictionary::getBoolForKey(a2, "hasDRP");
DS_Dictionary::getIntegerForKey(a2, "specialPermKey");
*(_DWORD *)(a1 + 1080) = v183;
if ( !*(_BYTE *)(a1 + 512) && v110 < 21 )
GameManager::verifyCoinUnlocks(a1);
v184 = *(cocos2d::CCArray **)(AchievementManager::sharedState(v181, v180, v182) + 320);
for ( j = 0; j < cocos2d::CCArray::count(v184); ++j )
{
v189 = cocos2d::CCArray::objectAtIndex(v184, j);
Block_8[1] = (void *)29285;
v275 = 10;
v276 = 15;
Block_8[0] = (void *)0x696669746E656469LL;
v190 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v189, Block_8);
CString = cocos2d::CCString::getCString(v190);
v194 = v276;
if ( v276 > 0xF )
{
v195 = Block_8[0];
if ( v276 + 1 >= 0x1000 )
{
v195 = *((void **)Block_8[0] - 1);
if ( (unsigned __int64)((char *)Block_8[0] - (char *)v195 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v195);
}
v275 = 0;
v276 = 15;
LOBYTE(Block_8[0]) = 0;
v196 = AchievementManager::sharedState(v191, v194, v193);
if ( (int)AchievementManager::percentForAchievement(v196, (__int64)CString) >= 100 )
{
*(_OWORD *)Src_8 = 0;
v273 = 0u;
v197 = -1;
do
++v197;
while ( CString[v197] );
sub_14003D230(Src_8, CString, v197);
GameManager::completedAchievement(a1, (__int64)Src_8);
}
}
if ( v110 < 4 )
{
do
{
v198 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v270 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v270);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v198 = *(_QWORD *)&qword_14090BFB0;
}
MainLevel = GameLevelManager::getMainLevel(v198, v44, 0);
v200 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
Src = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(Src);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v200 = qword_14090BFE0;
}
if ( (unsigned __int8)GameStatsManager::hasCompletedLevel(v200, MainLevel) )
{
v201 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v245 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v245);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v201 = qword_14090BFE0;
}
GameStatsManager::completedStarLevel(v201, MainLevel);
}
++v44;
}
while ( v44 <= 22 );
goto LABEL_163;
}
if ( v110 < 11 )
{
LABEL_163:
v202 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v246 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v246);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v202 = *(_QWORD *)&qword_14090BFB0;
}
v203 = GameLevelManager::getMainLevel(v202, 0xEu, 0);
v204 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v247 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v247);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v204 = qword_14090BFE0;
}
if ( (unsigned __int8)GameStatsManager::hasCompletedLevel(v204, v203) )
{
v205 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v248 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v248);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v205 = qword_14090BFE0;
}
GameStatsManager::completedDemonLevel(v205, v203);
}
goto LABEL_172;
}
if ( v110 >= 12 )
{
if ( v110 >= 51 )
goto LABEL_203;
goto LABEL_174;
}
LABEL_172:
GameManager::setGameVariable(a1, "0002", 1u);
GameManager::setGameVariable(a1, "0001", 1u);
LABEL_174:
v206 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v249 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v249);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v206 = qword_14090BFE0;
}
GameStatsManager::incrementStat(v206, &word_14070D054, 0);
v207 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v250 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v250);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v207 = qword_14090BFE0;
}
GameStatsManager::incrementStat(v207, "6", 0);
v208 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v251 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v251);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v208 = qword_14090BFE0;
}
GameStatsManager::incrementStat(v208, &word_14070D048, 0);
v209 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v252 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v252);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v209 = qword_14090BFE0;
}
GameStatsManager::incrementStat(v209, &word_14070D04C, 0);
v210 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v253 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v253);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v210 = qword_14090BFE0;
}
GameStatsManager::incrementStat(v210, "15", 0);
v211 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v254 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v254);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v211 = qword_14090BFE0;
}
GameStatsManager::incrementStat(v211, "40", 0);
v212 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v255 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v255);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v212 = qword_14090BFE0;
}
GameStatsManager::incrementStat(v212, "42", 0);
v213 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v256 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v256);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v213 = qword_14090BFE0;
}
GameStatsManager::incrementStat(v213, &word_14070D038, 0);
v214 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v257 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v257);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v214 = qword_14090BFE0;
}
GameStatsManager::incrementStat(v214, &word_14070D058, 0);
v215 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v258 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v258);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v215 = qword_14090BFE0;
}
GameStatsManager::incrementStat(v215, &word_14070D060, 0);
v216 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v259 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v259);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v216 = qword_14090BFE0;
}
GameStatsManager::incrementStat(v216, &word_14070D040, 0);
v217 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v260 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v260);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v217 = qword_14090BFE0;
}
GameStatsManager::incrementStat(v217, "12", 0);
v218 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v261 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v261);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v218 = qword_14090BFE0;
}
GameStatsManager::incrementStat(v218, "13", 0);
v219 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v262 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v262);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v219 = qword_14090BFE0;
}
GameStatsManager::incrementStat(v219, "41", 0);
LABEL_203:
if ( v110 >= 23 )
{
if ( v110 >= 25 )
{
if ( v110 >= 28 )
goto LABEL_223;
goto LABEL_208;
}
}
else
{
*(_DWORD *)(a1 + 704) = 1065353216;
*(_DWORD *)(a1 + 708) = 1065353216;
GameManager::setGameVariable(a1, "0026", 1u);
GameManager::setGameVariable(a1, "0027", 1u);
}
BoolForKey = DS_Dictionary::getBoolForKey(a2, "gameCenterEnabled");
GameManager::setGameVariable(a1, "0034", BoolForKey);
LABEL_208:
GameManager::setGameVariable(a1, "0038", 1u);
GameManager::setGameVariable(a1, "0043", 1u);
GameManager::setGameVariable(a1, "0046", 1u);
GameManager::setGameVariable(a1, "0044", 1u);
GameManager::setGameVariable(a1, "0036", 1u);
if ( *(_DWORD *)(a1 + 880) == 2 )
*(_BYTE *)(a1 + 944) = 1;
v221 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v263 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v263);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v221 = *(_QWORD *)&qword_14090BFB0;
}
v222 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v264 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v264);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v222 = qword_14090BFE0;
}
v223 = GameLevelManager::getMainLevel(v221, 0xEu, 0);
GameStatsManager::checkCoinAchievement(v222, v223);
v224 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v265 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v265);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v224 = *(_QWORD *)&qword_14090BFB0;
}
v225 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v266 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v266);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v225 = qword_14090BFE0;
}
v226 = GameLevelManager::getMainLevel(v224, 0x12u, 0);
GameStatsManager::checkCoinAchievement(v225, v226);
v227 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v267 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v267);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v227 = *(_QWORD *)&qword_14090BFB0;
}
v228 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v268 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v268);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v228 = qword_14090BFE0;
}
v229 = GameLevelManager::getMainLevel(v227, 0x14u, 0);
GameStatsManager::checkCoinAchievement(v228, v229);
*(_BYTE *)(a1 + 955) = 0;
LABEL_223:
if ( v110 < 51 )
*(_BYTE *)(a1 + 955) = 0;
if ( v110 < 29 )
{
if ( !*(_BYTE *)(a1 + 512) )
{
if ( !qword_14090BFE0 )
{
v269 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v269);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
}
GameStatsManager::verifyUserCoins();
}
goto LABEL_231;
}
if ( v110 < 38 )
{
LABEL_231:
GameManager::setGameVariable(a1, "0012", 0);
GameManager::setGameVariable(a1, "0016", 0);
GameManager::setUGV(a1, "28", 0);
GameManager::setUGV(a1, &word_14075A858, 0);
GameManager::setGameVariable(a1, "0023", 0);
GameManager::setGameVariable(a1, "0118", 1u);
GameManager::setGameVariable(a1, "0117", 1u);
GameManager::setGameVariable(a1, "0158", 1u);
GameManager::setGameVariable(a1, "0121", 1u);
GameManager::setGameVariable(a1, "0037", 1u);
goto LABEL_233;
}
if ( v110 < 41 )
{
LABEL_233:
if ( !*(_BYTE *)(a1 + 512) )
{
*(_DWORD *)(a1 + 1760) = 1065353216;
goto LABEL_236;
}
goto LABEL_239;
}
if ( v110 < 45 )
{
LABEL_236:
if ( !*(_BYTE *)(a1 + 512) )
{
*(_OWORD *)Src_8 = 0;
v273.m128_u64[0] = 0;
v273.m128_u64[1] = 15;
LOBYTE(Src_8[0]) = 0;
GameManager::recountUserStats(a1, Src_8, (__int64)v188);
}
goto LABEL_239;
}
if ( v110 >= 49 )
{
if ( v110 >= 50 )
goto LABEL_242;
goto LABEL_241;
}
LABEL_239:
GameManager::setGameVariable(a1, "0184", 1u);
LABEL_241:
GameManager::setGameVariable(a1, "0200", 1u);
GameManager::setGameVariable(a1, "0202", 1u);
LABEL_242:
GameManager::checkSteamAchievementUnlock(v187, v186, v188);
*(_BYTE *)(AchievementManager::sharedState(v231, v230, v232) + 360) = 0;
*(_OWORD *)Src_8 = 0;
v273.m128_u64[0] = 3;
v273.m128_u64[1] = 15;
LODWORD(Src_8[0]) = 6256231;
sub_140044D80(Src_8, "0049", 4u);
v233 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(a1 + 432), Src_8);
v234 = cocos2d::CCString::intValue(v233);
if ( v273.m128_u64[1] > 0xF )
{
v235 = Src_8[0];
if ( v273.m128_u64[1] + 1 >= 0x1000 )
{
v235 = *((void **)Src_8[0] - 1);
if ( (unsigned __int64)((char *)Src_8[0] - (char *)v235 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v235);
}
if ( v234 < 6 )
{
*(_OWORD *)Src_8 = 0;
v273.m128_u64[0] = 3;
v273.m128_u64[1] = 15;
LODWORD(Src_8[0]) = 6256231;
sub_140044D80(Src_8, "0049", 4u);
v236 = *(_QWORD *)(a1 + 432);
v237 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, 6);
cocos2d::CCDictionary::setObject(v236, v237, Src_8);
if ( v273.m128_u64[1] > 0xF )
{
v238 = Src_8[0];
if ( v273.m128_u64[1] + 1 >= 0x1000 )
{
v238 = *((void **)Src_8[0] - 1);
if ( (unsigned __int64)((char *)Src_8[0] - (char *)v238 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v238);
}
}
*(_OWORD *)Src_8 = 0;
v273.m128_u64[0] = 3;
v273.m128_u64[1] = 15;
LODWORD(Src_8[0]) = 6256231;
sub_140044D80(Src_8, "0050", 4u);
v239 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(a1 + 432), Src_8);
v240 = cocos2d::CCString::intValue(v239);
if ( v273.m128_u64[1] > 0xF )
{
v241 = Src_8[0];
if ( v273.m128_u64[1] + 1 >= 0x1000 )
{
v241 = *((void **)Src_8[0] - 1);
if ( (unsigned __int64)((char *)Src_8[0] - (char *)v241 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v241);
}
if ( v240 < 2 )
{
*(_OWORD *)Src_8 = 0;
v273.m128_u64[0] = 3;
v273.m128_u64[1] = 15;
LODWORD(Src_8[0]) = 6256231;
sub_140044D80(Src_8, "0050", 4u);
v242 = *(_QWORD *)(a1 + 432);
v243 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, 2);
cocos2d::CCDictionary::setObject(v242, v243, Src_8);
if ( v273.m128_u64[1] > 0xF )
{
v244 = Src_8[0];
if ( v273.m128_u64[1] + 1 >= 0x1000 )
{
v244 = *((void **)Src_8[0] - 1);
if ( (unsigned __int64)((char *)Src_8[0] - (char *)v244 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v244);
}
}
*(_BYTE *)(a1 + 512) = 1;
}