// // LocalLevelManager::dataLoaded from 0x91487c to 0x915394 (2840 bytes) // // 2 xrefs: // > @ 0xeabc8 // > @ 0x1467440 // // This function is hookable on this platform (idp: arm, 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 12:57:19 +0000 // __int64 __fastcall LocalLevelManager::dataLoaded(LocalLevelManager *this, DS_Dictionary *a2) { cocos2d::CCObject *ArrayForKey; // x0 int v4; // w19 unsigned int v5; // w20 __int64 LevelsInNameGroups; // x0 _QWORD *v7; // x19 __int64 v8; // x1 __int64 *v9; // x21 __int64 *v10; // x22 __int64 v11; // x0 __int64 *v12; // x1 unsigned int v13; // w28 __int64 v14; // x0 __int64 v15; // x23 __int64 v16; // x1 __int64 v17; // x1 cocos2d::CCArray *v18; // x19 unsigned int v19; // w21 int v20; // w20 int v21; // w0 unsigned int m; // w21 __int64 v23; // x22 unsigned int n; // w20 __int64 v25; // x2 char v26; // w0 __int64 v27; // x0 __int64 v28; // x1 char v29; // w0 __int64 v30; // x0 __int64 v31; // x1 _BOOL4 v32; // w21 cocos2d::CCArray *v33; // x19 cocos2d::CCArray *v34; // x21 unsigned int ii; // w20 cocos2d::CCString *v36; // x0 const char *v37; // x0 size_t v38; // x0 cocos2d::CCArray *v39; // x1 cocos2d::CCObject *v40; // x0 cocos2d::CCArray *v41; // x28 unsigned int v42; // w25 int updated; // w19 cocos2d::CCDictionary *v44; // x0 cocos2d::CCDictionary *v45; // x26 __int64 v46; // x0 cocos2d::CCObject *v47; // x19 __int64 v48; // x21 __int64 v49; // x1 cocos2d::CCObject *v50; // x20 cocos2d::CCArray *v51; // x0 unsigned int i; // w25 __int64 v53; // x0 cocos2d::CCObject *v54; // x23 __int64 v55; // x1 __int64 v56; // x1 cocos2d::CCArray *v57; // x19 unsigned int v58; // w21 int v59; // w20 int v60; // w0 unsigned int j; // w21 __int64 v62; // x22 unsigned int k; // w20 GJLevelList *v64; // x0 unsigned int v65; // w20 cocos2d::CCArray *v66; // x21 cocos2d::CCString *v67; // x0 const char *CString; // x0 size_t v69; // x0 cocos2d::CCArray *v70; // x1 __int64 v71; // x0 __int64 v72; // x1 cocos2d::CCArray *v73; // x19 cocos2d::CCObject *v75; // x0 cocos2d::CCObject *v76; // x0 int v78; // [xsp+7Ch] [xbp+7Ch] cocos2d::CCDictionary *v79; // [xsp+80h] [xbp+80h] int v80; // [xsp+80h] [xbp+80h] cocos2d::CCArray *v81; // [xsp+88h] [xbp+88h] cocos2d::CCArray *v82; // [xsp+88h] [xbp+88h] cocos2d::CCArray *v83; // [xsp+88h] [xbp+88h] cocos2d::CCArray *v84; // [xsp+88h] [xbp+88h] cocos2d::CCArray *v85; // [xsp+88h] [xbp+88h] __int64 v86; // [xsp+90h] [xbp+90h] BYREF __int64 **v87; // [xsp+98h] [xbp+98h] BYREF __int64 *v88; // [xsp+A0h] [xbp+A0h] BYREF __int64 v89; // [xsp+A8h] [xbp+A8h] __int64 v90; // [xsp+B0h] [xbp+B0h] BYREF __int64 v91; // [xsp+B8h] [xbp+B8h] void *v92; // [xsp+C0h] [xbp+C0h] __int64 v93; // [xsp+C8h] [xbp+C8h] BYREF __int64 v94; // [xsp+D0h] [xbp+D0h] void *v95; // [xsp+D8h] [xbp+D8h] __int64 v96; // [xsp+E0h] [xbp+E0h] BYREF __int64 v97; // [xsp+E8h] [xbp+E8h] void *v98; // [xsp+F0h] [xbp+F0h] ArrayForKey = (cocos2d::CCObject *)DS_Dictionary::getArrayForKey(a2, "LLM_01", 0); v81 = ArrayForKey; if ( !*((_QWORD *)this + 45) ) { if ( !ArrayForKey ) goto LABEL_72; cocos2d::CCObject::retain(ArrayForKey); v75 = *((cocos2d::CCObject **)this + 45); if ( v75 ) cocos2d::CCObject::release(v75); *((_QWORD *)this + 45) = v81; v40 = (cocos2d::CCObject *)DS_Dictionary::getArrayForKey(a2, "LLM_03", 0); v41 = v40; if ( !*((_QWORD *)this + 46) ) goto LABEL_129; LABEL_73: v42 = 0; updated = LocalLevelManager::updateListOrder(this); v44 = (cocos2d::CCDictionary *)((unsigned int)cocos2d::CCArray::count(v41) + 1 + updated); v80 = (int)v44; v45 = (cocos2d::CCDictionary *)cocos2d::CCDictionary::create(v44); if ( !(unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 46)) ) { LABEL_79: for ( i = 0; i < (unsigned int)cocos2d::CCArray::count(v41); ++i ) { v53 = cocos2d::CCArray::objectAtIndex(v41, i); *(_BYTE *)(v53 + 399) = 0; v96 = 0; v54 = (cocos2d::CCObject *)v53; v97 = 0; v98 = nullptr; if ( (*(_BYTE *)(v53 + 432) & 1) != 0 ) { std::string::__init(&v96, *(void **)(v53 + 448), *(_QWORD *)(v53 + 440)); } else { v55 = *(_QWORD *)(v53 + 440); v96 = *(_QWORD *)(v53 + 432); v97 = v55; v98 = *(void **)(v53 + 448); } v56 = (unsigned __int8)v96 >> 1; if ( (v96 & 1) != 0 ) v56 = v97; if ( !v56 ) std::string::assign(&v96, "Unknown"); v57 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(v45, &v96); v58 = 0; v59 = 0; if ( v57 ) { while ( v58 < (unsigned int)cocos2d::CCArray::count(v57) ) { v60 = *(_DWORD *)(cocos2d::CCArray::objectAtIndex(v57, v58++) + 372); if ( v59 < v60 ) v59 = v60; } for ( j = 0; j < (unsigned int)cocos2d::CCArray::count(v57); ++j ) { v62 = cocos2d::CCArray::objectAtIndex(v57, j); if ( *(_DWORD *)(v62 + 372) == *((_DWORD *)v54 + 93) ) { if ( *(_BYTE *)(v62 + 399) ) { if ( !(unsigned __int8)GJLevelList::hasMatchingLevels(v54, (GJLevelList *)v62) ) { cocos2d::CCArray::addObject(v57, v54); *(_DWORD *)(v62 + 372) = v59 + 1; *((_DWORD *)v54 + 94) = v80--; } } else { GJLevelList::handleStatsConflict((__int64)v54, (GJLevelList *)v62); cocos2d::CCArray::removeObject(v57, (cocos2d::CCObject *)v62, 1); cocos2d::CCArray::addObject(v57, v54); } goto LABEL_100; } } for ( k = 0; k < (unsigned int)cocos2d::CCArray::count(v57); ++k ) { v64 = (GJLevelList *)cocos2d::CCArray::objectAtIndex(v57, k); if ( (unsigned __int8)GJLevelList::hasMatchingLevels(v54, v64) ) goto LABEL_100; } cocos2d::CCArray::addObject(v57, v54); *((_DWORD *)v54 + 94) = v80--; } else { v73 = (cocos2d::CCArray *)cocos2d::CCArray::create(nullptr); cocos2d::CCArray::addObject(v73, v54); *((_DWORD *)v54 + 94) = v80; cocos2d::CCDictionary::setObject((int)v45, v73); --v80; } LABEL_100: if ( (v96 & 1) != 0 ) operator delete(v98); } v65 = 0; cocos2d::CCArray::removeAllObjects(*((cocos2d::CCArray **)this + 46)); v66 = (cocos2d::CCArray *)cocos2d::CCDictionary::allKeys(v45); while ( v65 < (unsigned int)cocos2d::CCArray::count(v66) ) { v67 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v66, v65); CString = (const char *)cocos2d::CCString::getCString(v67); v96 = 0; v97 = 0; v98 = nullptr; v84 = (cocos2d::CCArray *)CString; v69 = strlen(CString); std::string::__init(&v96, v84, v69); v70 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(v45, &v96); if ( (v96 & 1) != 0 ) { v85 = v70; operator delete(v98); v70 = v85; } ++v65; cocos2d::CCArray::addObjectsFromArray(*((cocos2d::CCArray **)this + 46), v70); } LocalLevelManager::reorderLists(this); goto LABEL_121; } while ( 1 ) { v46 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 46), v42); v96 = 0; v97 = 0; v47 = (cocos2d::CCObject *)v46; v98 = nullptr; v48 = v46 + 432; if ( (*(_BYTE *)(v46 + 432) & 1) != 0 ) { std::string::__init(&v96, *(void **)(v46 + 448), *(_QWORD *)(v46 + 440)); } else { v49 = *(_QWORD *)(v46 + 440); v96 = *(_QWORD *)v48; v97 = v49; v98 = *(void **)(v46 + 448); } v50 = (cocos2d::CCObject *)cocos2d::CCDictionary::objectForKey(v45, &v96); v51 = (cocos2d::CCArray *)(unsigned __int8)v96; if ( (v96 & 1) != 0 ) { operator delete(v98); if ( !v50 ) { LABEL_109: v71 = cocos2d::CCArray::create(v51); v96 = 0; v97 = 0; v50 = (cocos2d::CCObject *)v71; v98 = nullptr; if ( (*((_BYTE *)v47 + 432) & 1) != 0 ) { std::string::__init(&v96, *(void **)(v48 + 16), *(_QWORD *)(v48 + 8)); } else { v72 = *(_QWORD *)(v48 + 8); v96 = *(_QWORD *)v48; v97 = v72; v98 = *(void **)(v48 + 16); } cocos2d::CCDictionary::setObject((int)v45, v50); if ( (v96 & 1) != 0 ) operator delete(v98); } } else if ( !v50 ) { goto LABEL_109; } ++v42; cocos2d::CCArray::addObject(v50, v47); if ( v42 >= (unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 46)) ) goto LABEL_79; } } v4 = LocalLevelManager::updateLevelOrder(this); v5 = 0; v78 = cocos2d::CCArray::count(v81) + 1 + v4; LevelsInNameGroups = LocalLevelManager::getLevelsInNameGroups((cocos2d::CCArray **)this); v88 = nullptr; v79 = (cocos2d::CCDictionary *)LevelsInNameGroups; v89 = 0; v87 = &v88; while ( v5 < (unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 45)) ) { v7 = (_QWORD *)(cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 45), v5) + 1440); v8 = *(_BYTE *)v7 >> 1; if ( (*(_BYTE *)v7 & 1) != 0 ) v8 = v7[1]; if ( !v8 || (v9 = std::__tree::__find_equal((__int64)&v87, &v86, (__int64)v7), *v9) ) { ++v5; } else { v10 = (__int64 *)operator new(0x38u); std::string::basic_string((unsigned __int64)(v10 + 4), v7); v11 = v86; v12 = v10; *v10 = 0; v10[2] = v11; v10[1] = 0; *v9 = (__int64)v10; if ( *v87 ) { v87 = (__int64 **)*v87; v12 = (__int64 *)*v9; } ++v5; std::__tree_balance_after_insert *>(v88, v12); ++v89; } } v13 = 0; while ( v13 < (unsigned int)cocos2d::CCArray::count(v81) ) { v14 = cocos2d::CCArray::objectAtIndex(v81, v13); *(_BYTE *)(v14 + 786) = 0; v15 = v14; v96 = 0; v97 = 0; v98 = nullptr; if ( (*(_BYTE *)(v14 + 344) & 1) != 0 ) { std::string::__init(&v96, *(void **)(v14 + 360), *(_QWORD *)(v14 + 352)); } else { v16 = *(_QWORD *)(v14 + 352); v96 = *(_QWORD *)(v14 + 344); v97 = v16; v98 = *(void **)(v14 + 360); } v17 = (unsigned __int8)v96 >> 1; if ( (v96 & 1) != 0 ) v17 = v97; if ( !v17 ) std::string::assign(&v96, "Unknown"); v18 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(v79, &v96); v19 = 0; v20 = 0; if ( v18 ) { while ( v19 < (unsigned int)cocos2d::CCArray::count(v18) ) { v21 = *(_DWORD *)(cocos2d::CCArray::objectAtIndex(v18, v19++) + 612); if ( v20 < v21 ) v20 = v21; } for ( m = 0; ; ++m ) { if ( m >= (unsigned int)cocos2d::CCArray::count(v18) ) { for ( n = 0; n < (unsigned int)cocos2d::CCArray::count(v18); ++n ) { v25 = cocos2d::CCArray::objectAtIndex(v18, n) + 392; v26 = *(_BYTE *)v25; v90 = 0; v91 = 0; v92 = nullptr; if ( (v26 & 1) != 0 ) { std::string::__init(&v90, *(void **)(v25 + 16), *(_QWORD *)(v25 + 8)); } else { v27 = *(_QWORD *)v25; v28 = *(_QWORD *)(v25 + 8); v92 = *(void **)(v25 + 16); v90 = v27; v91 = v28; } v29 = *(_BYTE *)(v15 + 392); v93 = 0; v94 = 0; v95 = nullptr; if ( (v29 & 1) != 0 ) { std::string::__init(&v93, *(void **)(v15 + 408), *(_QWORD *)(v15 + 400)); } else { v30 = *(_QWORD *)(v15 + 392); v31 = *(_QWORD *)(v15 + 400); v95 = *(void **)(v15 + 408); v93 = v30; v94 = v31; } v32 = sub_91069C((__int64)&v90, (__int64)&v93); if ( (v93 & 1) != 0 ) operator delete(v95); if ( (v90 & 1) != 0 ) { operator delete(v92); if ( v32 ) { LABEL_41: if ( (v96 & 1) != 0 ) goto LABEL_45; goto LABEL_42; } } else if ( v32 ) { goto LABEL_41; } } if ( std::__tree::__count_unique((__int64)&v87, v15 + 1440) ) { if ( (*(_BYTE *)(v15 + 1440) & 1) != 0 ) { **(_BYTE **)(v15 + 1456) = 0; *(_QWORD *)(v15 + 1448) = 0; } else { *(_BYTE *)(v15 + 1441) = 0; *(_BYTE *)(v15 + 1440) = 0; } } cocos2d::CCArray::addObject(v18, (cocos2d::CCObject *)v15); *(_DWORD *)(v15 + 632) = v78--; if ( (v96 & 1) == 0 ) goto LABEL_42; goto LABEL_45; } v23 = cocos2d::CCArray::objectAtIndex(v18, m); if ( *(_DWORD *)(v23 + 612) == *(_DWORD *)(v15 + 612) ) break; } if ( *(_BYTE *)(v23 + 786) ) { if ( std::__tree::__count_unique((__int64)&v87, v15 + 1440) ) { if ( (*(_BYTE *)(v15 + 1440) & 1) != 0 ) { **(_BYTE **)(v15 + 1456) = 0; *(_QWORD *)(v15 + 1448) = 0; } else { *(_BYTE *)(v15 + 1441) = 0; *(_BYTE *)(v15 + 1440) = 0; } } cocos2d::CCArray::addObject(v18, (cocos2d::CCObject *)v15); *(_DWORD *)(v23 + 612) = v20 + 1; *(_DWORD *)(v15 + 632) = v78--; if ( (v96 & 1) == 0 ) goto LABEL_42; } else { GJGameLevel::handleStatsConflict((GJGameLevel *)v15, (GJGameLevel *)v23); cocos2d::CCArray::removeObject(v18, (cocos2d::CCObject *)v23, 1); cocos2d::CCArray::addObject(v18, (cocos2d::CCObject *)v15); if ( (v96 & 1) == 0 ) goto LABEL_42; } LABEL_45: ++v13; operator delete(v98); } else { v33 = (cocos2d::CCArray *)cocos2d::CCArray::create(nullptr); if ( std::__tree::__count_unique((__int64)&v87, v15 + 1440) ) { if ( (*(_BYTE *)(v15 + 1440) & 1) != 0 ) { **(_BYTE **)(v15 + 1456) = 0; *(_QWORD *)(v15 + 1448) = 0; } else { *(_BYTE *)(v15 + 1441) = 0; *(_BYTE *)(v15 + 1440) = 0; } } cocos2d::CCArray::addObject(v33, (cocos2d::CCObject *)v15); *(_DWORD *)(v15 + 632) = v78; cocos2d::CCDictionary::setObject((int)v79, v33); --v78; if ( (v96 & 1) != 0 ) goto LABEL_45; LABEL_42: ++v13; } } cocos2d::CCArray::removeAllObjects(*((cocos2d::CCArray **)this + 45)); v34 = (cocos2d::CCArray *)cocos2d::CCDictionary::allKeys(v79); for ( ii = 0; ii < (unsigned int)cocos2d::CCArray::count(v34); ++ii ) { v36 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v34, ii); v37 = (const char *)cocos2d::CCString::getCString(v36); v96 = 0; v97 = 0; v98 = nullptr; v82 = (cocos2d::CCArray *)v37; v38 = strlen(v37); std::string::__init(&v96, v82, v38); v39 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(v79, &v96); if ( (v96 & 1) != 0 ) { v83 = v39; operator delete(v98); v39 = v83; } cocos2d::CCArray::addObjectsFromArray(*((cocos2d::CCArray **)this + 45), v39); } LocalLevelManager::reorderLevels(this); std::__tree::~__tree((__int64)&v87); LABEL_72: v40 = (cocos2d::CCObject *)DS_Dictionary::getArrayForKey(a2, "LLM_03", 0); v41 = v40; if ( *((_QWORD *)this + 46) ) goto LABEL_73; LABEL_129: if ( v40 ) { cocos2d::CCObject::retain(v40); v76 = *((cocos2d::CCObject **)this + 46); if ( v76 ) cocos2d::CCObject::release(v76); *((_QWORD *)this + 46) = v41; } LABEL_121: if ( (int)DS_Dictionary::getIntegerForKey(a2, "LLM_02") <= 18 ) LocalLevelManager::updateLevelRevision((cocos2d::CCArray **)this); return _stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source