// // GameLevelManager::getDifficultyStr from 0x10009ce68 to 0x10009d074 (524 bytes) // // 1 xrefs: // > LevelSearchLayer::getSearchDiffKey @ 0x100054f9c // // 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 __usercall GameLevelManager::getDifficultyStr( int a1@, int a2@, char a3@, char a4@, char a5@, char a6@, int a7@, std::string *a8@, char a9) { char *v10; // x1 int v16; // w8 int v17; // w27 int i; // w28 cocos2d::CCString *v19; // x0 const char *CString; // x0 cocos2d::CCString *v21; // x0 char *v22; // x0 _BOOL4 v23; // w20 void *__p[2]; // [xsp+10h] [xbp-80h] BYREF char v25; // [xsp+27h] [xbp-69h] std::string v26; // [xsp+28h] [xbp-68h] BYREF if ( a1 ) { v10 = "-1"; LABEL_7: sub_100009900(a8, v10); return; } if ( a7 ) { v10 = "-2"; goto LABEL_7; } if ( a9 ) { v10 = "-3"; goto LABEL_7; } sub_100009900(&v26, ""); v16 = 0; v17 = 0; for ( i = 1; i != 6; ++i ) { if ( i <= 2 ) { if ( i == 1 ) { if ( !a2 ) continue; } else if ( i != 2 || (a3 & 1) == 0 ) { continue; } } else { switch ( i ) { case 3: if ( (a4 & 1) == 0 ) continue; break; case 4: if ( (a5 & 1) == 0 ) continue; break; case 5: if ( (a6 & 1) == 0 ) goto LABEL_28; break; default: continue; } } if ( v17 >= 1 ) std::string::append(&v26, ","); v19 = (cocos2d::CCString *)sub_100268F4C("%i", i); CString = cocos2d::CCString::getCString(v19); std::string::append(&v26, CString); ++v17; v16 = i; } LABEL_28: if ( v17 == 1 ) { v21 = (cocos2d::CCString *)sub_100268F4C("%i", v16); v22 = (char *)cocos2d::CCString::getCString(v21); sub_100009900(a8, v22); } else { sub_100009900(__p, ""); v23 = sub_1000045BC(&v26, __p); if ( v25 < 0 ) operator delete(__p[0]); if ( v23 ) { sub_100009900(a8, "-"); } else { *a8 = v26; memset(&v26, 0, sizeof(v26)); } } if ( SHIBYTE(v26.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v26.__r_.__value_.__l.__data_); }
GD Web Decomp Icon

GD Web Decomp

Raw Source