// // GameLevelManager::verifyContainerOnlyHasLevels from 0x857e04 to 0x85841c (1560 bytes) // // 2 xrefs: // > GameLevelManager::dataLoaded @ 0x8603e4 // > @ 0xd0888 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 12:55:31 +0000 // bool __fastcall GameLevelManager::verifyContainerOnlyHasLevels(GameLevelManager *this, cocos2d::CCDictionary *a2) { __int64 v3; // x20 const void *v4; // x0 __int64 v5; // x19 size_t v6; // x0 unsigned __int8 v7; // w27 int v8; // w26 unsigned __int64 v9; // x0 unsigned __int64 v10; // x20 unsigned __int64 v11; // x25 unsigned __int64 v12; // x6 __int64 v13; // x4 __int64 v14; // x23 __int64 **v15; // x0 __int64 *v16; // x24 size_t v17; // x27 unsigned __int8 *v18; // x8 unsigned __int64 v19; // x0 char *v20; // x7 unsigned __int64 v21; // x0 void **v22; // x24 unsigned __int64 v23; // x1 float v24; // s0 void **v25; // x0 void *v26; // x20 unsigned __int64 v27; // x1 _QWORD *v28; // x19 _BOOL4 v29; // w21 _QWORD *v30; // x20 void *v31; // x0 void *v32; // x0 unsigned __int8 *v34; // x0 unsigned __int8 *v35; // x1 int v36; // t1 const void *v37; // x1 int v38; // w0 _BOOL8 v39; // x0 unsigned __int64 prime; // x23 unsigned __int64 v41; // x0 bool v42; // cf unsigned __int64 v43; // x0 unsigned __int64 v44; // x0 unsigned __int64 v45; // x1 unsigned __int64 v46; // x1 unsigned __int64 v47; // x0 unsigned __int64 v48; // x0 char *v49; // [xsp+70h] [xbp+70h] unsigned __int8 *v50; // [xsp+78h] [xbp+78h] __int64 v51; // [xsp+80h] [xbp+80h] unsigned __int64 v52; // [xsp+88h] [xbp+88h] char v53[8]; // [xsp+90h] [xbp+90h] BYREF void *v54; // [xsp+98h] [xbp+98h] BYREF unsigned __int64 v55; // [xsp+A0h] [xbp+A0h] void *v56; // [xsp+A8h] [xbp+A8h] void *v57; // [xsp+B0h] [xbp+B0h] BYREF unsigned __int64 v58; // [xsp+B8h] [xbp+B8h] void *v59; // [xsp+C0h] [xbp+C0h] BYREF unsigned __int64 v60; // [xsp+C8h] [xbp+C8h] float v61; // [xsp+D0h] [xbp+D0h] v57 = nullptr; v58 = 0; v59 = nullptr; v60 = 0; v61 = 1.0; if ( !a2 || (v3 = *((_QWORD *)a2 + 7)) == 0 ) { LABEL_95: v29 = v60 == 0; goto LABEL_35; } v4 = *(const void **)(v3 + 264); v5 = *(_QWORD *)(v3 + 288); if ( !v4 ) goto LABEL_7; LABEL_4: if ( !_dynamic_cast( v4, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject, (const struct __class_type_info *)&`typeinfo for'GJGameLevel, 0) ) { while ( 1 ) { LABEL_7: v54 = nullptr; v55 = 0; v56 = nullptr; v6 = strlen((const char *)v3); std::string::__init((__int64 *)&v54, (void *)v3, v6); v7 = (unsigned __int8)v54; v8 = (unsigned __int8)v54 & 1; if ( ((unsigned __int8)v54 & 1) != 0 ) { v9 = std::__murmur2_or_cityhash::operator()((__int64)v53, v56, v55); v10 = v58; v11 = v9; if ( !v58 ) goto LABEL_62; } else { v9 = std::__murmur2_or_cityhash::operator()( (__int64)v53, (void **)((char *)&v54 + 1), (unsigned __int8)v54 >> 1); v10 = v58; v11 = v9; if ( !v58 ) { LABEL_62: v14 = 0; goto LABEL_18; } } v12 = v10 - 1; v13 = (v10 - 1) & v10; v14 = v9 & (v10 - 1); if ( v13 ) v14 = v9 % v10; v15 = *((__int64 ***)v57 + v14); if ( v15 ) { v16 = *v15; if ( *v15 ) { v17 = v7 >> 1; v18 = (unsigned __int8 *)v56; if ( v8 ) v17 = v55; v19 = v16[1]; v20 = (char *)&v54 + 1; if ( !v13 ) { LABEL_16: v21 = v12 & v19; goto LABEL_17; } while ( 1 ) { v21 = v19 % v10; LABEL_17: if ( v14 != v21 ) break; if ( (v16[2] & 1) != 0 ) { if ( v16[3] == v17 ) { if ( v8 ) v37 = v18; else v37 = v20; if ( !v17 ) goto LABEL_23; v49 = v20; v50 = v18; v51 = v13; v52 = v12; v38 = memcmp((const void *)v16[4], v37, v17); v12 = v52; v13 = v51; v18 = v50; v20 = v49; if ( !v38 ) { if ( !v8 ) goto LABEL_5; goto LABEL_24; } } } else if ( *((_BYTE *)v16 + 16) >> 1 == v17 ) { if ( v8 ) v34 = v18; else v34 = (unsigned __int8 *)v20; if ( !v17 ) goto LABEL_23; if ( *((unsigned __int8 *)v16 + 17) == *v34 ) { v35 = (unsigned __int8 *)v16 + 18; while ( 1 ) { ++v34; if ( v35 == (unsigned __int8 *)((char *)v16 + v17 + 17) ) break; v36 = *v35++; if ( *v34 != v36 ) goto LABEL_40; } if ( !v8 ) goto LABEL_5; goto LABEL_24; } } LABEL_40: v16 = (__int64 *)*v16; if ( !v16 ) break; v19 = v16[1]; if ( !v13 ) goto LABEL_16; } } } LABEL_18: v22 = (void **)operator new(0x28u); v23 = v55; v22[2] = v54; v22[3] = (void *)v23; v22[4] = v56; v54 = nullptr; v55 = 0; v56 = nullptr; v22[1] = (void *)v11; *v22 = nullptr; v24 = (float)(v60 + 1); if ( v24 > (float)((float)v10 * v61) ) { v39 = 1; if ( v10 > 2 ) v39 = ((v10 - 1) & v10) != 0; prime = 2 * v10 + v39; v41 = vcvtps_u32_f32(v24 / v61); if ( v41 >= prime ) prime = v41; if ( prime == 1 ) goto LABEL_89; } else { if ( v10 ) goto LABEL_20; prime = 1; v48 = vcvtps_u32_f32(v24 / v61); if ( v48 ) prime = v48; if ( prime == 1 ) { LABEL_89: v10 = v58; prime = 2; v42 = v58 <= 2; if ( v58 < 2 ) goto LABEL_90; goto LABEL_71; } } if ( ((prime - 1) & prime) != 0 ) prime = std::__next_prime(prime); v10 = v58; v42 = prime >= v58; if ( prime > v58 ) { LABEL_90: std::__hash_table,std::equal_to,std::allocator>::__rehash( (__int64)&v57, prime); v10 = v58; goto LABEL_79; } LABEL_71: if ( v42 ) goto LABEL_79; if ( v10 <= 2 || (v43 = v10 - 1, ((v10 - 1) & v10) != 0) ) { v44 = std::__next_prime(vcvtps_u32_f32((float)v60 / v61)); if ( v44 < prime ) v45 = prime; else v45 = v44; if ( v10 <= v45 ) { v10 = v58; goto LABEL_79; } } else { v45 = 1LL << (64 - (unsigned __int8)__clz(vcvtps_u32_f32((float)v60 / v61) - 1)); if ( v45 < prime ) v45 = prime; if ( v45 >= v10 ) goto LABEL_80; } std::__hash_table,std::equal_to,std::allocator>::__rehash( (__int64)&v57, v45); v10 = v58; LABEL_79: v43 = v10 - 1; if ( ((v10 - 1) & v10) != 0 ) { v14 = v11 % v10; LABEL_20: v25 = *((void ***)v57 + v14); if ( !v25 ) goto LABEL_81; goto LABEL_21; } LABEL_80: v14 = v43 & v11; v25 = *((void ***)v57 + (v43 & v11)); if ( !v25 ) { LABEL_81: *v22 = v59; v59 = v22; *((_QWORD *)v57 + v14) = &v59; if ( *v22 ) { v46 = *((_QWORD *)*v22 + 1); if ( ((v10 - 1) & v10) != 0 ) v47 = v46 % v10; else v47 = (v10 - 1) & v46; *((_QWORD *)v57 + v47) = v22; } goto LABEL_22; } LABEL_21: *v22 = *v25; *v25 = v22; LABEL_22: ++v60; v8 = (unsigned __int8)v54 & 1; LABEL_23: if ( !v8 ) break; LABEL_24: operator delete(v56); if ( !v5 ) goto LABEL_25; LABEL_6: v3 = v5; v5 = *(_QWORD *)(v5 + 288); v4 = *(const void **)(v3 + 264); if ( v4 ) goto LABEL_4; } } LABEL_5: if ( v5 ) goto LABEL_6; LABEL_25: v26 = v59; if ( !v59 ) goto LABEL_95; do { while ( 1 ) { v54 = nullptr; v55 = 0; v56 = nullptr; if ( (*((_BYTE *)v26 + 16) & 1) != 0 ) { std::string::__init((__int64 *)&v54, *((void **)v26 + 4), *((_QWORD *)v26 + 3)); } else { v27 = *((_QWORD *)v26 + 3); v54 = *((void **)v26 + 2); v55 = v27; v56 = *((void **)v26 + 4); } cocos2d::CCDictionary::removeObjectForKey(a2, &v54); if ( ((unsigned __int8)v54 & 1) != 0 ) break; v26 = *(void **)v26; if ( !v26 ) goto LABEL_33; } operator delete(v56); v26 = *(void **)v26; } while ( v26 ); LABEL_33: v28 = v59; v29 = v60 == 0; if ( v59 ) { do { v30 = (_QWORD *)*v28; std::string::~string((__int64)(v28 + 2)); v31 = v28; v28 = v30; operator delete(v31); } while ( v30 ); } LABEL_35: v32 = v57; v57 = nullptr; if ( v32 ) operator delete(v32); return v29; }
GD Web Decomp Icon

GD Web Decomp

Raw Source