// // GameLevelManager::saveFetchedLevels from 0x805690 to 0x805848 (440 bytes) // // 2 xrefs: // > GameLevelManager::onGetOnlineLevelsCompleted @ 0x848650 // > @ 0x74f20 // // 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:54:45 +0000 // cocos2d::CCArray *__fastcall GameLevelManager::saveFetchedLevels(GameLevelManager *this, cocos2d::CCArray *a2) { unsigned int v3; // w21 bool v5; // cf unsigned int v6; // w1 cocos2d::CCArray *result; // x0 __int64 v8; // x20 _DWORD *SavedLevel; // x0 _DWORD *v10; // x19 int v11; // w25 float v12; // s0 int v13; // w25 float v14; // s0 int v15; // w25 float v16; // s0 int v17; // w3 float v18; // s0 GameStatsManager *v19; // x0 v3 = 0; v5 = (unsigned int)cocos2d::CCArray::count(a2) == 0; v6 = 0; for ( result = a2; !v5; result = a2 ) { v8 = cocos2d::CCArray::objectAtIndex(result, v6); SavedLevel = (_DWORD *)GameLevelManager::getSavedLevel(this, (GJGameLevel *)v8); v10 = SavedLevel; if ( SavedLevel ) { SavedLevel[223] = *(_DWORD *)(v8 + 892); SavedLevel[224] = *(_DWORD *)(v8 + 896); SavedLevel[161] = *(_DWORD *)(v8 + 644); v11 = *(_DWORD *)(v8 + 932) - *(_DWORD *)(v8 + 936); SavedLevel[235] = v11; v12 = (float)((float)rand() * 4.6566e-10) * 1000.0; v10[234] = (int)v12; v10[233] = v11 + (int)v12; v10[236] = *(_DWORD *)(v8 + 944); v13 = *(_DWORD *)(v8 + 948) - *(_DWORD *)(v8 + 952); v10[239] = v13; v14 = (float)((float)rand() * 4.6566e-10) * 1000.0; v10[238] = (int)v14; v10[237] = v13 + (int)v14; v10[226] = *(_DWORD *)(v8 + 904); v10[159] = *(_DWORD *)(v8 + 636); v10[160] = *(_DWORD *)(v8 + 640); *((_BYTE *)v10 + 960) = *(_BYTE *)(v8 + 960); v10[241] = *(_DWORD *)(v8 + 964); v15 = *(_DWORD *)(v8 + 968) - *(_DWORD *)(v8 + 972); v10[244] = v15; v16 = (float)rand(); v17 = *((unsigned __int8 *)v10 + 650); v18 = (float)(v16 * 4.6566e-10) * 1000.0; v10[243] = (int)v18; v10[242] = v15 + (int)v18; if ( v17 ) *(_BYTE *)(v8 + 650) = 1; GameLevelManager::updateLevelRewards(this, (GJGameLevel *)v10); } else { v19 = (GameStatsManager *)GameStatsManager::sharedState(nullptr); if ( (unsigned __int8)GameStatsManager::hasCompletedLevel(v19, (GJGameLevel *)v8) ) { ++v3; GJGameLevel::setNormalPercent((GJGameLevel *)v8, 100); goto LABEL_7; } } ++v3; LABEL_7: v5 = v3 >= (unsigned int)cocos2d::CCArray::count(a2); v6 = v3; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source