// // GameStatsManager::dataLoaded from 0x10008d470 to 0x10008e787 (4887 bytes) // // 1 xrefs: // > GameManager::dataLoaded @ 0x100389935 // // 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 GameStatsManager::dataLoaded(GameStatsManager *a1, DS_Dictionary *a2) { double v2; // xmm0_8 GameStatsManager *v3; // r12 bool m_pathBugFixed; // al cocos2d::CCDictionary *DictForKey; // rax bool v6; // zf cocos2d::CCArray *v7; // r14 __int64 v8; // rbx unsigned int v9; // r15d cocos2d::CCString *v10; // rax unsigned int v11; // eax __int64 v12; // rcx size_t v13; // rax size_t v14; // rbx char *v15; // r14 __int64 v16; // rax size_t v17; // r13 cocos2d::CCString *v18; // rax cocos2d::CCDictionary *v19; // rbx size_t v20; // rax size_t v21; // r13 char *v22; // r14 __int64 v23; // rax size_t v24; // r12 cocos2d::CCString *v25; // rax size_t v26; // rax std::string::size_type v27; // rbx char *data; // r14 __int64 v29; // rax size_t v30; // r12 int v31; // ebx cocos2d::CCDictionary *v32; // rbx __int64 v33; // r14 size_t v34; // rax size_t v35; // r13 char *v36; // rbx char *v37; // rdi size_t v38; // rax size_t v39; // rbx char *v40; // r14 __int64 v41; // rax size_t v42; // r12 __int64 v43; // rax size_t v44; // r12 cocos2d::CCDictionary *v45; // rbx size_t v46; // rax size_t v47; // r14 char *v48; // r13 bool v49; // bl __int64 v50; // rax size_t v51; // rbx cocos2d::CCDictionary *v52; // r14 size_t v53; // rax size_t v54; // r13 char *v55; // rbx __int64 v56; // rax size_t v57; // r12 cocos2d::CCDictionary *v58; // rbx cocos2d::CCDictionary *m_playerStats; // rdi unsigned int v60; // r14d int v61; // r13d const char *v62; // rsi int Stat; // r12d int v64; // ebx bool v65; // cc const char *v66; // rsi cocos2d::CCDictionary *v67; // rax cocos2d::CCArray *v68; // rbx unsigned int v69; // r14d GameStatsManager *v70; // r13 cocos2d::CCString *v71; // rax const char *CString; // r12 cocos2d::CCDictionary *v73; // rbx GameStatsManager *v74; // r14 cocos2d::CCDictionary *m_verifiedUserCoins; // rdi DS_Dictionary *v76; // r14 cocos2d::CCDictionary *v77; // rax GameStatsManager *v78; // r12 cocos2d::CCDictionary *m_pendingUserCoins; // rdi cocos2d::CCDictionary *v80; // rbx cocos2d::CCObject *v81; // rdi cocos2d::CCDictionary *v82; // rbx cocos2d::CCObject *m_completedLevels; // rdi cocos2d::CCDictionary *v84; // rax cocos2d::CCDictionary *m_completedMappacks; // rdi cocos2d::CCDictionary *v86; // rbx cocos2d::CCObject *v87; // rdi cocos2d::CCDictionary *v88; // rax cocos2d::CCDictionary *m_purchasedItems; // rdi cocos2d::CCDictionary *v90; // rbx cocos2d::CCObject *v91; // rdi cocos2d::CCDictionary *v92; // rax cocos2d::CCDictionary *m_onlineCurrencyScores; // rdi cocos2d::CCDictionary *v94; // rbx cocos2d::CCObject *v95; // rdi cocos2d::CCDictionary *v96; // rax cocos2d::CCDictionary *m_gauntletCurrencyScores; // rdi cocos2d::CCDictionary *v98; // rbx cocos2d::CCObject *v99; // rdi cocos2d::CCDictionary *v100; // rax cocos2d::CCDictionary *m_mainCurrencyScores; // rdi cocos2d::CCDictionary *v102; // rbx cocos2d::CCObject *v103; // rdi cocos2d::CCDictionary *v104; // rax cocos2d::CCDictionary *m_timelyCurrencyScores; // rdi cocos2d::CCDictionary *v106; // rbx cocos2d::CCObject *v107; // rdi cocos2d::CCDictionary *v108; // rax cocos2d::CCDictionary *m_onlineStars; // rdi cocos2d::CCDictionary *v110; // rbx cocos2d::CCObject *v111; // rdi cocos2d::CCDictionary *v112; // rax cocos2d::CCDictionary *m_timelyStars; // rdi cocos2d::CCDictionary *v114; // rbx cocos2d::CCObject *v115; // rdi cocos2d::CCDictionary *v116; // rax cocos2d::CCDictionary *m_gauntletDiamondScores; // rdi cocos2d::CCDictionary *v118; // rbx cocos2d::CCObject *v119; // rdi cocos2d::CCDictionary *v120; // rax cocos2d::CCDictionary *m_timelyDiamondScores; // rdi cocos2d::CCDictionary *v122; // rbx cocos2d::CCObject *v123; // rdi cocos2d::CCDictionary *v124; // rax cocos2d::CCDictionary *m_unusedCurrencyAwardDict; // rdi cocos2d::CCDictionary *v126; // rbx cocos2d::CCObject *v127; // rdi cocos2d::CCDictionary *v128; // rax cocos2d::CCDictionary *m_dailyChests; // rdi cocos2d::CCDictionary *v130; // rbx cocos2d::CCObject *v131; // rdi cocos2d::CCDictionary *v132; // rax cocos2d::CCDictionary *m_weeklyChest; // rdi cocos2d::CCDictionary *v134; // rbx cocos2d::CCObject *v135; // rdi cocos2d::CCDictionary *v136; // rax cocos2d::CCDictionary *m_eventChest; // rdi cocos2d::CCDictionary *v138; // rbx cocos2d::CCObject *v139; // rdi cocos2d::CCDictionary *v140; // rax cocos2d::CCDictionary *m_worldAdvertChests; // rdi cocos2d::CCDictionary *v142; // rbx cocos2d::CCObject *v143; // rdi cocos2d::CCDictionary *v144; // rax char *v145; // r13 cocos2d::CCArray *v146; // rax cocos2d::ccArray *v147; // rax cocos2d::CCString **arr; // r15 const char *v149; // r12 size_t v150; // rax size_t v151; // rbx char *v152; // r13 size_t v153; // r14 __int64 v154; // rbx _DWORD *v155; // rax int v156; // r14d _DWORD *v157; // rbx cocos2d::CCObject *m_activeChallenges; // rdi DS_Dictionary *v159; // r14 cocos2d::CCDictionary *v160; // rbx cocos2d::CCObject *m_upcomingChallenges; // rdi cocos2d::CCDictionary *v162; // rax cocos2d::CCDictionary *m_challengeDiamonds; // rdi cocos2d::CCDictionary *v164; // rbx cocos2d::CCObject *v165; // rdi cocos2d::CCDictionary *v166; // rax cocos2d::CCDictionary *m_completedLists; // rdi cocos2d::CCDictionary *v168; // rbx cocos2d::CCObject *v169; // rdi cocos2d::CCDictionary *v170; // rax cocos2d::CCDictionary *m_treasureRoomChests; // rdi cocos2d::CCDictionary *v172; // rbx cocos2d::CCObject *v173; // rdi cocos2d::CCDictionary *v174; // rax cocos2d::CCDictionary *m_wraithChests; // rdi cocos2d::CCDictionary *v176; // rbx cocos2d::CCObject *v177; // rdi cocos2d::CCDictionary *v178; // rax cocos2d::CCDictionary *m_miscChests; // rdi cocos2d::CCDictionary *v180; // rbx cocos2d::CCObject *v181; // rdi cocos2d::CCDictionary *v182; // rax cocos2d::CCDictionary *m_enabledItems; // rdi cocos2d::CCDictionary *v184; // rbx cocos2d::CCObject *v185; // rdi cocos2d::CCDictionary *v186; // rax cocos2d::CCDictionary *m_unlockedGauntlets; // rdi cocos2d::CCDictionary *v188; // rbx cocos2d::CCObject *v189; // rdi int v190; // ebx int IntegerForKey; // eax int v192; // ebx int v193; // eax int v194; // eax int v195; // edx cocos2d::CCDictionary *v196; // [rsp+0h] [rbp-B0h] cocos2d::CCDictionary *v197; // [rsp+8h] [rbp-A8h] std::string v198; // [rsp+10h] [rbp-A0h] BYREF _QWORD v199[2]; // [rsp+28h] [rbp-88h] BYREF void *v200; // [rsp+38h] [rbp-78h] DS_Dictionary *v201; // [rsp+40h] [rbp-70h] unsigned __int64 v202; // [rsp+48h] [rbp-68h] cocos2d::CCArray *v203; // [rsp+50h] [rbp-60h] cocos2d::CCDictionary *m_trueString; // [rsp+58h] [rbp-58h] GameStatsManager *v205; // [rsp+60h] [rbp-50h] char *__s; // [rsp+68h] [rbp-48h] __int64 __dst; // [rsp+70h] [rbp-40h] BYREF size_t v208; // [rsp+78h] [rbp-38h] void *__p; // [rsp+80h] [rbp-30h] v3 = a1; LODWORD(v202) = DS_Dictionary::getIntegerForKey(a2, "binaryVersion"); m_pathBugFixed = a1->m_pathBugFixed; if ( !m_pathBugFixed ) { m_pathBugFixed = DS_Dictionary::getBoolForKey(a2, "GS_29"); a1->m_pathBugFixed = m_pathBugFixed; } if ( (_DWORD)v202 == 38 && !m_pathBugFixed ) a1->m_tryFixPathBug = 1; v201 = a2; DictForKey = DS_Dictionary::getDictForKey(a2, "GS_value", 0); v6 = a1->m_playerStats == nullptr; v205 = a1; if ( v6 ) { if ( DictForKey ) { v58 = DictForKey; cocos2d::CCObject::retain(DictForKey); m_playerStats = a1->m_playerStats; if ( m_playerStats ) cocos2d::CCObject::release(m_playerStats); v3->m_playerStats = v58; } } else { v197 = DictForKey; v7 = cocos2d::CCDictionary::allKeys(DictForKey); if ( (unsigned int)sub_100720070(v7) ) { v8 = 0xF003FBFF1F8LL; v9 = 0; v203 = v7; while ( 1 ) { v10 = cocos2d::CCArray::stringAtIndex(v7, v9); __s = (char *)cocos2d::CCString::getCString(v10); v11 = atoi(__s); if ( v11 <= 0x2B ) { if ( _bittest64(&v8, v11) ) goto LABEL_10; v12 = 0xFFC0000000LL; if ( _bittest64(&v12, v11) ) { if ( (_DWORD)v202 == 38 && !v3->m_tryFixPathBug ) goto LABEL_10; } } v13 = strlen(__s); if ( v13 >= 0xFFFFFFFFFFFFFFF8LL ) goto LABEL_299; v14 = v13; if ( v13 >= 0x17 ) break; LOBYTE(__dst) = 2 * v13; v15 = (char *)&__dst + 1; if ( v13 ) goto LABEL_23; LABEL_24: v15[v14] = 0; v18 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey_1(v197, &__dst); LODWORD(m_trueString) = cocos2d::CCString::intValue(v18); if ( (__dst & 1) != 0 ) operator delete(__p); v19 = v3->m_playerStats; v20 = strlen(__s); if ( v20 >= 0xFFFFFFFFFFFFFFF8LL ) LABEL_299: sub_100006BF0(v2); v21 = v20; if ( v20 >= 0x17 ) { v23 = v20 | 7; v24 = 26; if ( (v21 | 7) != 0x17 ) v24 = v23 + 1; v22 = (char *)operator new(v24); __p = v22; __dst = v24 + 1; v208 = v21; v3 = v205; LABEL_33: memmove(v22, __s, v21); goto LABEL_34; } LOBYTE(__dst) = 2 * v20; v22 = (char *)&__dst + 1; if ( v20 ) goto LABEL_33; LABEL_34: v22[v21] = 0; v25 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey_1(v19, &__dst); cocos2d::CCString::intValue(v25); if ( (__dst & 1) != 0 ) operator delete(__p); v26 = strlen(__s); if ( v26 >= 0xFFFFFFFFFFFFFFF8LL ) goto LABEL_299; v27 = v26; if ( v26 >= 0x17 ) { v29 = v26 | 7; v30 = 26; if ( (v27 | 7) != 0x17 ) v30 = v29 + 1; data = (char *)operator new(v30); v198.__r_.__value_.__r.__words[2] = (std::string::size_type)data; v198.__r_.__value_.__r.__words[0] = v30 + 1; v198.__r_.__value_.__l.__size_ = v27; v3 = v205; LABEL_43: memmove(data, __s, v27); goto LABEL_44; } v198.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v26); data = v198.__r_.__value_.__s.__data_; if ( v26 ) goto LABEL_43; LABEL_44: data[v27] = 0; v31 = std::string::compare(&v198, 0, 7u, "unique_"); if ( (*(_BYTE *)&v198.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v198.__r_.__value_.__l.__data_); if ( v31 ) { v32 = v3->m_playerStats; v33 = sub_1007AB580("%i", (char)v196); v34 = strlen(__s); if ( v34 >= 0xFFFFFFFFFFFFFFF8LL ) goto LABEL_299; v35 = v34; v196 = v32; if ( v34 >= 0x17 ) { v41 = v34 | 7; v42 = 26; if ( (v35 | 7) != 0x17 ) v42 = v41 + 1; v36 = (char *)operator new(v42); __p = v36; __dst = v42 + 1; v208 = v35; v3 = v205; } else { LOBYTE(__dst) = 2 * v34; v36 = (char *)&__dst + 1; if ( !v34 ) { LABEL_59: v36[v35] = 0; cocos2d::CCDictionary::setObject_1(v196, v33, &__dst); v7 = v203; v8 = 0xF003FBFF1F8LL; if ( (__dst & 1) != 0 ) operator delete(__p); goto LABEL_10; } } memmove(v36, __s, v35); goto LABEL_59; } v37 = __s; v38 = strlen(__s); if ( v38 >= 0xFFFFFFFFFFFFFFF8LL ) goto LABEL_299; v39 = v38; if ( v38 >= 0x17 ) { v43 = v38 | 7; v44 = 26; if ( (v39 | 7) != 0x17 ) v44 = v43 + 1; v40 = (char *)operator new(v44); v200 = v40; v199[0] = v44 + 1; v199[1] = v39; v3 = v205; LABEL_64: v37 = v40; memmove(v40, __s, v39); goto LABEL_65; } LOBYTE(v199[0]) = 2 * v38; v40 = (char *)v199 + 1; if ( v38 ) goto LABEL_64; LABEL_65: v40[v39] = 0; if ( !(unsigned __int8)GameStatsManager::isSecretCoinValid((__int64)v37, (__int64)v199) ) { v49 = 0; v7 = v203; if ( (v199[0] & 1) != 0 ) goto LABEL_71; goto LABEL_79; } v45 = v3->m_playerStats; v46 = strlen(__s); if ( v46 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(v2); v47 = v46; if ( v46 >= 0x17 ) { m_trueString = v3->m_playerStats; v50 = v46 | 7; v51 = 26; if ( (v47 | 7) != 0x17 ) v51 = v50 + 1; v48 = (char *)operator new(v51); __p = v48; __dst = v51 | 1; v208 = v47; v45 = m_trueString; LABEL_76: memmove(v48, __s, v47); goto LABEL_77; } LOBYTE(__dst) = 2 * v46; v48 = (char *)&__dst + 1; if ( v46 ) goto LABEL_76; LABEL_77: v48[v47] = 0; v49 = cocos2d::CCDictionary::objectForKey_1(v45, &__dst) == 0; v7 = v203; if ( (__dst & 1) != 0 ) { operator delete(__p); if ( (v199[0] & 1) != 0 ) { LABEL_71: operator delete(v200); v6 = !v49; v8 = 0xF003FBFF1F8LL; if ( !v6 ) goto LABEL_80; goto LABEL_10; } } else if ( (v199[0] & 1) != 0 ) { goto LABEL_71; } LABEL_79: v6 = !v49; v8 = 0xF003FBFF1F8LL; if ( !v6 ) { LABEL_80: v52 = v3->m_playerStats; v53 = strlen(__s); if ( v53 >= 0xFFFFFFFFFFFFFFF8LL ) goto LABEL_299; v54 = v53; m_trueString = (cocos2d::CCDictionary *)v3->m_trueString; if ( v53 >= 0x17 ) { v56 = v53 | 7; v57 = 26; if ( (v54 | 7) != 0x17 ) v57 = v56 + 1; v55 = (char *)operator new(v57); __p = v55; __dst = v57 + 1; v208 = v54; v3 = v205; } else { LOBYTE(__dst) = 2 * v53; v55 = (char *)&__dst + 1; if ( !v53 ) goto LABEL_88; } memmove(v55, __s, v54); LABEL_88: v55[v54] = 0; cocos2d::CCDictionary::setObject_1(v52, m_trueString, &__dst); v7 = v203; v8 = 0xF003FBFF1F8LL; if ( (__dst & 1) != 0 ) operator delete(__p); GameStatsManager::incrementStat(v3, "8", 1); } LABEL_10: if ( ++v9 >= (unsigned int)sub_100720070(v7) ) goto LABEL_96; } v16 = v13 | 7; v17 = 26; if ( (v14 | 7) != 0x17 ) v17 = v16 + 1; v15 = (char *)operator new(v17); __p = v15; __dst = v17 + 1; v208 = v14; LABEL_23: memmove(v15, __s, v14); goto LABEL_24; } } LABEL_96: if ( !v3->m_pathBugFixed && !v3->m_tryFixPathBug ) { v60 = 30; v61 = 0; do { GameToolbox::intToString(&__dst, v60); v62 = (char *)&__dst + 1; if ( (__dst & 1) != 0 ) v62 = (const char *)__p; Stat = GameStatsManager::getStat(v3, v62); if ( (__dst & 1) != 0 ) operator delete(__p); v64 = 1000; v65 = Stat <= 999; v3 = v205; if ( v65 ) { GameToolbox::intToString(&__dst, v60); v66 = (char *)&__dst + 1; if ( (__dst & 1) != 0 ) v66 = (const char *)__p; v64 = GameStatsManager::getStat(v3, v66); if ( (__dst & 1) != 0 ) operator delete(__p); } v61 += v64; ++v60; } while ( v60 != 40 ); if ( v61 > 1000 ) v3->m_pathBugFixed = 1; } v67 = DS_Dictionary::getDictForKey(v201, "GS_3", 0); if ( v3->m_verifiedUserCoins ) { v68 = cocos2d::CCDictionary::allKeys(v67); if ( (unsigned int)sub_100720070(v68) ) { v69 = 0; v70 = v205; do { v71 = cocos2d::CCArray::stringAtIndex(v68, v69); CString = cocos2d::CCString::getCString(v71); if ( !GameStatsManager::hasUserCoin(v205, CString) ) { GameStatsManager::storeUserCoin(v70, CString); GameStatsManager::incrementStat(v70, "12", 1); } ++v69; } while ( v69 < (unsigned int)sub_100720070(v68) ); } } else if ( v67 ) { v73 = v67; cocos2d::CCObject::retain(v67); v74 = v205; m_verifiedUserCoins = v205->m_verifiedUserCoins; if ( m_verifiedUserCoins ) cocos2d::CCObject::release(m_verifiedUserCoins); v74->m_verifiedUserCoins = v73; } v76 = v201; v77 = DS_Dictionary::getDictForKey(v201, "GS_4", 0); v78 = v205; m_pendingUserCoins = v205->m_pendingUserCoins; if ( m_pendingUserCoins ) { GameToolbox::mergeDictsSaveLargestInt(m_pendingUserCoins, v77); } else if ( v77 ) { v80 = v77; cocos2d::CCObject::retain(v77); v81 = v78->m_pendingUserCoins; if ( v81 ) cocos2d::CCObject::release(v81); v78->m_pendingUserCoins = v80; } v82 = DS_Dictionary::getDictForKey(v76, "GS_completed", 0); if ( v78->m_completedLevels == nullptr && v82 != nullptr ) { cocos2d::CCObject::retain(v82); m_completedLevels = v78->m_completedLevels; if ( m_completedLevels ) cocos2d::CCObject::release(m_completedLevels); v78->m_completedLevels = v82; } v84 = DS_Dictionary::getDictForKey(v76, "GS_5", 0); m_completedMappacks = v78->m_completedMappacks; if ( m_completedMappacks ) { GameToolbox::mergeDictsSaveLargestInt(m_completedMappacks, v84); } else if ( v84 ) { v86 = v84; cocos2d::CCObject::retain(v84); v87 = v78->m_completedMappacks; if ( v87 ) cocos2d::CCObject::release(v87); v78->m_completedMappacks = v86; } v88 = DS_Dictionary::getDictForKey(v76, "GS_6", 0); m_purchasedItems = v78->m_purchasedItems; if ( m_purchasedItems ) { GameToolbox::mergeDictsSaveLargestInt(m_purchasedItems, v88); } else if ( v88 ) { v90 = v88; cocos2d::CCObject::retain(v88); v91 = v78->m_purchasedItems; if ( v91 ) cocos2d::CCObject::release(v91); v78->m_purchasedItems = v90; } v92 = DS_Dictionary::getDictForKey(v76, "GS_7", 0); m_onlineCurrencyScores = v78->m_onlineCurrencyScores; if ( m_onlineCurrencyScores ) { GameToolbox::mergeDictsSaveLargestInt(m_onlineCurrencyScores, v92); } else if ( v92 ) { v94 = v92; cocos2d::CCObject::retain(v92); v95 = v78->m_onlineCurrencyScores; if ( v95 ) cocos2d::CCObject::release(v95); v78->m_onlineCurrencyScores = v94; } v96 = DS_Dictionary::getDictForKey(v76, "GS_23", 0); m_gauntletCurrencyScores = v78->m_gauntletCurrencyScores; if ( m_gauntletCurrencyScores ) { GameToolbox::mergeDictsSaveLargestInt(m_gauntletCurrencyScores, v96); } else if ( v96 ) { v98 = v96; cocos2d::CCObject::retain(v96); v99 = v78->m_gauntletCurrencyScores; if ( v99 ) cocos2d::CCObject::release(v99); v78->m_gauntletCurrencyScores = v98; } v100 = DS_Dictionary::getDictForKey(v76, "GS_10", 0); m_mainCurrencyScores = v78->m_mainCurrencyScores; if ( m_mainCurrencyScores ) { GameToolbox::mergeDictsSaveLargestInt(m_mainCurrencyScores, v100); } else if ( v100 ) { v102 = v100; cocos2d::CCObject::retain(v100); v103 = v78->m_mainCurrencyScores; if ( v103 ) cocos2d::CCObject::release(v103); v78->m_mainCurrencyScores = v102; } v104 = DS_Dictionary::getDictForKey(v76, "GS_16", 0); m_timelyCurrencyScores = v78->m_timelyCurrencyScores; if ( m_timelyCurrencyScores ) { GameToolbox::mergeDictsSaveLargestInt(m_timelyCurrencyScores, v104); } else if ( v104 ) { v106 = v104; cocos2d::CCObject::retain(v104); v107 = v78->m_timelyCurrencyScores; if ( v107 ) cocos2d::CCObject::release(v107); v78->m_timelyCurrencyScores = v106; } v108 = DS_Dictionary::getDictForKey(v76, "GS_9", 0); m_onlineStars = v78->m_onlineStars; if ( m_onlineStars ) { GameToolbox::mergeDictsSaveLargestInt(m_onlineStars, v108); } else if ( v108 ) { v110 = v108; cocos2d::CCObject::retain(v108); v111 = v78->m_onlineStars; if ( v111 ) cocos2d::CCObject::release(v111); v78->m_onlineStars = v110; } v112 = DS_Dictionary::getDictForKey(v76, "GS_17", 0); m_timelyStars = v78->m_timelyStars; if ( m_timelyStars ) { GameToolbox::mergeDictsSaveLargestInt(m_timelyStars, v112); } else if ( v112 ) { v114 = v112; cocos2d::CCObject::retain(v112); v115 = v78->m_timelyStars; if ( v115 ) cocos2d::CCObject::release(v115); v78->m_timelyStars = v114; } v116 = DS_Dictionary::getDictForKey(v76, "GS_18", 0); m_gauntletDiamondScores = v78->m_gauntletDiamondScores; if ( m_gauntletDiamondScores ) { GameToolbox::mergeDictsSaveLargestInt(m_gauntletDiamondScores, v116); } else if ( v116 ) { v118 = v116; cocos2d::CCObject::retain(v116); v119 = v78->m_gauntletDiamondScores; if ( v119 ) cocos2d::CCObject::release(v119); v78->m_gauntletDiamondScores = v118; } v120 = DS_Dictionary::getDictForKey(v76, "GS_24", 0); m_timelyDiamondScores = v78->m_timelyDiamondScores; if ( m_timelyDiamondScores ) { GameToolbox::mergeDictsSaveLargestInt(m_timelyDiamondScores, v120); } else if ( v120 ) { v122 = v120; cocos2d::CCObject::retain(v120); v123 = v78->m_timelyDiamondScores; if ( v123 ) cocos2d::CCObject::release(v123); v78->m_timelyDiamondScores = v122; } v124 = DS_Dictionary::getDictForKey(v76, "GS_8", 0); m_unusedCurrencyAwardDict = v78->m_unusedCurrencyAwardDict; if ( m_unusedCurrencyAwardDict ) { GameToolbox::mergeDictsSaveLargestInt(m_unusedCurrencyAwardDict, v124); } else if ( v124 ) { v126 = v124; cocos2d::CCObject::retain(v124); v127 = v78->m_unusedCurrencyAwardDict; if ( v127 ) cocos2d::CCObject::release(v127); v78->m_unusedCurrencyAwardDict = v126; } v128 = DS_Dictionary::getDictForKey(v76, "GS_11", 0); m_dailyChests = v78->m_dailyChests; if ( m_dailyChests ) { GameToolbox::mergeDictsSkipConflict(m_dailyChests, v128); } else if ( v128 ) { v130 = v128; cocos2d::CCObject::retain(v128); v131 = v78->m_dailyChests; if ( v131 ) cocos2d::CCObject::release(v131); v78->m_dailyChests = v130; } v132 = DS_Dictionary::getDictForKey(v76, "GS_25", 0); m_weeklyChest = v78->m_weeklyChest; if ( m_weeklyChest ) { GameToolbox::mergeDictsSkipConflict(m_weeklyChest, v132); } else if ( v132 ) { v134 = v132; cocos2d::CCObject::retain(v132); v135 = v78->m_weeklyChest; if ( v135 ) cocos2d::CCObject::release(v135); v78->m_weeklyChest = v134; } v136 = DS_Dictionary::getDictForKey(v76, "GS_31", 0); m_eventChest = v78->m_eventChest; if ( m_eventChest ) { GameToolbox::mergeDictsSkipConflict(m_eventChest, v136); } else if ( v136 ) { v138 = v136; cocos2d::CCObject::retain(v136); v139 = v78->m_eventChest; if ( v139 ) cocos2d::CCObject::release(v139); v78->m_eventChest = v138; } v140 = DS_Dictionary::getDictForKey(v76, "GS_22", 0); m_worldAdvertChests = v78->m_worldAdvertChests; if ( m_worldAdvertChests ) { GameToolbox::mergeDictsSkipConflict(m_worldAdvertChests, v140); } else if ( v140 ) { v142 = v140; cocos2d::CCObject::retain(v140); v143 = v78->m_worldAdvertChests; if ( v143 ) cocos2d::CCObject::release(v143); v78->m_worldAdvertChests = v142; } v144 = DS_Dictionary::getDictForKey(v76, "GS_12", 0); v145 = (char *)v144; if ( v78->m_activeChallenges ) { v146 = cocos2d::CCDictionary::allKeys(v144); if ( v146 ) { v147 = v146->data; if ( v147->num ) { arr = (cocos2d::CCString **)v147->arr; v202 = (unsigned __int64)&arr[v147->num - 1]; __s = v145; do { if ( !*arr ) break; v149 = cocos2d::CCString::getCString(*arr); v150 = strlen(v149); if ( v150 >= 0xFFFFFFFFFFFFFFF8LL ) goto LABEL_299; v151 = v150; if ( v150 >= 0x17 ) { v153 = (v150 | 7) + 1; if ( (v150 | 7) == 0x17 ) v153 = 26; v152 = (char *)operator new(v153); __p = v152; __dst = v153 + 1; v208 = v151; } else { LOBYTE(__dst) = 2 * v150; v152 = (char *)&__dst + 1; if ( !v150 ) goto LABEL_235; } memmove(v152, v149, v151); LABEL_235: v152[v151] = 0; v154 = cocos2d::CCDictionary::objectForKey_1(__s, &__dst); v78 = v205; v155 = (_DWORD *)cocos2d::CCDictionary::objectForKey_1(v205->m_activeChallenges, &__dst); if ( v155 ) { if ( v155[24] == *(_DWORD *)(v154 + 96) && v155[14] == *(_DWORD *)(v154 + 56) ) { v156 = *(_DWORD *)(v154 + 60) - *(_DWORD *)(v154 + 64); if ( v155[15] - v155[16] < v156 ) { v155[17] = v156; v157 = v155; HIDWORD(v2) = 0; *(float *)&v2 = (float)((float)rand() * 4.6566129e-10) * 1000.0; v157[16] = (int)*(float *)&v2; v157[15] = (int)*(float *)&v2 + v156; } } } else if ( !GameStatsManager::hasCompletedChallenge(v78, (GJChallengeItem *)v154) ) { cocos2d::CCDictionary::setObject_1(v78->m_activeChallenges, v154, &__dst); } if ( (__dst & 1) != 0 ) operator delete(__p); ++arr; } while ( (unsigned __int64)arr <= v202 ); } } } else if ( v144 ) { cocos2d::CCObject::retain(v144); m_activeChallenges = v78->m_activeChallenges; if ( m_activeChallenges ) cocos2d::CCObject::release(m_activeChallenges); v78->m_activeChallenges = (cocos2d::CCDictionary *)v145; } v159 = v201; v160 = DS_Dictionary::getDictForKey(v201, "GS_15", 0); if ( v78->m_upcomingChallenges == nullptr && v160 != nullptr ) { cocos2d::CCObject::retain(v160); m_upcomingChallenges = v78->m_upcomingChallenges; if ( m_upcomingChallenges ) cocos2d::CCObject::release(m_upcomingChallenges); v78->m_upcomingChallenges = v160; } v162 = DS_Dictionary::getDictForKey(v159, "GS_14", 0); m_challengeDiamonds = v78->m_challengeDiamonds; if ( m_challengeDiamonds ) { GameToolbox::mergeDictsSaveLargestInt(m_challengeDiamonds, v162); } else if ( v162 ) { v164 = v162; cocos2d::CCObject::retain(v162); v165 = v78->m_challengeDiamonds; if ( v165 ) cocos2d::CCObject::release(v165); v78->m_challengeDiamonds = v164; } v166 = DS_Dictionary::getDictForKey(v159, "GS_27", 0); m_completedLists = v78->m_completedLists; if ( m_completedLists ) { GameToolbox::mergeDictsSaveLargestInt(m_completedLists, v166); } else if ( v166 ) { v168 = v166; cocos2d::CCObject::retain(v166); v169 = v78->m_completedLists; if ( v169 ) cocos2d::CCObject::release(v169); v78->m_completedLists = v168; } v170 = DS_Dictionary::getDictForKey(v159, "GS_19", 0); m_treasureRoomChests = v78->m_treasureRoomChests; if ( m_treasureRoomChests ) { GameToolbox::mergeDictsSkipConflict(m_treasureRoomChests, v170); } else if ( v170 ) { v172 = v170; cocos2d::CCObject::retain(v170); v173 = v78->m_treasureRoomChests; if ( v173 ) cocos2d::CCObject::release(v173); v78->m_treasureRoomChests = v172; } v174 = DS_Dictionary::getDictForKey(v159, "GS_30", 0); m_wraithChests = v78->m_wraithChests; if ( m_wraithChests ) { GameToolbox::mergeDictsSkipConflict(m_wraithChests, v174); } else if ( v174 ) { v176 = v174; cocos2d::CCObject::retain(v174); v177 = v78->m_wraithChests; if ( v177 ) cocos2d::CCObject::release(v177); v78->m_wraithChests = v176; } v178 = DS_Dictionary::getDictForKey(v159, "GS_21", 0); m_miscChests = v78->m_miscChests; if ( m_miscChests ) { GameToolbox::mergeDictsSkipConflict(m_miscChests, v178); } else if ( v178 ) { v180 = v178; cocos2d::CCObject::retain(v178); v181 = v78->m_miscChests; if ( v181 ) cocos2d::CCObject::release(v181); v78->m_miscChests = v180; } v182 = DS_Dictionary::getDictForKey(v159, "GS_28", 0); m_enabledItems = v78->m_enabledItems; if ( m_enabledItems ) { GameToolbox::mergeDictsSkipConflict(m_enabledItems, v182); } else if ( v182 ) { v184 = v182; cocos2d::CCObject::retain(v182); v185 = v78->m_enabledItems; if ( v185 ) cocos2d::CCObject::release(v185); v78->m_enabledItems = v184; } v186 = DS_Dictionary::getDictForKey(v159, "GS_32", 0); m_unlockedGauntlets = v78->m_unlockedGauntlets; if ( m_unlockedGauntlets ) { GameToolbox::mergeDictsSkipConflict(m_unlockedGauntlets, v186); } else if ( v186 ) { v188 = v186; cocos2d::CCObject::retain(v186); v189 = v78->m_unlockedGauntlets; if ( v189 ) cocos2d::CCObject::release(v189); v78->m_unlockedGauntlets = v188; } GameStatsManager::removeErrorFromSpecialChests(v78); v190 = v78->m_bonusKey.random - v78->m_bonusKey.seed; IntegerForKey = DS_Dictionary::getIntegerForKey(v159, "GS_20"); if ( IntegerForKey > v190 ) { v78->m_bonusKey.value = IntegerForKey; v192 = IntegerForKey; v193 = (int)(float)((float)((float)rand() * 4.6566129e-10) * 1000.0); v78->m_bonusKey.seed = v193; v78->m_bonusKey.random = v193 + v192; } v194 = DS_Dictionary::getIntegerForKey(v159, "GS_26"); v195 = 0; if ( (unsigned int)(v194 - 40) >= 0xFFFFFFF6 ) v195 = v194; v78->m_activePath = v195; GameStatsManager::postLoadGameStats(v78); }
GD Web Decomp Icon

GD Web Decomp

Raw Source