// // cocos2d::CCFileUtils::getPathForFilename from 0x10043b3e0 to 0x10043b7b2 (978 bytes) // // 2 xrefs: // > @ 0x100938068 // > @ 0x100980608 // // 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 // std::string *__fastcall cocos2d::CCFileUtils::getPathForFilename( std::string *this, __int64 a2, unsigned __int8 *a3, unsigned __int8 *a4, __int64 a5, __m128 a6) { unsigned __int8 v8; // al const std::string::value_type *v9; // rsi unsigned __int8 *v10; // rdx char *v11; // r14 __int64 v12; // r15 size_t v13; // rdi size_t v14; // rcx __int64 v15; // r15 size_t v16; // r13 size_t v18; // rbx char *v19; // rax unsigned int v20; // ecx unsigned __int64 v21; // rcx unsigned __int8 *v22; // rsi size_t v23; // rdi size_t v24; // r14 char *v25; // r12 size_t v26; // rbx std::string::size_type v27; // rdx unsigned int v28; // edx std::string::size_type v29; // rdx const std::string::value_type *v30; // r14 __int64 v33; // [rsp+18h] [rbp-B8h] std::string *v35; // [rsp+30h] [rbp-A0h] unsigned __int8 *v36; // [rsp+38h] [rbp-98h] __int128 v37; // [rsp+40h] [rbp-90h] BYREF void *v38; // [rsp+50h] [rbp-80h] unsigned __int8 **v39; // [rsp+60h] [rbp-70h] void *__dst; // [rsp+68h] [rbp-68h] std::string::value_type __s[16]; // [rsp+70h] [rbp-60h] BYREF void *__p; // [rsp+80h] [rbp-50h] __int128 v43; // [rsp+90h] [rbp-40h] BYREF void *v44; // [rsp+A0h] [rbp-30h] v8 = *a3; if ( (*a3 & 1) != 0 ) { v12 = a5; v39 = (unsigned __int8 **)(a3 + 16); sub_100006B70(&v37, *((const void **)a3 + 2), *((_QWORD *)a3 + 1), *(double *)a6.i64); v8 = *a3; v10 = a3 + 1; *(_WORD *)__s = 0; v9 = &__s[1]; if ( (v8 & 1) != 0 ) { v11 = *((char **)a3 + 2); a5 = v12; v13 = *((_QWORD *)a3 + 1); goto LABEL_7; } a5 = v12; v11 = (char *)(a3 + 1); } else { v38 = *((void **)a3 + 2); a6 = *(__m128 *)a3; v37 = *(_OWORD *)a3; v39 = (unsigned __int8 **)(a3 + 16); *(_WORD *)__s = 0; v9 = &__s[1]; v10 = a3 + 1; v11 = (char *)(a3 + 1); } v13 = v8 >> 1; LABEL_7: v14 = v13 + 1; v15 = -(__int64)v13; do { if ( v14 == 1 ) goto LABEL_39; v16 = v14 - 1; ++v15; } while ( v11[v14-- - 2] != 47 ); if ( v16 ) { v35 = this; v18 = v16; if ( v13 < v16 ) v18 = v13; if ( v18 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(*(double *)a6.i64); v36 = v10; v33 = a5; if ( v18 >= 0x17 ) { v23 = 26; if ( (v18 | 7) != 0x17 ) v23 = (v18 | 7) + 1; __dst = (void *)v23; v19 = (char *)operator new(v23); v44 = v19; *(_QWORD *)&v43 = (unsigned __int64)__dst | 1; *((_QWORD *)&v43 + 1) = v18; } else { LOBYTE(v43) = 2 * v18; v19 = (char *)&v43 + 1; if ( !v13 ) { *((_BYTE *)&v43 + v18 + 1) = 0; if ( (__s[0] & 1) == 0 ) goto LABEL_18; goto LABEL_17; } } __dst = v19; memmove(v19, v11, v18); *((_BYTE *)__dst + v18) = 0; if ( (__s[0] & 1) == 0 ) { LABEL_18: __p = v44; *(_OWORD *)__s = v43; v20 = *a3; this = v35; if ( (v20 & 1) != 0 ) { v21 = *((_QWORD *)a3 + 1); if ( v21 <= v16 - 1 ) goto LABEL_56; v22 = *v39; } else { v21 = v20 >> 1; v22 = v36; if ( v16 - 1 >= v21 ) LABEL_56: sub_1000547C0(); } v24 = v21 - v16; if ( v21 - v16 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(*(double *)&v43); v39 = (unsigned __int8 **)v21; if ( v24 >= 0x17 ) { v26 = 26; if ( (v24 | 7) != 0x17 ) v26 = (v24 | 7) + 1; v25 = (char *)operator new(v26); v44 = v25; *(_QWORD *)&v43 = v26 | 1; *((_QWORD *)&v43 + 1) = v24; this = v35; } else { LOBYTE(v43) = 2 * (v21 - v16); v25 = (char *)&v43 + 1; if ( v21 == v16 ) goto LABEL_36; } memmove(v25, &v22[v16], v24); LABEL_36: *((_BYTE *)v39 + (_QWORD)v25 + v15 - 1) = 0; if ( (v37 & 1) != 0 ) operator delete(v38); v38 = v44; a6.i64[0] = v43; v37 = v43; v9 = &__s[1]; a5 = v33; goto LABEL_39; } LABEL_17: operator delete(__p); goto LABEL_18; } LABEL_39: if ( (*(_BYTE *)a5 & 1) != 0 ) { sub_100006B70(this, *(const void **)(a5 + 16), *(_QWORD *)(a5 + 8), *(double *)a6.i64); } else { this->__r_.__value_.__r.__words[2] = *(_QWORD *)(a5 + 16); *(_OWORD *)&this->__r_.__value_.__l.0 = *(_OWORD *)a5; } if ( (__s[0] & 1) != 0 ) { v9 = (const std::string::value_type *)__p; v27 = *(_QWORD *)&__s[8]; } else { v27 = (unsigned __int8)__s[0] >> 1; } std::string::append(this, v9, v27); v28 = *a4; if ( (v28 & 1) != 0 ) { v29 = *((_QWORD *)a4 + 1); v30 = *((const std::string::value_type **)a4 + 2); } else { v30 = (const std::string::value_type *)(a4 + 1); v29 = v28 >> 1; } std::string::append(this, v30, v29); (*(void (__fastcall **)(__int128 *, __int64, std::string *, __int128 *))(*(_QWORD *)a2 + 232LL))(&v43, a2, this, &v37); if ( (*(_BYTE *)&this->__r_.__value_.__s.0 & 1) != 0 ) operator delete(this->__r_.__value_.__l.__data_); this->__r_.__value_.__r.__words[2] = (std::string::size_type)v44; *(_OWORD *)&this->__r_.__value_.__l.0 = v43; if ( (__s[0] & 1) != 0 ) operator delete(__p); if ( (v37 & 1) != 0 ) operator delete(v38); return this; }
GD Web Decomp Icon

GD Web Decomp

Raw Source