// // LevelPage::onInfo from 0x7a01e4 to 0x7a06d0 (1260 bytes) // // 2 xrefs: // > LevelSelectLayer::onInfo @ 0x7a06f4 // > @ 0xb0fa0 // // 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 LevelPage::onInfo(LevelPage *a1, cocos2d::CCObject *a2) { GJGameLevel *m_level; // x1 int v4; // w0 const char *v5; // x24 GJGameLevel *v6; // x0 unsigned int v7; // w23 unsigned int v8; // w22 unsigned int NormalPercent; // w0 cocos2d::CCString *v10; // x0 char *CString; // x0 char *v12; // x0 FLAlertLayer *v13; // x22 char *v14; // x0 char *v15; // x1 char *v16; // x0 FLAlertLayer *v17; // x22 char *v18; // x0 unsigned int *v19; // x1 int v20; // w2 FLAlertLayer *v21; // x22 char *v22; // x0 unsigned int *v23; // x1 unsigned int *v24; // x1 unsigned int *v25; // x1 int v26; // w2 unsigned int *v27; // x1 int v28; // w2 unsigned int *v29; // x1 int v30; // w2 unsigned int *v31; // x1 int v32; // w2 char *v33; // [xsp+58h] [xbp+58h] BYREF const char *v34; // [xsp+60h] [xbp+60h] BYREF m_level = a1->m_level; if ( !m_level ) return; v4 = m_level->m_levelID.random - m_level->m_levelID.seed; if ( v4 == -1 ) { sub_D153B8((int)&v33, "Roses are red\nViolets are blue\nWelcome to\n2.2"); sub_D153B8((int)&v34, v33); v21 = FLAlertLayer::create(0, (__int64)"It's a secret...", (__int64)&v34); v22 = (char *)(v34 - 24); if ( v34 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v31 = (unsigned int *)(v34 - 8); do v32 = __ldaxr(v31); while ( __stlxr(v32 - 1, v31) ); } else { v32 = *((_DWORD *)v34 - 2); *((_DWORD *)v34 - 2) = v32 - 1; } if ( v32 <= 0 ) operator delete(v22); } v21->show(v21); v15 = v33; v16 = v33 - 24; if ( v33 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v23 = (unsigned int *)(v33 - 8); do v20 = __ldaxr(v23); while ( __stlxr(v20 - 1, v23) ); goto LABEL_23; } goto LABEL_40; } } else { if ( v4 != -2 ) { sub_D18D28(&v34); v5 = v34; v6 = a1->m_level; v7 = v6->m_attempts.random - v6->m_attempts.seed; v8 = v6->m_jumps.random - v6->m_jumps.seed; NormalPercent = GJGameLevel::getNormalPercent(v6); v10 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%s\n" "Total Attempts: %i\n" "Total Jumps: %i\n" "Normal: %i%%\n" "Practice: %i%%", v5, v7, v8, NormalPercent, (unsigned int)a1->m_level->m_practicePercent); CString = (char *)cocos2d::CCString::getCString(v10); sub_D153B8((int)&v33, CString); v12 = (char *)(v34 - 24); if ( v34 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v25 = (unsigned int *)(v34 - 8); do v26 = __ldaxr(v25); while ( __stlxr(v26 - 1, v25) ); } else { v26 = *((_DWORD *)v34 - 2); *((_DWORD *)v34 - 2) = v26 - 1; } if ( v26 <= 0 ) operator delete(v12); } sub_D153B8((int)&v34, v33); v13 = FLAlertLayer::create(0, (__int64)"Level Stats", (__int64)&v34); v14 = (char *)(v34 - 24); if ( v34 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v27 = (unsigned int *)(v34 - 8); do v28 = __ldaxr(v27); while ( __stlxr(v28 - 1, v27) ); } else { v28 = *((_DWORD *)v34 - 2); *((_DWORD *)v34 - 2) = v28 - 1; } if ( v28 <= 0 ) operator delete(v14); } v13->show(v13); v15 = v33; v16 = v33 - 24; if ( v33 - 24 == (char *)&qword_124B6B0 ) return; if ( &pthread_create ) { v24 = (unsigned int *)(v33 - 8); do v20 = __ldaxr(v24); while ( __stlxr(v20 - 1, v24) ); goto LABEL_23; } LABEL_40: v20 = *((_DWORD *)v15 - 2); *((_DWORD *)v15 - 2) = v20 - 1; LABEL_23: if ( v20 <= 0 ) operator delete(v16); return; } sub_D153B8( (int)&v33, "The path leads to an old tower. It's been left alone for years, with little reason to explore."); sub_D153B8((int)&v34, v33); v17 = FLAlertLayer::create(0, (__int64)"The Tower", (__int64)&v34); v18 = (char *)(v34 - 24); if ( v34 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v29 = (unsigned int *)(v34 - 8); do v30 = __ldaxr(v29); while ( __stlxr(v30 - 1, v29) ); } else { v30 = *((_DWORD *)v34 - 2); *((_DWORD *)v34 - 2) = v30 - 1; } if ( v30 <= 0 ) operator delete(v18); } v17->show(v17); v15 = v33; v16 = v33 - 24; if ( v33 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v19 = (unsigned int *)(v33 - 8); do v20 = __ldaxr(v19); while ( __stlxr(v20 - 1, v19) ); goto LABEL_23; } goto LABEL_40; } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source