// // cocos2d::CCFileUtils::removeSearchPath from 0x10042af70 to 0x10042b2cc (860 bytes) // // 2 xrefs: // > @ 0x100b41e38 // > @ 0x100b93f78 // // This function is hookable on this platform (idp: pc, 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:30:19 +0000 // void __fastcall cocos2d::CCFileUtils::removeSearchPath(__int64 a1, const char *a2) { __int64 v2; // rbx size_t v3; // rax std::string::size_type v4; // r15 char *data; // r12 size_t v6; // r13 std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0 v7; // cl size_t size; // r15 unsigned int v9; // r13d size_t v10; // r14 unsigned __int64 v11; // r12 std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0 v12; // r12 std::string::value_type *v13; // rax size_t v14; // rbx bool v15; // zf std::string::value_type *v16; // r12 std::string::pointer v17; // rsi char *v18; // r12 std::string::pointer v19; // rsi std::string::size_type v20; // rcx unsigned __int8 *v21; // r13 unsigned __int8 *v22; // r12 size_t v23; // r14 std::string::pointer v24; // r15 const void *v25; // rdi unsigned int v26; // eax __int64 v27; // r15 unsigned __int8 *v28; // rbx unsigned __int8 *v29; // rax std::string v30; // [rsp+10h] [rbp-80h] BYREF std::string __src; // [rsp+30h] [rbp-60h] BYREF int v32; // [rsp+4Ch] [rbp-44h] std::string __dst[2]; // [rsp+50h] [rbp-40h] BYREF v2 = a1; memset(&__src, 0, sizeof(__src)); v3 = strlen(a2); if ( v3 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v4 = v3; if ( v3 >= 0x17 ) { v6 = 26; if ( (v3 | 7) != 0x17 ) v6 = (v3 | 7) + 1; data = (char *)operator new(v6); __dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)data; __dst[0].__r_.__value_.__r.__words[0] = v6 | 1; __dst[0].__r_.__value_.__l.__size_ = v4; goto LABEL_8; } __dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v3); data = __dst[0].__r_.__value_.__s.__data_; if ( v3 ) LABEL_8: memcpy(data, a2, v4); data[v4] = 0; if ( !(*(unsigned __int8 (__fastcall **)(__int64, std::string *))(*(_QWORD *)a1 + 168LL))(a1, __dst) ) std::string::operator=(&__src, (const std::string *)(a1 + 64)); v7 = __src.__r_.__value_.__s.0; if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) != 0 ) { size = __src.__r_.__value_.__l.__size_; v9 = (unsigned int)__dst[0].__r_.__value_.__l.0; if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) == 0 ) { LABEL_13: v10 = v9 >> 1; goto LABEL_16; } } else { size = *(_BYTE *)&__src.__r_.__value_.__l.0 >> 1; v9 = (unsigned int)__dst[0].__r_.__value_.__l.0; if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_13; } v10 = __dst[0].__r_.__value_.__l.__size_; LABEL_16: v11 = v10 + size; if ( v10 + size >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); if ( v11 > 0x16 ) { v32 = (int)__src.__r_.__value_.__l.0; v14 = 26; if ( (v11 | 7) != 0x17 ) v14 = (v11 | 7) + 1; v13 = (std::string::value_type *)operator new(v14); v30.__r_.__value_.__r.__words[0] = v14 | 1; v30.__r_.__value_.__r.__words[2] = (std::string::size_type)v13; v30.__r_.__value_.__l.__size_ = v10 + size; v12 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(v14 | 1); v2 = a1; v7 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)v32; } else { memset(&v30, 0, sizeof(v30)); v12 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v11); v30.__r_.__value_.__s.0 = v12; v13 = nullptr; } v15 = (*(_BYTE *)&v12 & 1) == 0; v16 = v30.__r_.__value_.__s.__data_; if ( !v15 ) v16 = v13; if ( size ) { if ( (*(_BYTE *)&v7 & 1) != 0 ) v17 = __src.__r_.__value_.__l.__data_; else v17 = __src.__r_.__value_.__s.__data_; memmove(v16, v17, size); } v18 = &v16[size]; if ( v10 ) { if ( (v9 & 1) != 0 ) v19 = __dst[0].__r_.__value_.__l.__data_; else v19 = __dst[0].__r_.__value_.__s.__data_; memmove(v18, v19, v10); } v18[v10] = 0; if ( (v9 & 1) != 0 ) operator delete(__dst[0].__r_.__value_.__l.__data_); __dst[0] = v30; if ( (*(_BYTE *)&v30.__r_.__value_.__s.0 & 1) != 0 ) { v20 = __dst[0].__r_.__value_.__l.__size_; if ( !__dst[0].__r_.__value_.__l.__size_ ) goto LABEL_45; } else { if ( !*(_BYTE *)&v30.__r_.__value_.__s.0 ) goto LABEL_45; v20 = *(_BYTE *)&v30.__r_.__value_.__l.0 >> 1; } if ( (*(_BYTE *)&v30.__r_.__value_.__s.0 & 1) != 0 ) { if ( *(_BYTE *)(__dst[0].__r_.__value_.__r.__words[2] + v20 - 1) == 47 ) goto LABEL_45; goto LABEL_44; } if ( *((_BYTE *)&__dst[0].__r_.__value_.__l.0 + v20) != 47 ) LABEL_44: std::string::append(__dst, "/"); LABEL_45: v21 = *(unsigned __int8 **)(v2 + 40); v22 = *(unsigned __int8 **)(v2 + 48); if ( v21 == v22 ) goto LABEL_61; v23 = *(_BYTE *)&__dst[0].__r_.__value_.__l.0 >> 1; if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 ) v23 = __dst[0].__r_.__value_.__l.__size_; v24 = __dst[0].__r_.__value_.__s.__data_; if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 ) v24 = __dst[0].__r_.__value_.__l.__data_; do { v26 = *v21; if ( (v26 & 1) != 0 ) { if ( *((_QWORD *)v21 + 1) != v23 ) goto LABEL_53; } else if ( v26 >> 1 != v23 ) { goto LABEL_53; } if ( (v26 & 1) != 0 ) v25 = *((const void **)v21 + 2); else v25 = v21 + 1; if ( !memcmp(v25, v24, v23) ) goto LABEL_61; LABEL_53: v21 += 24; } while ( v21 != v22 ); v21 = v22; LABEL_61: v27 = v2; if ( v21 + 24 == v22 ) { v28 = v21; } else { v28 = v21; do { if ( (*v28 & 1) != 0 ) operator delete(*((void **)v28 + 2)); v29 = v28; *((_QWORD *)v28 + 2) = *((_QWORD *)v28 + 5); *(_OWORD *)v28 = *(_OWORD *)(v28 + 24); *((_WORD *)v28 + 12) = 0; v28 += 24; } while ( v29 + 48 != v22 ); v22 = *(unsigned __int8 **)(v27 + 48); } while ( v22 != v28 ) { if ( (*(v22 - 24) & 1) != 0 ) operator delete(*((void **)v22 - 1)); v22 -= 24; } *(_QWORD *)(v27 + 48) = v28; if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 ) operator delete(__dst[0].__r_.__value_.__l.__data_); if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) != 0 ) operator delete(__src.__r_.__value_.__l.__data_); }
GD Web Decomp Icon

GD Web Decomp

Raw Source