// // GameStatsManager::getTotalCollectedCurrency from 0x1402e7280 to 0x1402e7bd1 (2385 bytes) // // 2 xrefs: // > GameStatsManager::recountSpecialStats @ 0x1402e7f4f // > @ 0x14091e050 // // This function is hookable on this platform (idp: pc, 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 11:29:50 +0000 // // Hidden C++ exception states: #wind=8 __int64 __fastcall GameStatsManager::getTotalCollectedCurrency(__int64 a1) { float v2; // xmm6_4 int v3; // edi signed int i; // ebx __int64 v5; // rcx __int64 MainLevel; // rax cocos2d::CCString *v7; // rax const char *CString; // rax size_t v9; // r8 __int128 *v10; // rdx size_t v11; // r8 int j; // ebx __int64 v13; // rcx __int64 v14; // rax cocos2d::CCString *v15; // rax const char *v16; // rax size_t v17; // r8 __int128 *v18; // rdx size_t v19; // r8 void *v20; // rcx __int64 v21; // rcx __int64 v22; // rax cocos2d::CCString *v23; // rax const char *v24; // rax size_t v25; // r8 __int128 *v26; // rdx size_t v27; // r8 void *v28; // rcx cocos2d::CCArray *v29; // rsi unsigned int k; // ebx cocos2d::CCString *v31; // rax unsigned int v32; // edi __int64 v33; // rcx __int64 SavedLevel; // rax cocos2d::CCString *v35; // rax const char *v36; // rax size_t v37; // r8 __int128 *v38; // rdx size_t v39; // r8 cocos2d::CCArray *v40; // rsi unsigned int m; // ebx cocos2d::CCString *v42; // rax unsigned int v43; // edi __int64 v44; // rcx __int64 SavedGauntletLevel; // rax cocos2d::CCString *v46; // rax const char *v47; // rax size_t v48; // r8 __int128 *v49; // rdx size_t v50; // r8 cocos2d::CCArray *v51; // rsi unsigned int n; // edi cocos2d::CCString *v53; // rax unsigned int v54; // ebx __int64 v55; // rcx __int64 SavedDailyLevel; // rax cocos2d::CCString *v57; // rax const char *v58; // rax size_t v59; // r8 __int128 *v60; // rdx size_t v61; // r8 __int128 *v62; // rdx size_t v63; // r8 void *v65; // [rsp+38h] [rbp-19h] void *v66; // [rsp+38h] [rbp-19h] void *v67; // [rsp+38h] [rbp-19h] void *v68; // [rsp+38h] [rbp-19h] void *v69; // [rsp+38h] [rbp-19h] void *v70; // [rsp+38h] [rbp-19h] __int128 v71; // [rsp+40h] [rbp-11h] BYREF __int64 v72; // [rsp+50h] [rbp-1h] unsigned __int64 v73; // [rsp+58h] [rbp+7h] __int128 v74; // [rsp+60h] [rbp+Fh] BYREF __int64 v75; // [rsp+70h] [rbp+1Fh] unsigned __int64 v76; // [rsp+78h] [rbp+27h] v2 = 0.0; v3 = 1; for ( i = 1; i <= 22; ++i ) { v5 = *(_QWORD *)&qword_14090BFB0; if ( !*(_QWORD *)&qword_14090BFB0 ) { v65 = operator new(0x690u); *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v65); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0); v5 = *(_QWORD *)&qword_14090BFB0; } MainLevel = GameLevelManager::getMainLevel(v5, i, 1u); if ( MainLevel ) { v2 = v2 + (float)(int)GameStatsManager::getAwardedCurrencyForLevel( (_QWORD *)a1, MainLevel, *(_DWORD *)(MainLevel + 992) - *(_DWORD *)(MainLevel + 996)); } else { v7 = cocos2d::CCString::createWithFormat( (const char *)&word_1406ED6F8, (unsigned int)(MEMORY[0x148] - MEMORY[0x14C])); CString = cocos2d::CCString::getCString(v7); v71 = 0; v72 = 0; v73 = 0; v9 = -1; do ++v9; while ( CString[v9] ); sub_14003D230(&v71, CString, v9); v10 = &v71; if ( v73 > 0xF ) v10 = (__int128 *)v71; v74 = 0; v75 = 0; v76 = 0; v11 = -1; do ++v11; while ( *((_BYTE *)v10 + v11) ); sub_14003D230(&v74, v10, v11); cocos2d::CCDictionary::removeObjectForKey(*(_QWORD *)(a1 + 752), &v74); sub_14003D310((__int64)&v74); sub_14003D310((__int64)&v71); } } for ( j = 1; j <= 4; ++j ) { v13 = *(_QWORD *)&qword_14090BFB0; if ( !*(_QWORD *)&qword_14090BFB0 ) { v66 = operator new(0x690u); *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v66); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0); v13 = *(_QWORD *)&qword_14090BFB0; } v14 = GameLevelManager::getMainLevel(v13, j + 5000, 1u); if ( v14 ) { v2 = v2 + (float)(int)GameStatsManager::getAwardedCurrencyForLevel( (_QWORD *)a1, v14, *(_DWORD *)(v14 + 992) - *(_DWORD *)(v14 + 996)); } else { v15 = cocos2d::CCString::createWithFormat( (const char *)&word_1406ED6F8, (unsigned int)(MEMORY[0x148] - MEMORY[0x14C])); v16 = cocos2d::CCString::getCString(v15); v71 = 0; v72 = 0; v73 = 0; v17 = -1; do ++v17; while ( v16[v17] ); sub_14003D230(&v71, v16, v17); v18 = &v71; if ( v73 > 0xF ) v18 = (__int128 *)v71; v74 = 0; v75 = 0; v76 = 0; v19 = -1; do ++v19; while ( *((_BYTE *)v18 + v19) ); sub_14003D230(&v74, v18, v19); cocos2d::CCDictionary::removeObjectForKey(*(_QWORD *)(a1 + 752), &v74); if ( v76 > 0xF ) { v20 = (void *)v74; if ( v76 + 1 >= 0x1000 ) { v20 = *(void **)(v74 - 8); if ( (unsigned __int64)(v74 - (_QWORD)v20 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v20); } sub_14003D310((__int64)&v71); } } do { v21 = *(_QWORD *)&qword_14090BFB0; if ( !*(_QWORD *)&qword_14090BFB0 ) { v67 = operator new(0x690u); *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v67); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0); v21 = *(_QWORD *)&qword_14090BFB0; } v22 = GameLevelManager::getMainLevel(v21, v3 + 2000, 1u); if ( v22 ) { v2 = v2 + (float)(int)GameStatsManager::getAwardedCurrencyForLevel( (_QWORD *)a1, v22, *(_DWORD *)(v22 + 992) - *(_DWORD *)(v22 + 996)); } else { v23 = cocos2d::CCString::createWithFormat( (const char *)&word_1406ED6F8, (unsigned int)(MEMORY[0x148] - MEMORY[0x14C])); v24 = cocos2d::CCString::getCString(v23); v71 = 0; v72 = 0; v73 = 0; v25 = -1; do ++v25; while ( v24[v25] ); sub_14003D230(&v71, v24, v25); v26 = &v71; if ( v73 > 0xF ) v26 = (__int128 *)v71; v74 = 0; v75 = 0; v76 = 0; v27 = -1; do ++v27; while ( *((_BYTE *)v26 + v27) ); sub_14003D230(&v74, v26, v27); cocos2d::CCDictionary::removeObjectForKey(*(_QWORD *)(a1 + 752), &v74); if ( v76 > 0xF ) { v28 = (void *)v74; if ( v76 + 1 >= 0x1000 ) { v28 = *(void **)(v74 - 8); if ( (unsigned __int64)(v74 - (_QWORD)v28 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v28); } sub_14003D310((__int64)&v71); } ++v3; } while ( v3 <= 10 ); v29 = cocos2d::CCDictionary::allKeys(*(cocos2d::CCDictionary **)(a1 + 744)); for ( k = 0; k < cocos2d::CCArray::count(v29); ++k ) { v31 = cocos2d::CCArray::stringAtIndex(v29, k); v32 = cocos2d::CCString::intValue(v31); v33 = *(_QWORD *)&qword_14090BFB0; if ( !*(_QWORD *)&qword_14090BFB0 ) { v68 = operator new(0x690u); *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v68); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0); v33 = *(_QWORD *)&qword_14090BFB0; } SavedLevel = GameLevelManager::getSavedLevel(v33); if ( SavedLevel ) { v2 = v2 + (float)(int)GameStatsManager::getAwardedCurrencyForLevel( (_QWORD *)a1, SavedLevel, *(_DWORD *)(SavedLevel + 992) - *(_DWORD *)(SavedLevel + 996)); } else { v35 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v32); v36 = cocos2d::CCString::getCString(v35); v71 = 0; v72 = 0; v73 = 0; v37 = -1; do ++v37; while ( v36[v37] ); sub_14003D230(&v71, v36, v37); v38 = &v71; if ( v73 > 0xF ) v38 = (__int128 *)v71; v74 = 0; v75 = 0; v76 = 0; v39 = -1; do ++v39; while ( *((_BYTE *)v38 + v39) ); sub_14003D230(&v74, v38, v39); cocos2d::CCDictionary::removeObjectForKey(*(_QWORD *)(a1 + 744), &v74); sub_14003D310((__int64)&v74); sub_14003D310((__int64)&v71); } } v40 = cocos2d::CCDictionary::allKeys(*(cocos2d::CCDictionary **)(a1 + 760)); for ( m = 0; m < cocos2d::CCArray::count(v40); ++m ) { v42 = cocos2d::CCArray::stringAtIndex(v40, m); v43 = cocos2d::CCString::intValue(v42); v44 = *(_QWORD *)&qword_14090BFB0; if ( !*(_QWORD *)&qword_14090BFB0 ) { v69 = operator new(0x690u); *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v69); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0); v44 = *(_QWORD *)&qword_14090BFB0; } SavedGauntletLevel = GameLevelManager::getSavedGauntletLevel(v44); if ( SavedGauntletLevel ) { v2 = v2 + (float)(int)GameStatsManager::getAwardedCurrencyForLevel( (_QWORD *)a1, SavedGauntletLevel, *(_DWORD *)(SavedGauntletLevel + 992) - *(_DWORD *)(SavedGauntletLevel + 996)); } else { v46 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v43); v47 = cocos2d::CCString::getCString(v46); v71 = 0; v72 = 0; v73 = 0; v48 = -1; do ++v48; while ( v47[v48] ); sub_14003D230(&v71, v47, v48); v49 = &v71; if ( v73 > 0xF ) v49 = (__int128 *)v71; v74 = 0; v75 = 0; v76 = 0; v50 = -1; do ++v50; while ( *((_BYTE *)v49 + v50) ); sub_14003D230(&v74, v49, v50); cocos2d::CCDictionary::removeObjectForKey(*(_QWORD *)(a1 + 760), &v74); sub_14003D310((__int64)&v74); sub_14003D310((__int64)&v71); } } v51 = cocos2d::CCDictionary::allKeys(*(cocos2d::CCDictionary **)(a1 + 768)); for ( n = 0; n < cocos2d::CCArray::count(v51); ++n ) { v53 = cocos2d::CCArray::stringAtIndex(v51, n); v54 = cocos2d::CCString::intValue(v53); v55 = *(_QWORD *)&qword_14090BFB0; if ( !*(_QWORD *)&qword_14090BFB0 ) { v70 = operator new(0x690u); *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v70); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0); v55 = *(_QWORD *)&qword_14090BFB0; } SavedDailyLevel = GameLevelManager::getSavedDailyLevel(v55); if ( SavedDailyLevel ) { v2 = v2 + (float)(int)GameStatsManager::getAwardedCurrencyForLevel( (_QWORD *)a1, SavedDailyLevel, *(_DWORD *)(SavedDailyLevel + 992) - *(_DWORD *)(SavedDailyLevel + 996)); } else { v57 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v54); v58 = cocos2d::CCString::getCString(v57); v71 = 0; v72 = 0; v73 = 0; v59 = -1; do ++v59; while ( v58[v59] ); sub_14003D230(&v71, v58, v59); v60 = &v71; if ( v73 > 0xF ) v60 = (__int128 *)v71; v74 = 0; v75 = 0; v76 = 0; v61 = -1; do ++v61; while ( *((_BYTE *)v60 + v61) ); sub_14003D230(&v74, v60, v61); cocos2d::CCDictionary::removeObjectForKey(*(_QWORD *)(a1 + 768), &v74); sub_14003D310((__int64)&v74); v62 = &v71; if ( v73 > 0xF ) v62 = (__int128 *)v71; v74 = 0; v75 = 0; v76 = 0; v63 = -1; do ++v63; while ( *((_BYTE *)v62 + v63) ); sub_14003D230(&v74, v62, v63); cocos2d::CCDictionary::removeObjectForKey(*(_QWORD *)(a1 + 784), &v74); sub_14003D310((__int64)&v74); sub_14003D310((__int64)&v71); } } return (unsigned int)(int)v2; }
GD Web Decomp Icon

GD Web Decomp

Raw Source