// // GameStatsManager::checkCoinAchievement from 0x1401dd800 to 0x1401ddb9a (922 bytes) // // 5 xrefs: // > GameManager::dataLoaded @ 0x140188374 // > GameManager::dataLoaded @ 0x140188402 // > GameManager::dataLoaded @ 0x14018848d // > PlayLayer::levelComplete @ 0x1403a861b // > @ 0x1406cc3a8 // // 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 // // Hidden C++ exception states: #wind=7 void GameStatsManager::checkCoinAchievement(GameStatsManager *a1, GJGameLevel *a2) { int v2; // r8d int v3; // eax int v4; // ebx bool v5; // r9 GameManager *v6; // rcx int v7; // r8d const char *v8; // rdx int v9; // eax int v10; // ebx int v11; // eax int v12; // ebx int v13; // edi __int64 v14; // rbx float v15; // xmm0_4 int v16; // r8d int v17; // r8d int CollectedCoinsForLevel; // edi int v19; // edi int v20; // edi void *v21; // [rsp+48h] [rbp+10h] void *v22; // [rsp+48h] [rbp+10h] void *v23; // [rsp+48h] [rbp+10h] void *v24; // [rsp+48h] [rbp+10h] void *v25; // [rsp+48h] [rbp+10h] void *v26; // [rsp+48h] [rbp+10h] void *v27; // [rsp+48h] [rbp+10h] if ( a2->m_levelType == Main ) { v2 = a2->m_levelID.random - a2->m_levelID.seed; if ( v2 > 5001 ) { v16 = v2 - 5002; if ( v16 ) { v17 = v16 - 1; if ( v17 ) { if ( v17 != 1 ) return; CollectedCoinsForLevel = GameStatsManager::getCollectedCoinsForLevel(a1, a2); v14 = qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v25 = operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v25); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v14 = qword_1406C2ED8; } v15 = floorf((float)((float)CollectedCoinsForLevel / 3.0) * 100.0); v8 = "geometry.ach.tower04Coin"; } else { v19 = GameStatsManager::getCollectedCoinsForLevel(a1, a2); v14 = qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v26 = operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v26); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v14 = qword_1406C2ED8; } v15 = floorf((float)((float)v19 / 3.0) * 100.0); v8 = "geometry.ach.tower03Coin"; } } else { v20 = GameStatsManager::getCollectedCoinsForLevel(a1, a2); v14 = qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v27 = operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v27); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v14 = qword_1406C2ED8; } v15 = floorf((float)((float)v20 / 3.0) * 100.0); v8 = "geometry.ach.tower02Coin"; } } else { if ( v2 != 5001 ) { switch ( v2 ) { case 14: v11 = GameStatsManager::getCollectedCoinsForLevel(a1, a2); v12 = (int)fminf(100.0, floorf((float)((float)v11 / 3.0) * 100.0)); v6 = (GameManager *)qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v23 = operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v23); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v6 = (GameManager *)qword_1406C2ED8; } v7 = v12; v8 = "geometry.ach.demoncoin01"; break; case 18: v9 = GameStatsManager::getCollectedCoinsForLevel(a1, a2); v10 = (int)fminf(100.0, floorf((float)((float)v9 / 3.0) * 100.0)); v6 = (GameManager *)qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v22 = operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v22); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v6 = (GameManager *)qword_1406C2ED8; } v7 = v10; v8 = "geometry.ach.demoncoin02"; break; case 20: v3 = GameStatsManager::getCollectedCoinsForLevel(a1, a2); v4 = (int)fminf(100.0, floorf((float)((float)v3 / 3.0) * 100.0)); v6 = (GameManager *)qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v21 = operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v21); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v6 = (GameManager *)qword_1406C2ED8; } v7 = v4; v8 = "geometry.ach.demoncoin03"; break; default: return; } goto LABEL_32; } v13 = GameStatsManager::getCollectedCoinsForLevel(a1, a2); v14 = qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v24 = operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v24); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v14 = qword_1406C2ED8; } v15 = floorf((float)((float)v13 / 3.0) * 100.0); v8 = "geometry.ach.tower01Coin"; } v6 = (GameManager *)v14; v7 = (int)v15; LABEL_32: GameManager::reportAchievementWithID(v6, v8, v7, v5); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source