// // sub_9543F4 from 0x9543f4 to 0x9547a0 (940 bytes) // // 3 xrefs: // > GJRateLevelLayer::setupRateInfo @ 0x9547ec // > GJRateLevelLayer::setupRateInfo @ 0x954830 // > GJRateLevelLayer::setupRateInfo @ 0x954b20 // // 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:57:24 +0000 // cocos2d::CCArray *__fastcall sub_9543F4(unsigned __int8 *a1, const char *a2) { __int64 v4; // x0 int v5; // w19 unsigned __int8 *v6; // x27 __int64 v7; // x20 size_t v8; // x0 __int64 v9; // x27 __int64 v10; // x24 int v11; // w20 size_t v12; // x0 unsigned __int64 v13; // x25 size_t v14; // x2 unsigned __int64 v15; // x19 unsigned __int8 *v16; // x1 size_t v17; // x19 unsigned __int8 *v18; // x1 int v19; // w26 const char *v20; // x1 size_t v21; // x0 cocos2d::CCObject *v22; // x0 unsigned __int8 *v23; // x27 unsigned __int64 v24; // x28 size_t v25; // x0 unsigned __int8 *v26; // x6 unsigned __int8 *v27; // x28 unsigned __int8 *v28; // x0 int v29; // w4 const char *v30; // x1 __int64 v32; // x24 const char *v33; // x0 unsigned __int8 *v34; // x2 int v35; // w20 const char *v36; // x22 std::logic_error *exception; // x19 cocos2d::CCArray *v38; // [xsp+60h] [xbp+60h] char *v39; // [xsp+68h] [xbp+68h] __int64 v40; // [xsp+78h] [xbp+78h] BYREF __int64 v41; // [xsp+80h] [xbp+80h] void *v42; // [xsp+88h] [xbp+88h] __int64 v43[2]; // [xsp+90h] [xbp+90h] BYREF void *v44; // [xsp+A0h] [xbp+A0h] v4 = cocos2d::CCArray::create(_stack_chk_guard); v5 = *a1; v38 = (cocos2d::CCArray *)v4; if ( (v5 & 1) != 0 ) { v6 = *((unsigned __int8 **)a1 + 2); v7 = *((_QWORD *)a1 + 1); v8 = strlen(a2); if ( !v8 || !v7 || (v32 = (__int64)&v6[v7], v33 = &a2[v8], v6 == &v6[v7]) ) { v9 = -1; v10 = v7; goto LABEL_8; } } else { v11 = v5 >> 1; v12 = strlen(a2); v10 = v5 >> 1; if ( !v12 || !v11 ) { v9 = -1; goto LABEL_8; } v6 = a1 + 1; v33 = &a2[v12]; v32 = (__int64)&a1[v11 + 1]; if ( a1 + 1 == (unsigned __int8 *)v32 ) { v9 = -1; goto LABEL_58; } } v34 = v6; while ( a2 == v33 ) { LABEL_54: if ( (unsigned __int8 *)v32 == ++v34 ) { v9 = -1; goto LABEL_60; } } v35 = *v34; if ( *(unsigned __int8 *)a2 != v35 ) { v36 = a2; while ( v33 != ++v36 ) { if ( *(unsigned __int8 *)v36 == v35 ) goto LABEL_59; } goto LABEL_54; } LABEL_59: v9 = v34 - v6; LABEL_60: v11 = v5 >> 1; if ( (v5 & 1) == 0 ) { LABEL_58: v10 = v11; goto LABEL_8; } v10 = *((_QWORD *)a1 + 1); LABEL_8: v13 = 0; LABEL_9: v40 = 0; v14 = v9 - v13; v41 = 0; v42 = nullptr; if ( (v5 & 1) == 0 ) goto LABEL_29; LABEL_10: v15 = *((_QWORD *)a1 + 1); if ( v13 > v15 ) { LABEL_62: exception = (std::logic_error *)_cxa_allocate_exception(0x10u); std::logic_error::logic_error(exception, "basic_string"); *(_QWORD *)exception = off_1536D68; _cxa_throw( exception, (struct type_info *)&`typeinfo for'std::out_of_range, (void (*)(void *))std::logic_error::~logic_error); } v16 = *((unsigned __int8 **)a1 + 2); LABEL_12: v17 = v15 - v13; v18 = &v16[v13]; if ( v17 <= v14 ) v14 = v17; std::string::__init(&v40, v18, v14); v19 = v40 & 1; if ( v19 ) { if ( v13 != v10 || (v19 = 1, v41) ) { v20 = (const char *)v42; goto LABEL_18; } } else if ( v13 != v10 || (int)(unsigned __int8)v40 >> 1 ) { v20 = (char *)&v40 + 1; LABEL_18: v43[0] = 0; v43[1] = 0; v44 = nullptr; v39 = (char *)v20; v21 = strlen(v20); std::string::__init(v43, v39, v21); v22 = (cocos2d::CCObject *)cocos2d::CCString::create(v43); cocos2d::CCArray::addObject(v38, v22); if ( (v43[0] & 1) != 0 ) operator delete(v44); v19 = v40 & 1; } if ( v9 != -1 ) { v5 = *a1; v13 = v9 + 1; if ( (v5 & 1) != 0 ) { v23 = *((unsigned __int8 **)a1 + 2); v24 = *((_QWORD *)a1 + 1); } else { v23 = a1 + 1; v24 = (unsigned __int8)v5 >> 1; } v25 = strlen(a2); if ( !v25 || v13 >= v24 || (v26 = &v23[v13], v27 = &v23[v24], v28 = (unsigned __int8 *)&a2[v25], &v23[v13] == v27) ) { v9 = -1; goto LABEL_27; } while ( 1 ) { if ( a2 != (const char *)v28 ) { v29 = *v26; if ( *(unsigned __int8 *)a2 == v29 ) { LABEL_43: v9 = v26 - v23; LABEL_27: if ( !v19 ) goto LABEL_9; operator delete(v42); v5 = *a1; v40 = 0; v14 = v9 - v13; v41 = 0; v42 = nullptr; if ( (v5 & 1) != 0 ) goto LABEL_10; LABEL_29: v15 = v5 >> 1; if ( v13 > v15 ) goto LABEL_62; v16 = a1 + 1; goto LABEL_12; } v30 = a2; while ( v28 != (unsigned __int8 *)++v30 ) { if ( *(unsigned __int8 *)v30 == v29 ) goto LABEL_43; } } if ( v27 == ++v26 ) { v9 = -1; goto LABEL_27; } } } if ( v19 ) operator delete(v42); return v38; }
GD Web Decomp Icon

GD Web Decomp

Raw Source