// // GameLevelManager::dataLoaded from 0x14014b410 to 0x14014c5a2 (4498 bytes) // // 2 xrefs: // > GameManager::dataLoaded @ 0x1401872e2 // > @ 0x1406ca788 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // // Hidden C++ exception states: #wind=5 void GameLevelManager::dataLoaded(GameLevelManager *a1, DS_Dictionary *a2) { struct cocos2d::CCDictionary *DictForKey; // rbx cocos2d::CCDictionary *m_mainLevels; // rcx cocos2d::CCDictElement *m_pElements; // rbx cocos2d::CCDictElement *next; // rsi size_t v8; // r8 GJGameLevel *v9; // rbx __int64 v10; // rax GJGameLevel *v11; // rax GJGameLevel *v12; // r14 GameStatsManager *v13; // rcx unsigned __int64 m_onlineLevels; // rcx struct cocos2d::CCDictionary *v15; // rbx struct cocos2d::CCDictionary *v16; // rbx cocos2d::CCDictionary *m_dailyLevels; // rcx cocos2d::CCDictElement *v18; // rbx cocos2d::CCDictElement *v19; // rsi size_t v20; // r8 GJGameLevel *v21; // rbx __int64 v22; // rax __int64 v23; // rax GJGameLevel *v24; // rbx GameStatsManager *v25; // rcx void *v26; // rcx cocos2d::CCDictElement *v27; // rbx cocos2d::CCDictElement *v28; // rsi size_t v29; // r8 GJGameLevel *v30; // rbx __int64 v31; // rax __int64 v32; // rax GJGameLevel *v33; // rbx GameStatsManager *v34; // rcx struct cocos2d::CCDictionary *v35; // rbx cocos2d::CCDictionary *m_gauntletLevels; // rcx cocos2d::CCDictElement *v37; // rbx cocos2d::CCDictElement *v38; // rsi size_t v39; // r8 GJGameLevel *v40; // rbx __int64 v41; // rax __int64 v42; // rax GJGameLevel *v43; // rbx GameStatsManager *v44; // rcx cocos2d::CCArray *ArrayForKey; // r15 cocos2d::CCDictionary *v46; // r14 unsigned int i; // ebx struct cocos2d::CCObject *v48; // rax __int64 v49; // rax __int64 v50; // rsi cocos2d::CCString *v51; // rax const char *CString; // rax size_t v53; // r8 void *v54; // rcx cocos2d::CCDictionary *m_favoriteLists; // rcx cocos2d::CCDictElement *v56; // rbx cocos2d::CCDictElement *v57; // rsi size_t v58; // r8 __int64 v59; // rbx __int64 v60; // rax __int64 v61; // rax cocos2d::CCDictionary *v62; // rax cocos2d::CCDictionary *v63; // rbx cocos2d::CCDictionary *m_followedCreators; // rcx cocos2d::CCDictionary *v65; // rcx struct cocos2d::CCDictionary *v66; // rbx cocos2d::CCDictionary *m_downloadedLevels; // rcx struct cocos2d::CCDictionary *v68; // rbx cocos2d::CCDictionary *m_searchFilters; // rcx struct cocos2d::CCDictionary *v70; // rsi cocos2d::CCDictionary *m_likedLevels; // rcx struct cocos2d::CCDictionary *v72; // rbx cocos2d::CCDictionary *m_ratedLevels; // rcx struct cocos2d::CCDictionary *v74; // rsi cocos2d::CCDictionary *m_ratedDemons; // rcx struct cocos2d::CCDictionary *v76; // rbx cocos2d::CCDictionary *m_reportedLevels; // rcx cocos2d::CCDictionary *v78; // rax cocos2d::CCDictionary *v79; // rbx cocos2d::CCDictionary *m_onlineFolders; // rcx cocos2d::CCDictionary *v81; // rcx cocos2d::CCDictElement *v82; // rsi cocos2d::CCDictElement *j; // r14 size_t v84; // r8 __int64 v85; // rbx size_t v86; // r8 cocos2d::CCDictElement *v87; // rbx cocos2d::CCDictElement *k; // rsi size_t v89; // r8 __int64 v90; // r14 void *v91; // rcx size_t v92; // r8 void *v93; // rcx cocos2d::CCDictElement *v94; // rsi cocos2d::CCDictElement *m; // r14 size_t v96; // r8 __int64 v97; // rbx size_t v98; // r8 cocos2d::CCDictionary *v99; // rax cocos2d::CCDictionary *v100; // rbx cocos2d::CCDictionary *m_localLevelsFolders; // rcx cocos2d::CCDictionary *v102; // rcx struct cocos2d::CCArray *v103; // rbx cocos2d::CCArray *m_smartTemplates; // rcx cocos2d::CCDictionary *v105; // rbx cocos2d::CCDictElement *v106; // rbx cocos2d::CCDictElement *n; // rsi cocos2d::CCObject *m_pObject; // rbx void *v109; // [rsp+30h] [rbp-30h] void *v110; // [rsp+30h] [rbp-30h] void *v111; // [rsp+30h] [rbp-30h] void *v112; // [rsp+30h] [rbp-30h] __int128 v113; // [rsp+38h] [rbp-28h] BYREF __int64 v114; // [rsp+48h] [rbp-18h] unsigned __int64 v115; // [rsp+50h] [rbp-10h] DictForKey = DS_Dictionary::getDictForKey(a2, "GLM_01", 0); if ( a1->m_mainLevels ) { if ( DictForKey ) { m_pElements = DictForKey->m_pElements; next = m_pElements ? (cocos2d::CCDictElement *)m_pElements->hh.next : nullptr; while ( m_pElements ) { v113 = 0; v114 = 0; v115 = 0; v8 = -1; do ++v8; while ( m_pElements->m_szKey[v8] ); sub_14003A930(&v113, m_pElements, v8); v9 = (GJGameLevel *)_RTDynamicCast( m_pElements->m_pObject, 0, &cocos2d::CCObject `RTTI Type Descriptor', &GJGameLevel `RTTI Type Descriptor', 0); v10 = cocos2d::CCDictionary::objectForKey(a1->m_mainLevels, &v113); v11 = (GJGameLevel *)_RTDynamicCast( v10, 0, &cocos2d::CCObject `RTTI Type Descriptor', &GJGameLevel `RTTI Type Descriptor', 0); v12 = v11; if ( v9 ) { if ( v11 ) GJGameLevel::handleStatsConflict(v11); else cocos2d::CCDictionary::setObject(a1->m_mainLevels, v9, &v113); if ( v12 ) v9 = v12; if ( v9->m_normalPercent.random - v9->m_normalPercent.seed >= 100 ) { v13 = (GameStatsManager *)qword_1406C2EE8; if ( !qword_1406C2EE8 ) { v109 = operator new(0x3E0u); qword_1406C2EE8 = sub_1401D0AE0(v109); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8); v13 = (GameStatsManager *)qword_1406C2EE8; } GameStatsManager::completedLevel(v13, v9); } } sub_14003A830((__int64)&v113); m_pElements = next; if ( next ) next = (cocos2d::CCDictElement *)next->hh.next; else next = nullptr; } } } else if ( DictForKey ) { cocos2d::CCObject::retain(DictForKey); m_mainLevels = a1->m_mainLevels; if ( m_mainLevels ) cocos2d::CCObject::release(m_mainLevels); a1->m_mainLevels = DictForKey; } v15 = DS_Dictionary::getDictForKey(a2, "GLM_03", 0); if ( a1->m_onlineLevels ) { if ( v15 ) { v18 = v15->m_pElements; v19 = v18 ? (cocos2d::CCDictElement *)v18->hh.next : nullptr; while ( v18 ) { v113 = 0; v114 = 0; v115 = 0; v20 = -1; do ++v20; while ( v18->m_szKey[v20] ); sub_14003A930(&v113, v18, v20); v21 = (GJGameLevel *)_RTDynamicCast( v18->m_pObject, 0, &cocos2d::CCObject `RTTI Type Descriptor', &GJGameLevel `RTTI Type Descriptor', 0); v22 = cocos2d::CCDictionary::objectForKey(a1->m_onlineLevels, &v113); v23 = _RTDynamicCast(v22, 0, &cocos2d::CCObject `RTTI Type Descriptor', &GJGameLevel `RTTI Type Descriptor', 0); m_onlineLevels = v23; if ( v21 ) { if ( v23 ) { if ( *(_DWORD *)(v23 + 744) > v21->m_levelVersion ) v21 = (GJGameLevel *)v23; GJGameLevel::handleStatsConflict(v21); } cocos2d::CCDictionary::setObject(a1->m_onlineLevels, v21, &v113); v24 = (GJGameLevel *)cocos2d::CCDictionary::objectForKey(a1->m_onlineLevels, &v113); m_onlineLevels = (unsigned int)(v24->m_normalPercent.random - v24->m_normalPercent.seed); if ( (int)m_onlineLevels >= 100 ) { v25 = (GameStatsManager *)qword_1406C2EE8; if ( !qword_1406C2EE8 ) { v110 = operator new(0x3E0u); qword_1406C2EE8 = sub_1401D0AE0(v110); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8); v25 = (GameStatsManager *)qword_1406C2EE8; } GameStatsManager::completedLevel(v25, v24); } } if ( v115 > 0xF ) { v26 = (void *)v113; if ( v115 + 1 >= 0x1000 ) { v26 = *(void **)(v113 - 8); if ( (unsigned __int64)(v113 - (_QWORD)v26 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v26); } v18 = v19; if ( v19 ) v19 = (cocos2d::CCDictElement *)v19->hh.next; else v19 = nullptr; } } } else if ( v15 ) { cocos2d::CCObject::retain(v15); m_onlineLevels = (unsigned __int64)a1->m_onlineLevels; if ( m_onlineLevels ) cocos2d::CCObject::release((cocos2d::CCObject *)m_onlineLevels); a1->m_onlineLevels = v15; } GameLevelManager::verifyContainerOnlyHasLevels((GameLevelManager *)m_onlineLevels, a1->m_onlineLevels); v16 = DS_Dictionary::getDictForKey(a2, "GLM_10", 0); if ( a1->m_dailyLevels ) { if ( v16 ) { v27 = v16->m_pElements; v28 = v27 ? (cocos2d::CCDictElement *)v27->hh.next : nullptr; while ( v27 ) { v113 = 0; v114 = 0; v115 = 0; v29 = -1; do ++v29; while ( v27->m_szKey[v29] ); sub_14003A930(&v113, v27, v29); v30 = (GJGameLevel *)_RTDynamicCast( v27->m_pObject, 0, &cocos2d::CCObject `RTTI Type Descriptor', &GJGameLevel `RTTI Type Descriptor', 0); v31 = cocos2d::CCDictionary::objectForKey(a1->m_dailyLevels, &v113); v32 = _RTDynamicCast(v31, 0, &cocos2d::CCObject `RTTI Type Descriptor', &GJGameLevel `RTTI Type Descriptor', 0); if ( v30 ) { if ( v32 ) { if ( *(_DWORD *)(v32 + 744) > v30->m_levelVersion ) v30 = (GJGameLevel *)v32; GJGameLevel::handleStatsConflict(v30); } cocos2d::CCDictionary::setObject(a1->m_dailyLevels, v30, &v113); v33 = (GJGameLevel *)cocos2d::CCDictionary::objectForKey(a1->m_dailyLevels, &v113); if ( v33->m_orbCompletion.random - v33->m_orbCompletion.seed >= 100 ) { v34 = (GameStatsManager *)qword_1406C2EE8; if ( !qword_1406C2EE8 ) { v111 = operator new(0x3E0u); qword_1406C2EE8 = sub_1401D0AE0(v111); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8); v34 = (GameStatsManager *)qword_1406C2EE8; } GameStatsManager::completedLevel(v34, v33); } } sub_14003A830((__int64)&v113); v27 = v28; if ( v28 ) v28 = (cocos2d::CCDictElement *)v28->hh.next; else v28 = nullptr; } } } else if ( v16 ) { cocos2d::CCObject::retain(v16); m_dailyLevels = a1->m_dailyLevels; if ( m_dailyLevels ) cocos2d::CCObject::release(m_dailyLevels); a1->m_dailyLevels = v16; } v35 = DS_Dictionary::getDictForKey(a2, "GLM_16", 0); if ( a1->m_gauntletLevels ) { if ( v35 ) { v37 = v35->m_pElements; v38 = v37 ? (cocos2d::CCDictElement *)v37->hh.next : nullptr; while ( v37 ) { v113 = 0; v114 = 0; v115 = 0; v39 = -1; do ++v39; while ( v37->m_szKey[v39] ); sub_14003A930(&v113, v37, v39); v40 = (GJGameLevel *)_RTDynamicCast( v37->m_pObject, 0, &cocos2d::CCObject `RTTI Type Descriptor', &GJGameLevel `RTTI Type Descriptor', 0); v41 = cocos2d::CCDictionary::objectForKey(a1->m_gauntletLevels, &v113); v42 = _RTDynamicCast(v41, 0, &cocos2d::CCObject `RTTI Type Descriptor', &GJGameLevel `RTTI Type Descriptor', 0); if ( v40 ) { if ( v42 ) { if ( *(_DWORD *)(v42 + 744) > v40->m_levelVersion ) v40 = (GJGameLevel *)v42; GJGameLevel::handleStatsConflict(v40); } cocos2d::CCDictionary::setObject(a1->m_gauntletLevels, v40, &v113); v43 = (GJGameLevel *)cocos2d::CCDictionary::objectForKey(a1->m_gauntletLevels, &v113); if ( v43->m_orbCompletion.random - v43->m_orbCompletion.seed >= 100 ) { v44 = (GameStatsManager *)qword_1406C2EE8; if ( !qword_1406C2EE8 ) { v112 = operator new(0x3E0u); qword_1406C2EE8 = sub_1401D0AE0(v112); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8); v44 = (GameStatsManager *)qword_1406C2EE8; } GameStatsManager::completedLevel(v44, v43); } } sub_14003A830((__int64)&v113); v37 = v38; if ( v38 ) v38 = (cocos2d::CCDictElement *)v38->hh.next; else v38 = nullptr; } } } else if ( v35 ) { cocos2d::CCObject::retain(v35); m_gauntletLevels = a1->m_gauntletLevels; if ( m_gauntletLevels ) cocos2d::CCObject::release(m_gauntletLevels); a1->m_gauntletLevels = v35; } ArrayForKey = DS_Dictionary::getArrayForKey(a2, "GLM_22", 0); v46 = (cocos2d::CCDictionary *)cocos2d::CCDictionary::create(); for ( i = 0; i < cocos2d::CCArray::count(ArrayForKey); ++i ) { v48 = cocos2d::CCArray::objectAtIndex(ArrayForKey, i); v49 = _RTDynamicCast(v48, 0, &cocos2d::CCObject `RTTI Type Descriptor', &GJLevelList `RTTI Type Descriptor', 0); v50 = v49; if ( v49 ) { v51 = cocos2d::CCString::createWithFormat("%i", *(_DWORD *)(v49 + 344)); CString = cocos2d::CCString::getCString(v51); v113 = 0; v114 = 0; v115 = 0; v53 = -1; do ++v53; while ( CString[v53] ); sub_14003A930(&v113, CString, v53); cocos2d::CCDictionary::setObject(v46, v50, &v113); if ( v115 > 0xF ) { v54 = (void *)v113; if ( v115 + 1 >= 0x1000 ) { v54 = *(void **)(v113 - 8); if ( (unsigned __int64)(v113 - (_QWORD)v54 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v54); } } } if ( a1->m_favoriteLists ) { if ( v46 ) { v56 = v46->m_pElements; v57 = v56 ? (cocos2d::CCDictElement *)v56->hh.next : nullptr; while ( v56 ) { v113 = 0; v114 = 0; v115 = 0; v58 = -1; do ++v58; while ( v56->m_szKey[v58] ); sub_14003A930(&v113, v56, v58); v59 = _RTDynamicCast( v56->m_pObject, 0, &cocos2d::CCObject `RTTI Type Descriptor', &GJLevelList `RTTI Type Descriptor', 0); v60 = cocos2d::CCDictionary::objectForKey(a1->m_favoriteLists, &v113); v61 = _RTDynamicCast(v60, 0, &cocos2d::CCObject `RTTI Type Descriptor', &GJLevelList `RTTI Type Descriptor', 0); if ( v59 ) { if ( v61 && *(_DWORD *)(v61 + 348) > *(_DWORD *)(v59 + 348) ) v59 = v61; cocos2d::CCDictionary::setObject(a1->m_favoriteLists, v59, &v113); } sub_14003A830((__int64)&v113); v56 = v57; if ( v57 ) v57 = (cocos2d::CCDictElement *)v57->hh.next; else v57 = nullptr; } } } else if ( v46 ) { cocos2d::CCObject::retain(v46); m_favoriteLists = a1->m_favoriteLists; if ( m_favoriteLists ) cocos2d::CCObject::release(m_favoriteLists); a1->m_favoriteLists = v46; } a1->m_activeDailyID = DS_Dictionary::getIntegerForKey(a2, "GLM_11"); a1->m_activeWeeklyID = DS_Dictionary::getIntegerForKey(a2, "GLM_17"); a1->m_activeEventID = DS_Dictionary::getIntegerForKey(a2, "GLM_23"); DS_Dictionary::addBoolValuesToMapForKey(a2, &a1->m_availableFilters, "GLM_09", 0); DS_Dictionary::addBoolValuesToMapForKeySpecial(a2, &a1->m_availableFilters, "GLM_04", 0); v62 = DS_Dictionary::getDictForKey(a2, "GLM_06", 0); v63 = v62; m_followedCreators = a1->m_followedCreators; if ( m_followedCreators ) { GameToolbox::mergeDictsSaveLargestInt(m_followedCreators, v62); } else if ( v62 ) { cocos2d::CCObject::retain(v62); v65 = a1->m_followedCreators; if ( v65 ) cocos2d::CCObject::release(v65); a1->m_followedCreators = v63; } v66 = DS_Dictionary::getDictForKey(a2, "GLM_07", 0); if ( !a1->m_downloadedLevels && v66 ) { cocos2d::CCObject::retain(v66); m_downloadedLevels = a1->m_downloadedLevels; if ( m_downloadedLevels ) cocos2d::CCObject::release(m_downloadedLevels); a1->m_downloadedLevels = v66; } v68 = DS_Dictionary::getDictForKey(a2, "GLM_08", 0); if ( !a1->m_searchFilters && v68 ) { cocos2d::CCObject::retain(v68); m_searchFilters = a1->m_searchFilters; if ( m_searchFilters ) cocos2d::CCObject::release(m_searchFilters); a1->m_searchFilters = v68; } v70 = DS_Dictionary::getDictForKey(a2, "GLM_12", 0); if ( a1->m_likedLevels ) { v82 = v70->m_pElements; if ( v82 ) { for ( j = (cocos2d::CCDictElement *)v82->hh.next; cocos2d::CCDictionary::count(a1->m_likedLevels) < 0x3E8; j = (cocos2d::CCDictElement *)j->hh.next ) { v113 = 0; v114 = 0; v115 = 0; v84 = -1; do ++v84; while ( v82->m_szKey[v84] ); sub_14003A930(&v113, v82, v84); v85 = cocos2d::CCDictionary::objectForKey(a1->m_likedLevels, &v113); sub_14003A830((__int64)&v113); if ( !v85 ) { v113 = 0; v114 = 0; v115 = 0; v86 = -1; do ++v86; while ( v82->m_szKey[v86] ); sub_14003A930(&v113, v82, v86); cocos2d::CCDictionary::setObject(a1->m_likedLevels, a1->m_trueString, &v113); sub_14003A830((__int64)&v113); } v82 = j; if ( !j ) break; } } } else if ( v70 ) { cocos2d::CCObject::retain(v70); m_likedLevels = a1->m_likedLevels; if ( m_likedLevels ) cocos2d::CCObject::release(m_likedLevels); a1->m_likedLevels = v70; } v72 = DS_Dictionary::getDictForKey(a2, "GLM_13", 0); if ( a1->m_ratedLevels ) { v87 = v72->m_pElements; if ( v87 ) { for ( k = (cocos2d::CCDictElement *)v87->hh.next; cocos2d::CCDictionary::count(a1->m_ratedLevels) < 0x3E8; k = (cocos2d::CCDictElement *)k->hh.next ) { v113 = 0; v114 = 0; v115 = 0; v89 = -1; do ++v89; while ( v87->m_szKey[v89] ); sub_14003A930(&v113, v87, v89); v90 = cocos2d::CCDictionary::objectForKey(a1->m_ratedLevels, &v113); if ( v115 > 0xF ) { v91 = (void *)v113; if ( v115 + 1 >= 0x1000 ) { v91 = *(void **)(v113 - 8); if ( (unsigned __int64)(v113 - (_QWORD)v91 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v91); } if ( !v90 ) { v113 = 0; v114 = 0; v115 = 0; v92 = -1; do ++v92; while ( v87->m_szKey[v92] ); sub_14003A930(&v113, v87, v92); cocos2d::CCDictionary::setObject(a1->m_ratedLevels, a1->m_trueString, &v113); if ( v115 > 0xF ) { v93 = (void *)v113; if ( v115 + 1 >= 0x1000 ) { v93 = *(void **)(v113 - 8); if ( (unsigned __int64)(v113 - (_QWORD)v93 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v93); } } v87 = k; if ( !k ) break; } } } else if ( v72 ) { cocos2d::CCObject::retain(v72); m_ratedLevels = a1->m_ratedLevels; if ( m_ratedLevels ) cocos2d::CCObject::release(m_ratedLevels); a1->m_ratedLevels = v72; } v74 = DS_Dictionary::getDictForKey(a2, "GLM_15", 0); if ( a1->m_ratedDemons ) { v94 = v74->m_pElements; if ( v94 ) { for ( m = (cocos2d::CCDictElement *)v94->hh.next; cocos2d::CCDictionary::count(a1->m_ratedDemons) < 0x3E8; m = (cocos2d::CCDictElement *)m->hh.next ) { v113 = 0; v114 = 0; v115 = 0; v96 = -1; do ++v96; while ( v94->m_szKey[v96] ); sub_14003A930(&v113, v94, v96); v97 = cocos2d::CCDictionary::objectForKey(a1->m_ratedDemons, &v113); sub_14003A830((__int64)&v113); if ( !v97 ) { v113 = 0; v114 = 0; v115 = 0; v98 = -1; do ++v98; while ( v94->m_szKey[v98] ); sub_14003A930(&v113, v94, v98); cocos2d::CCDictionary::setObject(a1->m_ratedDemons, a1->m_trueString, &v113); sub_14003A830((__int64)&v113); } v94 = m; if ( !m ) break; } } } else if ( v74 ) { cocos2d::CCObject::retain(v74); m_ratedDemons = a1->m_ratedDemons; if ( m_ratedDemons ) cocos2d::CCObject::release(m_ratedDemons); a1->m_ratedDemons = v74; } v76 = DS_Dictionary::getDictForKey(a2, "GLM_14", 0); if ( !a1->m_reportedLevels && v76 ) { cocos2d::CCObject::retain(v76); m_reportedLevels = a1->m_reportedLevels; if ( m_reportedLevels ) cocos2d::CCObject::release(m_reportedLevels); a1->m_reportedLevels = v76; } v78 = DS_Dictionary::getDictForKey(a2, "GLM_18", 0); v79 = v78; m_onlineFolders = a1->m_onlineFolders; if ( m_onlineFolders ) { GameToolbox::mergeDictsSkipConflict(m_onlineFolders, v78); } else if ( v78 ) { cocos2d::CCObject::retain(v78); v81 = a1->m_onlineFolders; if ( v81 ) cocos2d::CCObject::release(v81); a1->m_onlineFolders = v79; } v99 = DS_Dictionary::getDictForKey(a2, "GLM_19", 0); v100 = v99; m_localLevelsFolders = a1->m_localLevelsFolders; if ( m_localLevelsFolders ) { GameToolbox::mergeDictsSkipConflict(m_localLevelsFolders, v99); } else if ( v99 ) { cocos2d::CCObject::retain(v99); v102 = a1->m_localLevelsFolders; if ( v102 ) cocos2d::CCObject::release(v102); a1->m_localLevelsFolders = v100; } v103 = DS_Dictionary::getArrayForKey(a2, "GLM_20", 0); if ( !a1->m_smartTemplates && v103 ) { cocos2d::CCObject::retain(v103); m_smartTemplates = a1->m_smartTemplates; if ( m_smartTemplates ) cocos2d::CCObject::release(m_smartTemplates); a1->m_smartTemplates = v103; } a1->m_leaderboardType = Top100; GameLevelManager::limitSavedLevels(a1); GameLevelManager::purgeUnusedLevels(a1); v105 = a1->m_onlineLevels; if ( v105 ) { v106 = v105->m_pElements; if ( v106 ) { for ( n = (cocos2d::CCDictElement *)v106->hh.next; ; n = (cocos2d::CCDictElement *)n->hh.next ) { m_pObject = v106->m_pObject; sub_14003BDB0((__int64)&v113, (__int64)&m_pObject[7].m_uOrderOfArrival); GameLevelManager::storeUserName( (__int64)a1, m_pObject[11].m_uAutoReleaseCount - m_pObject[11].m_eObjType, m_pObject[11].m_uUnknown - m_pObject[11].m_unknown2, &v113); v106 = n; if ( !n ) break; } } } }