// // GameStatsManager::getTotalCollectedCurrency from 0x517fbc to 0x51834e (914 bytes) // // 1 xrefs: // > GameStatsManager::recountSpecialStats @ 0x52b0d6 // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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 11:51:44 +0000 // int __fastcall GameStatsManager::getTotalCollectedCurrency(GameStatsManager *this) { GameStatsManager *v1; // r4 char *v2; // r7 float v3; // s16 GameLevelManager *v4; // r0 int v5; // r3 GJGameLevel *MainLevel; // r1 char *v7; // r5 GameLevelManager *v8; // r0 int v9; // r3 GJGameLevel *v10; // r1 char *v11; // r5 GameLevelManager *v12; // r0 int v13; // r3 GJGameLevel *v14; // r1 unsigned int v15; // r5 cocos2d::CCArray *v16; // r9 cocos2d::CCString *v17; // r0 GameLevelManager *v18; // r6 GameLevelManager *v19; // r0 GJGameLevel *SavedLevel; // r11 cocos2d::CCString *v21; // r0 const char *CString; // r0 const char *v23; // r6 size_t v24; // r0 char *v25; // r1 cocos2d::CCDictionary *v26; // r11 size_t v27; // r0 unsigned int v28; // r5 cocos2d::CCArray *v29; // r9 cocos2d::CCString *v30; // r0 GameLevelManager *v31; // r6 GameLevelManager *v32; // r0 GJGameLevel *SavedGauntletLevel; // r11 cocos2d::CCString *v34; // r0 const char *v35; // r0 const char *v36; // r6 size_t v37; // r0 char *v38; // r1 cocos2d::CCDictionary *v39; // r11 size_t v40; // r0 unsigned int v41; // r6 cocos2d::CCArray *v42; // r9 cocos2d::CCString *v43; // r0 GameLevelManager *v44; // r7 GameLevelManager *v45; // r0 GJGameLevel *SavedDailyLevel; // r11 cocos2d::CCString *v47; // r0 const char *v48; // r0 const char *v49; // r7 size_t v50; // r0 char *v51; // r1 cocos2d::CCDictionary *v52; // r11 size_t v53; // r0 char *v54; // r1 cocos2d::CCDictionary *v55; // r11 size_t v56; // r0 char *v58; // [sp+4h] [bp-30h] char *v59; // [sp+4h] [bp-30h] char *v60; // [sp+4h] [bp-30h] char *v61; // [sp+4h] [bp-30h] int v62[2]; // [sp+8h] [bp-2Ch] BYREF char *v63; // [sp+10h] [bp-24h] int v64; // [sp+14h] [bp-20h] BYREF int v65; // [sp+18h] [bp-1Ch] char *v66; // [sp+1Ch] [bp-18h] int v67; // [sp+20h] [bp-14h] BYREF int v68; // [sp+24h] [bp-10h] int v69; // [sp+28h] [bp-Ch] v1 = this; v2 = (_BYTE *)(&dword_0 + 1); v3 = 0.0; do { v4 = (GameLevelManager *)GameLevelManager::sharedState(this); MainLevel = (GJGameLevel *)GameLevelManager::getMainLevel(v4, v2, 1, v5); if ( !MainLevel ) LABEL_11: __und(0xFFu); ++v2; this = (GameStatsManager *)GameStatsManager::getAwardedCurrencyForLevel(v1, MainLevel); v3 = v3 + (float)(int)this; } while ( v2 != (_BYTE *)&dword_14 + 3 ); v7 = (_BYTE *)(&stru_137C + 13); do { v8 = (GameLevelManager *)GameLevelManager::sharedState(this); v10 = (GJGameLevel *)GameLevelManager::getMainLevel(v8, v7, 1, v9); if ( !v10 ) goto LABEL_11; ++v7; this = (GameStatsManager *)GameStatsManager::getAwardedCurrencyForLevel(v1, v10); v3 = v3 + (float)(int)this; } while ( v7 != (_BYTE *)&stru_138C.st_name + 1 ); v11 = (_BYTE *)(&stru_7CC + 5); do { v12 = (GameLevelManager *)GameLevelManager::sharedState(this); v14 = (GJGameLevel *)GameLevelManager::getMainLevel(v12, v11, 1, v13); if ( !v14 ) goto LABEL_11; ++v11; this = (GameStatsManager *)GameStatsManager::getAwardedCurrencyForLevel(v1, v14); v3 = v3 + (float)(int)this; } while ( v11 != (_BYTE *)&stru_7CC.st_shndx + 1 ); v15 = 0; v16 = (cocos2d::CCArray *)cocos2d::CCDictionary::allKeys(*((cocos2d::CCDictionary **)v1 + 107)); while ( v15 < cocos2d::CCArray::count(v16) ) { v17 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v16, v15); v18 = (GameLevelManager *)cocos2d::CCString::intValue(v17); v19 = (GameLevelManager *)GameLevelManager::sharedState(v18); SavedLevel = (GJGameLevel *)GameLevelManager::getSavedLevel(v19, (const char *)v18); if ( SavedLevel ) { v3 = v3 + (float)GameStatsManager::getAwardedCurrencyForLevel(v1, SavedLevel); } else { v21 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)v18); CString = (const char *)cocos2d::CCString::getCString(v21); v64 = 0; v65 = 0; v66 = nullptr; v23 = CString; v24 = strlen(CString); std::string::__init(&v64, v23, v24); v67 = 0; v68 = 0; if ( (v64 & 1) == 0 ) v25 = (char *)&v64 + 1; v69 = 0; if ( (v64 & 1) != 0 ) v25 = v66; v26 = *((cocos2d::CCDictionary **)v1 + 107); v58 = v25; v27 = strlen(v25); std::string::__init(&v67, v58, v27); cocos2d::CCDictionary::removeObjectForKey(v26); std::string::~string((int)&v67); std::string::~string((int)&v64); } ++v15; } v28 = 0; v29 = (cocos2d::CCArray *)cocos2d::CCDictionary::allKeys(*((cocos2d::CCDictionary **)v1 + 109)); while ( v28 < cocos2d::CCArray::count(v29) ) { v30 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v29, v28); v31 = (GameLevelManager *)cocos2d::CCString::intValue(v30); v32 = (GameLevelManager *)GameLevelManager::sharedState(v31); SavedGauntletLevel = (GJGameLevel *)GameLevelManager::getSavedGauntletLevel(v32, (const char *)v31); if ( SavedGauntletLevel ) { v3 = v3 + (float)GameStatsManager::getAwardedCurrencyForLevel(v1, SavedGauntletLevel); } else { v34 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)v31); v35 = (const char *)cocos2d::CCString::getCString(v34); v64 = 0; v65 = 0; v66 = nullptr; v36 = v35; v37 = strlen(v35); std::string::__init(&v64, v36, v37); v67 = 0; v38 = (char *)((unsigned __int8)v64 << 31); v68 = 0; if ( (v64 & 1) == 0 ) v38 = (char *)&v64 + 1; v69 = 0; if ( (v64 & 1) != 0 ) v38 = v66; v39 = *((cocos2d::CCDictionary **)v1 + 109); v59 = v38; v40 = strlen(v38); std::string::__init(&v67, v59, v40); cocos2d::CCDictionary::removeObjectForKey(v39); std::string::~string((int)&v67); std::string::~string((int)&v64); } ++v28; } v41 = 0; v42 = (cocos2d::CCArray *)cocos2d::CCDictionary::allKeys(*((cocos2d::CCDictionary **)v1 + 110)); while ( v41 < cocos2d::CCArray::count(v42) ) { v43 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v42, v41); v44 = (GameLevelManager *)cocos2d::CCString::intValue(v43); v45 = (GameLevelManager *)GameLevelManager::sharedState(v44); SavedDailyLevel = (GJGameLevel *)GameLevelManager::getSavedDailyLevel(v45, (const char *)v44); if ( SavedDailyLevel ) { v3 = v3 + (float)GameStatsManager::getAwardedCurrencyForLevel(v1, SavedDailyLevel); } else { v47 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)v44); v48 = (const char *)cocos2d::CCString::getCString(v47); v62[0] = 0; v62[1] = 0; v63 = nullptr; v49 = v48; v50 = strlen(v48); std::string::__init(v62, v49, v50); v64 = 0; v65 = 0; if ( (v62[0] & 1) == 0 ) v51 = (char *)v62 + 1; v66 = nullptr; if ( (v62[0] & 1) != 0 ) v51 = v63; v52 = *((cocos2d::CCDictionary **)v1 + 110); v60 = v51; v53 = strlen(v51); std::string::__init(&v64, v60, v53); cocos2d::CCDictionary::removeObjectForKey(v52); std::string::~string((int)&v64); v67 = 0; v68 = 0; if ( (v62[0] & 1) == 0 ) v54 = (char *)v62 + 1; v69 = 0; if ( (v62[0] & 1) != 0 ) v54 = v63; v55 = *((cocos2d::CCDictionary **)v1 + 112); v61 = v54; v56 = strlen(v54); std::string::__init(&v67, v61, v56); cocos2d::CCDictionary::removeObjectForKey(v55); std::string::~string((int)&v67); std::string::~string((int)v62); } ++v41; } return (int)v3; }
GD Web Decomp Icon

GD Web Decomp

Raw Source