// // GameLevelManager::dataLoaded from 0x3d8658 to 0x3d8fd8 (2432 bytes) // // 1 xrefs: // > GameManager::dataLoaded @ 0x328982 // // 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 GameLevelManager::dataLoaded(GameLevelManager *a1, DS_Dictionary *a2) { cocos2d::CCDictionary *DictForKey; // r0 cocos2d::CCDictionary *v5; // r7 cocos2d::CCDictionary *m_mainLevels; // r0 cocos2d::CCDictElement *m_pElements; // r7 cocos2d::CCDictElement *next; // r8 GJGameLevel *m_pObject; // r0 GJGameLevel *v10; // r7 const void *v11; // r0 GJGameLevel *v12; // r0 GJGameLevel *v13; // r10 cocos2d::CCDictElement *v14; // r3 GameStatsManager *v15; // r0 cocos2d::CCDictionary *v16; // r0 cocos2d::CCDictionary *v17; // r7 cocos2d::CCDictionary *m_onlineLevels; // r0 cocos2d::CCDictElement *v19; // r7 cocos2d::CCDictElement *v20; // r9 GJGameLevel *v21; // r0 GJGameLevel *v22; // r7 const void *v23; // r0 GJGameLevel *v24; // r0 cocos2d::CCDictElement *v25; // r3 GJGameLevel *v26; // r7 GameStatsManager *v27; // r0 cocos2d::CCDictionary *v28; // r0 cocos2d::CCDictionary *v29; // r7 cocos2d::CCDictionary *m_dailyLevels; // r0 cocos2d::CCDictElement *v31; // r7 cocos2d::CCDictElement *v32; // r9 GJGameLevel *v33; // r0 GJGameLevel *v34; // r7 const void *v35; // r0 GJGameLevel *v36; // r0 cocos2d::CCDictElement *v37; // r3 GJGameLevel *v38; // r7 GameStatsManager *v39; // r0 cocos2d::CCDictionary *v40; // r0 cocos2d::CCDictionary *v41; // r7 cocos2d::CCDictionary *m_gauntletLevels; // r0 cocos2d::CCDictElement *v43; // r7 cocos2d::CCDictElement *v44; // r9 GJGameLevel *v45; // r0 GJGameLevel *v46; // r7 const void *v47; // r0 GJGameLevel *v48; // r0 cocos2d::CCDictElement *v49; // r3 GJGameLevel *v50; // r7 GameStatsManager *v51; // r0 unsigned int v52; // r9 cocos2d::CCArray *ArrayForKey; // r10 cocos2d::CCDictionary *v54; // r7 const void *v55; // r0 int *v56; // r0 char *LevelListKey; // r0 cocos2d::CCDictionary *v58; // r0 cocos2d::CCDictElement *v59; // r7 cocos2d::CCDictElement *v60; // r8 cocos2d::CCObject *v61; // r0 cocos2d::CCObject *v62; // r7 const void *v63; // r0 cocos2d::CCObject *v64; // r0 cocos2d::CCObject *v65; // r3 cocos2d::CCDictElement *v66; // r3 cocos2d::CCDictionary *m_favoriteLists; // r0 cocos2d::CCObject *v68; // r1 signed int m_uAutoReleaseCount; // r1 cocos2d::CCDictionary *v70; // r0 cocos2d::CCDictionary *v71; // r5 cocos2d::CCDictionary *m_followedCreators; // r0 cocos2d::CCDictionary *v73; // r0 cocos2d::CCDictionary *v74; // r5 cocos2d::CCDictionary *m_downloadedLevels; // r0 cocos2d::CCDictionary *v76; // r0 cocos2d::CCDictionary *v77; // r5 cocos2d::CCDictionary *m_searchFilters; // r0 cocos2d::CCDictionary *v79; // r0 cocos2d::CCDictionary *v80; // r5 cocos2d::CCDictionary *v81; // r0 cocos2d::CCDictElement *v82; // r7 cocos2d::CCDictElement *v83; // r8 cocos2d::CCDictionary *m_likedLevels; // r10 int v85; // r10 cocos2d::CCDictionary *v86; // r11 cocos2d::CCString *m_trueString; // r10 cocos2d::CCDictElement *v88; // r3 cocos2d::CCDictionary *v89; // r0 cocos2d::CCDictionary *v90; // r5 cocos2d::CCDictionary *v91; // r0 cocos2d::CCDictElement *v92; // r7 cocos2d::CCDictElement *v93; // r8 cocos2d::CCDictionary *m_ratedLevels; // r10 int v95; // r10 cocos2d::CCDictionary *v96; // r11 cocos2d::CCString *v97; // r10 cocos2d::CCDictElement *v98; // r3 cocos2d::CCDictionary *v99; // r0 cocos2d::CCDictionary *v100; // r5 cocos2d::CCDictionary *v101; // r0 cocos2d::CCDictElement *v102; // r7 cocos2d::CCDictElement *v103; // r8 cocos2d::CCDictionary *m_ratedDemons; // r10 int v105; // r10 cocos2d::CCDictionary *v106; // r11 cocos2d::CCString *v107; // r10 cocos2d::CCDictElement *v108; // r3 cocos2d::CCDictionary *v109; // r0 cocos2d::CCDictionary *v110; // r5 cocos2d::CCDictionary *m_reportedLevels; // r0 cocos2d::CCDictionary *v112; // r0 cocos2d::CCDictionary *v113; // r5 cocos2d::CCDictionary *m_onlineFolders; // r0 cocos2d::CCDictionary *v115; // r0 cocos2d::CCDictionary *v116; // r5 cocos2d::CCDictionary *m_localLevelsFolders; // r0 cocos2d::CCArray *v118; // r0 cocos2d::CCArray *v119; // r5 cocos2d::CCArray *m_smartTemplates; // r0 struct __class_type_info *lpstype; // [sp+4h] [bp-20h] std::string v122; // [sp+18h] [bp-Ch] BYREF DictForKey = DS_Dictionary::getDictForKey(a2, "GLM_01", 0); v5 = DictForKey; if ( a1->m_mainLevels ) { if ( !DictForKey ) goto LABEL_25; m_pElements = DictForKey->m_pElements; if ( m_pElements ) next = (cocos2d::CCDictElement *)m_pElements->hh.next; else next = nullptr; while ( 1 ) { if ( !m_pElements ) goto LABEL_25; sub_776584((int)&v122, (char *)m_pElements); m_pObject = (GJGameLevel *)m_pElements->m_pObject; if ( m_pObject ) m_pObject = (GJGameLevel *)_dynamic_cast( m_pObject, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject, (const struct __class_type_info *)&`typeinfo for'GJGameLevel, 0); v10 = m_pObject; v11 = (const void *)cocos2d::CCDictionary::objectForKey(a1->m_mainLevels, &v122); if ( v11 ) { v12 = (GJGameLevel *)_dynamic_cast( v11, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject, (const struct __class_type_info *)&`typeinfo for'GJGameLevel, 0); v13 = v12; if ( !v10 ) goto LABEL_15; if ( v12 ) { GJGameLevel::handleStatsConflict(v12); v10 = v13; goto LABEL_21; } } else if ( !v10 ) { goto LABEL_15; } cocos2d::CCDictionary::setObject((int)a1->m_mainLevels, v10); LABEL_21: if ( GJGameLevel::getNormalPercent(v10) > 99 ) { v15 = GameStatsManager::sharedState(); GameStatsManager::completedLevel(v15, v10); } LABEL_15: sub_774008(&v122); if ( next ) v14 = (cocos2d::CCDictElement *)next->hh.next; else v14 = nullptr; m_pElements = next; next = v14; } } if ( DictForKey ) { cocos2d::CCObject::retain(DictForKey); m_mainLevels = a1->m_mainLevels; if ( m_mainLevels ) cocos2d::CCObject::release(m_mainLevels); a1->m_mainLevels = v5; } LABEL_25: v16 = DS_Dictionary::getDictForKey(a2, "GLM_03", 0); v17 = v16; if ( a1->m_onlineLevels ) { if ( !v16 ) goto LABEL_50; v19 = v16->m_pElements; if ( v19 ) v20 = (cocos2d::CCDictElement *)v19->hh.next; else v20 = nullptr; while ( 1 ) { if ( !v19 ) goto LABEL_50; sub_776584((int)&v122, (char *)v19); v21 = (GJGameLevel *)v19->m_pObject; if ( v21 ) v21 = (GJGameLevel *)_dynamic_cast( v21, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject, (const struct __class_type_info *)&`typeinfo for'GJGameLevel, 0); v22 = v21; v23 = (const void *)cocos2d::CCDictionary::objectForKey(a1->m_onlineLevels, &v122); if ( v23 ) { v24 = (GJGameLevel *)_dynamic_cast( v23, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject, (const struct __class_type_info *)&`typeinfo for'GJGameLevel, 0); if ( !v22 ) goto LABEL_39; if ( v24 ) { if ( v24->m_levelVersion > v22->m_levelVersion ) v22 = v24; GJGameLevel::handleStatsConflict(v22); } } else if ( !v22 ) { goto LABEL_39; } cocos2d::CCDictionary::setObject((int)a1->m_onlineLevels, v22); v26 = (GJGameLevel *)cocos2d::CCDictionary::objectForKey(a1->m_onlineLevels, &v122); if ( GJGameLevel::getNormalPercent(v26) > 99 ) { v27 = GameStatsManager::sharedState(); GameStatsManager::completedLevel(v27, v26); } LABEL_39: sub_774008(&v122); if ( v20 ) v25 = (cocos2d::CCDictElement *)v20->hh.next; else v25 = nullptr; v19 = v20; v20 = v25; } } if ( v16 ) { cocos2d::CCObject::retain(v16); m_onlineLevels = a1->m_onlineLevels; if ( m_onlineLevels ) cocos2d::CCObject::release(m_onlineLevels); a1->m_onlineLevels = v17; } LABEL_50: GameLevelManager::verifyContainerOnlyHasLevels(a1, a1->m_onlineLevels); v28 = DS_Dictionary::getDictForKey(a2, "GLM_10", 0); v29 = v28; if ( a1->m_dailyLevels ) { if ( !v28 ) goto LABEL_74; v31 = v28->m_pElements; if ( v31 ) v32 = (cocos2d::CCDictElement *)v31->hh.next; else v32 = nullptr; while ( 1 ) { if ( !v31 ) goto LABEL_74; sub_776584((int)&v122, (char *)v31); v33 = (GJGameLevel *)v31->m_pObject; if ( v33 ) v33 = (GJGameLevel *)_dynamic_cast( v33, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject, (const struct __class_type_info *)&`typeinfo for'GJGameLevel, 0); v34 = v33; v35 = (const void *)cocos2d::CCDictionary::objectForKey(a1->m_dailyLevels, &v122); if ( v35 ) { v36 = (GJGameLevel *)_dynamic_cast( v35, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject, (const struct __class_type_info *)&`typeinfo for'GJGameLevel, 0); if ( !v34 ) goto LABEL_64; if ( v36 ) { if ( v36->m_levelVersion > v34->m_levelVersion ) v34 = v36; GJGameLevel::handleStatsConflict(v34); } } else if ( !v34 ) { goto LABEL_64; } cocos2d::CCDictionary::setObject((int)a1->m_dailyLevels, v34); v38 = (GJGameLevel *)cocos2d::CCDictionary::objectForKey(a1->m_dailyLevels, &v122); if ( v38->m_orbCompletion.random - v38->m_orbCompletion.seed > 99 ) { v39 = GameStatsManager::sharedState(); GameStatsManager::completedLevel(v39, v38); } LABEL_64: sub_774008(&v122); if ( v32 ) v37 = (cocos2d::CCDictElement *)v32->hh.next; else v37 = nullptr; v31 = v32; v32 = v37; } } if ( v28 ) { cocos2d::CCObject::retain(v28); m_dailyLevels = a1->m_dailyLevels; if ( m_dailyLevels ) cocos2d::CCObject::release(m_dailyLevels); a1->m_dailyLevels = v29; } LABEL_74: v40 = DS_Dictionary::getDictForKey(a2, "GLM_16", 0); v41 = v40; if ( a1->m_gauntletLevels ) { if ( !v40 ) goto LABEL_98; v43 = v40->m_pElements; if ( v43 ) v44 = (cocos2d::CCDictElement *)v43->hh.next; else v44 = nullptr; while ( 1 ) { if ( !v43 ) goto LABEL_98; sub_776584((int)&v122, (char *)v43); v45 = (GJGameLevel *)v43->m_pObject; if ( v45 ) v45 = (GJGameLevel *)_dynamic_cast( v45, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject, (const struct __class_type_info *)&`typeinfo for'GJGameLevel, 0); v46 = v45; v47 = (const void *)cocos2d::CCDictionary::objectForKey(a1->m_gauntletLevels, &v122); if ( v47 ) { v48 = (GJGameLevel *)_dynamic_cast( v47, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject, (const struct __class_type_info *)&`typeinfo for'GJGameLevel, 0); if ( !v46 ) goto LABEL_88; if ( v48 ) { if ( v48->m_levelVersion > v46->m_levelVersion ) v46 = v48; GJGameLevel::handleStatsConflict(v46); } } else if ( !v46 ) { goto LABEL_88; } cocos2d::CCDictionary::setObject((int)a1->m_gauntletLevels, v46); v50 = (GJGameLevel *)cocos2d::CCDictionary::objectForKey(a1->m_gauntletLevels, &v122); if ( v50->m_orbCompletion.random - v50->m_orbCompletion.seed > 99 ) { v51 = GameStatsManager::sharedState(); GameStatsManager::completedLevel(v51, v50); } LABEL_88: sub_774008(&v122); if ( v44 ) v49 = (cocos2d::CCDictElement *)v44->hh.next; else v49 = nullptr; v43 = v44; v44 = v49; } } if ( v40 ) { cocos2d::CCObject::retain(v40); m_gauntletLevels = a1->m_gauntletLevels; if ( m_gauntletLevels ) cocos2d::CCObject::release(m_gauntletLevels); a1->m_gauntletLevels = v41; } LABEL_98: v52 = 0; ArrayForKey = DS_Dictionary::getArrayForKey(a2, "GLM_22", 0); v54 = cocos2d::CCDictionary::create(); while ( v52 < cocos2d::CCArray::count(ArrayForKey) ) { v55 = (const void *)cocos2d::CCArray::objectAtIndex(ArrayForKey, v52); if ( v55 ) { v56 = (int *)_dynamic_cast( v55, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject, (const struct __class_type_info *)&`typeinfo for'GJLevelList, 0); if ( v56 ) { lpstype = (struct __class_type_info *)v56; LevelListKey = (char *)GameLevelManager::getLevelListKey(a1, v56[69]); sub_776584((int)&v122, LevelListKey); cocos2d::CCDictionary::setObject((int)v54, (cocos2d::CCObject *)lpstype); sub_774008(&v122); } } ++v52; } if ( a1->m_favoriteLists ) { if ( !v54 ) goto LABEL_128; v59 = v54->m_pElements; if ( v59 ) v60 = (cocos2d::CCDictElement *)v59->hh.next; else v60 = nullptr; while ( 1 ) { if ( !v59 ) goto LABEL_128; sub_776584((int)&v122, (char *)v59); v61 = v59->m_pObject; if ( v61 ) v61 = (cocos2d::CCObject *)_dynamic_cast( v61, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject, (const struct __class_type_info *)&`typeinfo for'GJLevelList, 0); v62 = v61; v63 = (const void *)cocos2d::CCDictionary::objectForKey(a1->m_favoriteLists, &v122); if ( v63 ) break; if ( v62 ) goto LABEL_121; LABEL_118: sub_774008(&v122); if ( v60 ) v66 = (cocos2d::CCDictElement *)v60->hh.next; else v66 = nullptr; v59 = v60; v60 = v66; } v64 = (cocos2d::CCObject *)_dynamic_cast( v63, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject, (const struct __class_type_info *)&`typeinfo for'GJLevelList, 0); v65 = v64; if ( !v62 ) goto LABEL_118; if ( v64 ) { m_uAutoReleaseCount = v64[5].m_uAutoReleaseCount; m_favoriteLists = a1->m_favoriteLists; if ( m_uAutoReleaseCount > (signed int)v62[5].m_uAutoReleaseCount ) v68 = v65; else v68 = v62; } else { LABEL_121: m_favoriteLists = a1->m_favoriteLists; v68 = v62; } cocos2d::CCDictionary::setObject((int)m_favoriteLists, v68); goto LABEL_118; } if ( v54 ) { cocos2d::CCObject::retain(v54); v58 = a1->m_favoriteLists; if ( v58 ) cocos2d::CCObject::release(v58); a1->m_favoriteLists = v54; } LABEL_128: 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); v70 = DS_Dictionary::getDictForKey(a2, "GLM_06", 0); v71 = v70; if ( a1->m_followedCreators ) { GameToolbox::mergeDictsSaveLargestInt(a1->m_followedCreators, v70); } else if ( v70 ) { cocos2d::CCObject::retain(v70); m_followedCreators = a1->m_followedCreators; if ( m_followedCreators ) cocos2d::CCObject::release(m_followedCreators); a1->m_followedCreators = v71; } v73 = DS_Dictionary::getDictForKey(a2, "GLM_07", 0); v74 = v73; if ( !a1->m_downloadedLevels && v73 ) { cocos2d::CCObject::retain(v73); m_downloadedLevels = a1->m_downloadedLevels; if ( m_downloadedLevels ) cocos2d::CCObject::release(m_downloadedLevels); a1->m_downloadedLevels = v74; } v76 = DS_Dictionary::getDictForKey(a2, "GLM_08", 0); v77 = v76; if ( !a1->m_searchFilters && v76 ) { cocos2d::CCObject::retain(v76); m_searchFilters = a1->m_searchFilters; if ( m_searchFilters ) cocos2d::CCObject::release(m_searchFilters); a1->m_searchFilters = v77; } v79 = DS_Dictionary::getDictForKey(a2, "GLM_12", 0); v80 = v79; if ( a1->m_likedLevels ) { v82 = v79->m_pElements; if ( v82 ) v83 = (cocos2d::CCDictElement *)v82->hh.next; else v83 = nullptr; while ( v82 && cocos2d::CCDictionary::count(a1->m_likedLevels) < 0x3E8 ) { m_likedLevels = a1->m_likedLevels; sub_776584((int)&v122, (char *)v82); v85 = cocos2d::CCDictionary::objectForKey(m_likedLevels, &v122); sub_774008(&v122); if ( !v85 ) { v86 = a1->m_likedLevels; m_trueString = a1->m_trueString; sub_776584((int)&v122, (char *)v82); cocos2d::CCDictionary::setObject((int)v86, m_trueString); sub_774008(&v122); } if ( v83 ) v88 = (cocos2d::CCDictElement *)v83->hh.next; else v88 = nullptr; v82 = v83; v83 = v88; } } else if ( v79 ) { cocos2d::CCObject::retain(v79); v81 = a1->m_likedLevels; if ( v81 ) cocos2d::CCObject::release(v81); a1->m_likedLevels = v80; } v89 = DS_Dictionary::getDictForKey(a2, "GLM_13", 0); v90 = v89; if ( a1->m_ratedLevels ) { v92 = v89->m_pElements; if ( v92 ) v93 = (cocos2d::CCDictElement *)v92->hh.next; else v93 = nullptr; while ( v92 && cocos2d::CCDictionary::count(a1->m_ratedLevels) < 0x3E8 ) { m_ratedLevels = a1->m_ratedLevels; sub_776584((int)&v122, (char *)v92); v95 = cocos2d::CCDictionary::objectForKey(m_ratedLevels, &v122); sub_774008(&v122); if ( !v95 ) { v96 = a1->m_ratedLevels; v97 = a1->m_trueString; sub_776584((int)&v122, (char *)v92); cocos2d::CCDictionary::setObject((int)v96, v97); sub_774008(&v122); } if ( v93 ) v98 = (cocos2d::CCDictElement *)v93->hh.next; else v98 = nullptr; v92 = v93; v93 = v98; } } else if ( v89 ) { cocos2d::CCObject::retain(v89); v91 = a1->m_ratedLevels; if ( v91 ) cocos2d::CCObject::release(v91); a1->m_ratedLevels = v90; } v99 = DS_Dictionary::getDictForKey(a2, "GLM_15", 0); v100 = v99; if ( a1->m_ratedDemons ) { v102 = v99->m_pElements; if ( v102 ) v103 = (cocos2d::CCDictElement *)v102->hh.next; else v103 = nullptr; while ( v102 && cocos2d::CCDictionary::count(a1->m_ratedDemons) < 0x3E8 ) { m_ratedDemons = a1->m_ratedDemons; sub_776584((int)&v122, (char *)v102); v105 = cocos2d::CCDictionary::objectForKey(m_ratedDemons, &v122); sub_774008(&v122); if ( !v105 ) { v106 = a1->m_ratedDemons; v107 = a1->m_trueString; sub_776584((int)&v122, (char *)v102); cocos2d::CCDictionary::setObject((int)v106, v107); sub_774008(&v122); } if ( v103 ) v108 = (cocos2d::CCDictElement *)v103->hh.next; else v108 = nullptr; v102 = v103; v103 = v108; } } else if ( v99 ) { cocos2d::CCObject::retain(v99); v101 = a1->m_ratedDemons; if ( v101 ) cocos2d::CCObject::release(v101); a1->m_ratedDemons = v100; } v109 = DS_Dictionary::getDictForKey(a2, "GLM_14", 0); v110 = v109; if ( !a1->m_reportedLevels && v109 ) { cocos2d::CCObject::retain(v109); m_reportedLevels = a1->m_reportedLevels; if ( m_reportedLevels ) cocos2d::CCObject::release(m_reportedLevels); a1->m_reportedLevels = v110; } v112 = DS_Dictionary::getDictForKey(a2, "GLM_18", 0); v113 = v112; if ( a1->m_onlineFolders ) { GameToolbox::mergeDictsSkipConflict(a1->m_onlineFolders, v112); } else if ( v112 ) { cocos2d::CCObject::retain(v112); m_onlineFolders = a1->m_onlineFolders; if ( m_onlineFolders ) cocos2d::CCObject::release(m_onlineFolders); a1->m_onlineFolders = v113; } v115 = DS_Dictionary::getDictForKey(a2, "GLM_19", 0); v116 = v115; if ( a1->m_localLevelsFolders ) { GameToolbox::mergeDictsSkipConflict(a1->m_localLevelsFolders, v115); } else if ( v115 ) { cocos2d::CCObject::retain(v115); m_localLevelsFolders = a1->m_localLevelsFolders; if ( m_localLevelsFolders ) cocos2d::CCObject::release(m_localLevelsFolders); a1->m_localLevelsFolders = v116; } v118 = DS_Dictionary::getArrayForKey(a2, "GLM_20", 0); v119 = v118; if ( !a1->m_smartTemplates && v118 ) { cocos2d::CCObject::retain(v118); m_smartTemplates = a1->m_smartTemplates; if ( m_smartTemplates ) cocos2d::CCObject::release(m_smartTemplates); a1->m_smartTemplates = v119; } a1->m_leaderboardType = Top100; GameLevelManager::limitSavedLevels(a1); GameLevelManager::purgeUnusedLevels(a1); GameLevelManager::updateUsernames(a1); }
GD Web Decomp Icon

GD Web Decomp

Raw Source