// // LevelInfoLayer::onLevelInfo from 0x1002c2350 to 0x1002c2616 (710 bytes) // // 1 xrefs: // > LevelInfoLayer::init @ 0x1002beb5b // // 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 LevelInfoLayer::onLevelInfo(LevelInfoLayer *a1, cocos2d::CCObject *a2) { __int128 v2; // xmm0 GJGameLevel *m_level; // rdi bool v5; // zf cocos2d::CCString *v6; // rax const char *CString; // r14 size_t v8; // rax std::string::size_type v9; // r15 char *data; // r12 LevelInfoLayer *v11; // rbx cocos2d::CCString *v12; // rax const char *v13; // rax const char *v14; // rbx size_t v15; // r13 size_t v16; // rax size_t v17; // r14 char *v18; // r15 size_t v19; // r12 __int64 v20; // rbx char v21; // [rsp+0h] [rbp-90h] char v22; // [rsp+0h] [rbp-90h] _QWORD v23[2]; // [rsp+8h] [rbp-88h] BYREF void *v24; // [rsp+18h] [rbp-78h] __int128 v25; // [rsp+20h] [rbp-70h] BYREF void *__p; // [rsp+30h] [rbp-60h] LevelInfoLayer *v27; // [rsp+40h] [rbp-50h] std::string __dst; // [rsp+48h] [rbp-48h] BYREF char v29; // [rsp+67h] [rbp-29h] if ( a1->m_isBusy ) return; m_level = a1->m_level; v5 = (m_level->m_levelName.m_data.m_short.sizex2 & 1) == 0; v27 = a1; if ( v5 ) { __p = m_level->m_levelName.m_data.m_long.longStorage; v2 = *(_OWORD *)&m_level->m_levelName.m_data.m_short.sizex2; v25 = v2; } else { sub_100006B70( &v25, m_level->m_levelName.m_data.m_long.longStorage, m_level->m_levelName.m_data.m_long.size, *(double *)&v2); m_level = a1->m_level; } v29 = v25; GJGameLevel::getNormalPercent(m_level); v6 = (cocos2d::CCString *)sub_1007AB580( "%s\n" "Total Attempts: %i\n" "Total Jumps: %i\n" "Normal: %i%%\n" "Practice: %i%%", v21); CString = cocos2d::CCString::getCString(v6); v8 = strlen(CString); if ( v8 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(*(double *)&v2); v9 = v8; if ( v8 >= 0x17 ) { v15 = 26; if ( (v8 | 7) != 0x17 ) v15 = (v8 | 7) + 1; data = (char *)operator new(v15); __dst.__r_.__value_.__r.__words[2] = (std::string::size_type)data; __dst.__r_.__value_.__r.__words[0] = v15 | 1; __dst.__r_.__value_.__l.__size_ = v9; v11 = v27; } else { __dst.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v8); data = __dst.__r_.__value_.__s.__data_; v11 = v27; if ( !v8 ) { __dst.__r_.__value_.__s.__data_[0] = 0; if ( (v25 & 1) == 0 ) goto LABEL_10; goto LABEL_9; } } memmove(data, CString, v9); data[v9] = 0; if ( (v25 & 1) != 0 ) LABEL_9: operator delete(__p); LABEL_10: if ( GJGameLevel::getNormalPercent(v11->m_level) != v11->m_level->m_newNormalPercent2.random - v11->m_level->m_newNormalPercent2.seed ) { v12 = (cocos2d::CCString *)sub_1007AB580("\nLeaderboard: %i%%", v22); v13 = cocos2d::CCString::getCString(v12); std::string::append(&__dst, v13); } if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) != 0 ) v14 = __dst.__r_.__value_.__l.__data_; else v14 = __dst.__r_.__value_.__s.__data_; v16 = strlen(v14); if ( v16 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(*(double *)&v2); v17 = v16; if ( v16 >= 0x17 ) { v19 = 26; if ( (v16 | 7) != 0x17 ) v19 = (v16 | 7) + 1; v18 = (char *)operator new(v19); v24 = v18; v23[0] = v19 | 1; v23[1] = v17; } else { LOBYTE(v23[0]) = 2 * v16; v18 = (char *)v23 + 1; if ( !v16 ) goto LABEL_28; } memmove(v18, v14, v17); LABEL_28: v18[v17] = 0; v20 = FLAlertLayer::create_1(0, "Level Stats", v23, "OK", 0, 300.0); if ( (v23[0] & 1) != 0 ) operator delete(v24); (*(void (__fastcall **)(__int64))(*(_QWORD *)v20 + 1288LL))(v20); if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) != 0 ) operator delete(__dst.__r_.__value_.__l.__data_); }
GD Web Decomp Icon

GD Web Decomp

Raw Source