// // sub_1003D2D68 from 0x1003d2d68 to 0x1003d3300 (1432 bytes) // // 1 xrefs: // > GameStatsManager::recountSpecialStats @ 0x1003d3584 // // 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 11:04:12 +0000 // __int64 __fastcall sub_1003D2D68(_QWORD *a1) { __int64 v2; // x20 float v3; // s8 __int64 v4; // x0 unsigned __int64 MainLevel; // x0 void *v6; // x0 char *CString; // x0 __int64 v8; // x22 char *v9; // x1 int v10; // w23 __int64 v11; // x20 __int64 v12; // x0 unsigned __int64 v13; // x0 void *v14; // x0 char *v15; // x0 __int64 v16; // x22 char *v17; // x1 __int64 v18; // x20 __int64 v19; // x0 unsigned __int64 v20; // x0 void *v21; // x0 char *v22; // x0 __int64 v23; // x22 char *v24; // x1 __int64 v25; // x20 unsigned int v26; // w21 __int64 v27; // x0 int v28; // w23 __int64 v29; // x0 unsigned __int64 SavedLevel; // x0 void *v31; // x0 char *v32; // x0 __int64 v33; // x23 char *v34; // x1 __int64 v35; // x20 unsigned int v36; // w21 __int64 v37; // x0 int v38; // w23 __int64 v39; // x0 unsigned __int64 SavedGauntletLevel; // x0 void *v41; // x0 char *v42; // x0 __int64 v43; // x23 char *v44; // x1 __int64 v45; // x20 unsigned int v46; // w21 __int64 v47; // x0 int v48; // w23 __int64 v49; // x0 unsigned __int64 SavedDailyLevel; // x0 void *v51; // x0 char *v52; // x0 __int64 v53; // x23 char *v54; // x1 __int64 v55; // x23 char *v56; // x1 void *__p[2]; // [xsp+10h] [xbp-80h] BYREF char v59; // [xsp+27h] [xbp-69h] void *v60[2]; // [xsp+28h] [xbp-68h] BYREF char v61; // [xsp+3Fh] [xbp-51h] v2 = 1; v3 = 0.0; do { v4 = GameLevelManager::sharedState(); MainLevel = GameLevelManager::getMainLevel(v4, v2, 1); if ( MainLevel ) { v3 = v3 + (float)(int)sub_1003D0638( (__int64)a1, MainLevel, *(_DWORD *)(MainLevel + 920) - *(_DWORD *)(MainLevel + 924)); } else { v6 = sub_1003065B0("%i", MEMORY[0x148] - MEMORY[0x14C]); CString = (char *)cocos2d::CCString::getCString((__int64)v6); sub_100009900(v60, CString); v8 = a1[81]; if ( v61 >= 0 ) v9 = (char *)v60; else v9 = (char *)v60[0]; sub_100009900(__p, v9); cocos2d::CCDictionary::removeObjectForKey(v8, (char *)__p); if ( v59 < 0 ) operator delete(__p[0]); if ( v61 < 0 ) operator delete(v60[0]); } v2 = (unsigned int)(v2 + 1); } while ( (_DWORD)v2 != 23 ); v10 = 4; v11 = 5001; do { v12 = GameLevelManager::sharedState(); v13 = GameLevelManager::getMainLevel(v12, v11, 1); if ( v13 ) { v3 = v3 + (float)(int)sub_1003D0638((__int64)a1, v13, *(_DWORD *)(v13 + 920) - *(_DWORD *)(v13 + 924)); } else { v14 = sub_1003065B0("%i", MEMORY[0x148] - MEMORY[0x14C]); v15 = (char *)cocos2d::CCString::getCString((__int64)v14); sub_100009900(v60, v15); v16 = a1[81]; if ( v61 >= 0 ) v17 = (char *)v60; else v17 = (char *)v60[0]; sub_100009900(__p, v17); cocos2d::CCDictionary::removeObjectForKey(v16, (char *)__p); if ( v59 < 0 ) operator delete(__p[0]); if ( v61 < 0 ) operator delete(v60[0]); } v11 = (unsigned int)(v11 + 1); --v10; } while ( v10 ); v18 = 2001; do { v19 = GameLevelManager::sharedState(); v20 = GameLevelManager::getMainLevel(v19, v18, 1); if ( v20 ) { v3 = v3 + (float)(int)sub_1003D0638((__int64)a1, v20, *(_DWORD *)(v20 + 920) - *(_DWORD *)(v20 + 924)); } else { v21 = sub_1003065B0("%i", MEMORY[0x148] - MEMORY[0x14C]); v22 = (char *)cocos2d::CCString::getCString((__int64)v21); sub_100009900(v60, v22); v23 = a1[81]; if ( v61 >= 0 ) v24 = (char *)v60; else v24 = (char *)v60[0]; sub_100009900(__p, v24); cocos2d::CCDictionary::removeObjectForKey(v23, (char *)__p); if ( v59 < 0 ) operator delete(__p[0]); if ( v61 < 0 ) operator delete(v60[0]); } v18 = (unsigned int)(v18 + 1); } while ( (_DWORD)v18 != 2011 ); v25 = cocos2d::CCDictionary::allKeys(a1[80]); if ( (unsigned int)sub_1002E757C(v25) ) { v26 = 0; do { v27 = cocos2d::CCArray::stringAtIndex(v25, v26); v28 = cocos2d::CCString::intValue(v27); v29 = GameLevelManager::sharedState(); SavedLevel = GameLevelManager::getSavedLevel(v29, v28); if ( SavedLevel ) { v3 = v3 + (float)(int)sub_1003D0638( (__int64)a1, SavedLevel, *(_DWORD *)(SavedLevel + 920) - *(_DWORD *)(SavedLevel + 924)); } else { v31 = sub_1003065B0("%i", v28); v32 = (char *)cocos2d::CCString::getCString((__int64)v31); sub_100009900(v60, v32); v33 = a1[80]; if ( v61 >= 0 ) v34 = (char *)v60; else v34 = (char *)v60[0]; sub_100009900(__p, v34); cocos2d::CCDictionary::removeObjectForKey(v33, (char *)__p); if ( v59 < 0 ) operator delete(__p[0]); if ( v61 < 0 ) operator delete(v60[0]); } ++v26; } while ( v26 < (unsigned int)sub_1002E757C(v25) ); } v35 = cocos2d::CCDictionary::allKeys(a1[82]); if ( (unsigned int)sub_1002E757C(v35) ) { v36 = 0; do { v37 = cocos2d::CCArray::stringAtIndex(v35, v36); v38 = cocos2d::CCString::intValue(v37); v39 = GameLevelManager::sharedState(); SavedGauntletLevel = GameLevelManager::getSavedGauntletLevel(v39, v38); if ( SavedGauntletLevel ) { v3 = v3 + (float)(int)sub_1003D0638( (__int64)a1, SavedGauntletLevel, *(_DWORD *)(SavedGauntletLevel + 920) - *(_DWORD *)(SavedGauntletLevel + 924)); } else { v41 = sub_1003065B0("%i", v38); v42 = (char *)cocos2d::CCString::getCString((__int64)v41); sub_100009900(v60, v42); v43 = a1[82]; if ( v61 >= 0 ) v44 = (char *)v60; else v44 = (char *)v60[0]; sub_100009900(__p, v44); cocos2d::CCDictionary::removeObjectForKey(v43, (char *)__p); if ( v59 < 0 ) operator delete(__p[0]); if ( v61 < 0 ) operator delete(v60[0]); } ++v36; } while ( v36 < (unsigned int)sub_1002E757C(v35) ); } v45 = cocos2d::CCDictionary::allKeys(a1[83]); if ( (unsigned int)sub_1002E757C(v45) ) { v46 = 0; do { v47 = cocos2d::CCArray::stringAtIndex(v45, v46); v48 = cocos2d::CCString::intValue(v47); v49 = GameLevelManager::sharedState(); SavedDailyLevel = GameLevelManager::getSavedDailyLevel(v49, v48); if ( SavedDailyLevel ) { v3 = v3 + (float)(int)sub_1003D0638( (__int64)a1, SavedDailyLevel, *(_DWORD *)(SavedDailyLevel + 920) - *(_DWORD *)(SavedDailyLevel + 924)); } else { v51 = sub_1003065B0("%i", v48); v52 = (char *)cocos2d::CCString::getCString((__int64)v51); sub_100009900(v60, v52); v53 = a1[83]; if ( v61 >= 0 ) v54 = (char *)v60; else v54 = (char *)v60[0]; sub_100009900(__p, v54); cocos2d::CCDictionary::removeObjectForKey(v53, (char *)__p); if ( v59 < 0 ) operator delete(__p[0]); v55 = a1[85]; if ( v61 >= 0 ) v56 = (char *)v60; else v56 = (char *)v60[0]; sub_100009900(__p, v56); cocos2d::CCDictionary::removeObjectForKey(v55, (char *)__p); if ( v59 < 0 ) operator delete(__p[0]); if ( v61 < 0 ) operator delete(v60[0]); } ++v46; } while ( v46 < (unsigned int)sub_1002E757C(v45) ); } return (unsigned int)(int)v3; }
GD Web Decomp Icon

GD Web Decomp

Raw Source