// // GameStatsManager::completedDemonLevel from 0x10006dcf0 to 0x10006de67 (375 bytes) // // 4 xrefs: // > GameStatsManager::completedLevel @ 0x10006dc94 // > LevelInfoLayer::init @ 0x1002beb17 // > GameManager::dataLoaded @ 0x10038a0f0 // > GameLevelManager::updateLevelRewards @ 0x10052ecb3 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // void __fastcall GameStatsManager::completedDemonLevel(GameStatsManager *a1, GJGameLevel *a2) { double v2; // xmm0_8 char *v4; // rdi cocos2d::CCString *v5; // rax const char *CString; // rax cocos2d::CCString *m_trueString; // r13 size_t v8; // rax size_t v9; // r15 char *v10; // r12 size_t v11; // r13 char v12; // [rsp+0h] [rbp-60h] cocos2d::CCDictionary *m_completedLevels; // [rsp+8h] [rbp-58h] const char *__src; // [rsp+10h] [rbp-50h] cocos2d::CCString *v15; // [rsp+18h] [rbp-48h] _QWORD __dst[2]; // [rsp+20h] [rbp-40h] BYREF void *__p; // [rsp+30h] [rbp-30h] if ( GameStatsManager::hasCompletedDemonLevel(a1, a2) || a2->m_demon.random - a2->m_demon.seed != 1 ) return; if ( a2->m_dailyID.random <= a2->m_dailyID.seed ) { if ( a2->m_gauntletLevel ) v4 = "gdemon_%i"; else v4 = "demon_%i"; } else { v4 = "ddemon_%i"; } v5 = (cocos2d::CCString *)sub_1007AB580(v4, v12); CString = cocos2d::CCString::getCString(v5); m_trueString = a1->m_trueString; __src = CString; v8 = strlen(CString); if ( v8 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(v2); v9 = v8; m_completedLevels = a1->m_completedLevels; if ( v8 >= 0x17 ) { v15 = a1->m_trueString; v11 = 26; if ( (v8 | 7) != 0x17 ) v11 = (v8 | 7) + 1; v10 = (char *)operator new(v11); __p = v10; __dst[0] = v11 + 1; m_trueString = v15; __dst[1] = v9; } else { LOBYTE(__dst[0]) = 2 * v8; v10 = (char *)__dst + 1; if ( !v8 ) goto LABEL_16; } memmove(v10, __src, v9); LABEL_16: v10[v9] = 0; cocos2d::CCDictionary::setObject_1(m_completedLevels, m_trueString, __dst); if ( (__dst[0] & 1) != 0 ) operator delete(__p); if ( a2->m_stars.random - a2->m_stars.seed >= 10 ) GameStatsManager::incrementStat(a1, "5", 1); }
GD Web Decomp Icon

GD Web Decomp

Raw Source