// // cocos2d::CCFileUtils::addSuffix from 0x1001cfad0 to 0x1001cfcb8 (488 bytes) // // 2 xrefs: // > @ 0x1008ef8f8 // > @ 0x1009203c0 // // 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 11:00:22 +0000 // __n128 __usercall cocos2d::CCFileUtils::addSuffix@(_QWORD *__s@, char *a2@, std::string *a3@) { __int64 v6; // x26 _QWORD *v7; // x27 __int64 v8; // x8 int v9; // w10 char *v10; // x22 signed __int64 v11; // x23 char *v12; // x28 int v13; // w24 void *v14; // x0 __int64 v15; // x8 char *v16; // x0 char *v17; // x25 std::string *v18; // x9 std::string::size_type size; // x1 char *v20; // x9 unsigned __int64 v21; // x8 int v22; // w10 int v23; // w10 int v24; // w9 const std::string::value_type *v25; // x1 std::string::size_type v26; // x2 __n128 result; // q0 int v28; // w9 const std::string::value_type *v29; // x2 std::string::size_type v30; // x3 std::string v31; // [xsp+0h] [xbp-70h] BYREF v6 = *((char *)__s + 23); if ( v6 < 0 ) { v7 = (_QWORD *)*__s; v8 = __s[1]; } else { v7 = __s; v8 = *((char *)__s + 23); } v9 = a2[23]; if ( v9 >= 0 ) v10 = a2; else v10 = *(char **)a2; if ( v9 >= 0 ) v11 = (unsigned __int8)a2[23]; else v11 = *((_QWORD *)a2 + 1); if ( v11 ) { if ( v8 >= v11 ) { v12 = (char *)v7 + v8; v13 = *v10; v14 = v7; do { v15 = v8 - v11; if ( v15 == -1 ) break; v16 = (char *)memchr(v14, v13, v15 + 1); if ( !v16 ) break; v17 = v16; if ( !memcmp(v16, v10, v11) ) { if ( v17 == v12 || v17 - (char *)v7 == -1 ) break; goto LABEL_53; } v14 = v17 + 1; v8 = v12 - (v17 + 1); } while ( v8 >= v11 ); } if ( (v6 & 0x80000000) != 0 ) sub_1000097D0(&v31, (void *)*__s, __s[1]); else v31 = *(std::string *)__s; v18 = &v31; if ( (v31.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL ) v18 = (std::string *)v31.__r_.__value_.__r.__words[0]; if ( (v31.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) size = SHIBYTE(v31.__r_.__value_.__r.__words[2]); else size = v31.__r_.__value_.__l.__size_; v20 = (char *)&v18[-1].__r_.__value_.__r.__words[2] + 7; v21 = size; do { if ( !v21 ) { v21 = -1; goto LABEL_31; } v22 = (unsigned __int8)v20[v21--]; } while ( v22 != 47 ); do { LABEL_31: if ( !size ) goto LABEL_36; v23 = (unsigned __int8)v20[size--]; } while ( v23 != 46 ); if ( size == -1 || v21 != -1 && size <= v21 ) { LABEL_36: v24 = a2[23]; if ( v24 >= 0 ) v25 = a2; else v25 = *(const std::string::value_type **)a2; if ( v24 >= 0 ) v26 = (unsigned __int8)a2[23]; else v26 = *((_QWORD *)a2 + 1); std::string::append(&v31, v25, v26); goto LABEL_43; } v28 = a2[23]; if ( v28 >= 0 ) v29 = a2; else v29 = *(const std::string::value_type **)a2; if ( v28 >= 0 ) v30 = (unsigned __int8)a2[23]; else v30 = *((_QWORD *)a2 + 1); std::string::insert(&v31, size, v29, v30); LABEL_43: result.n128_u64[0] = v31.__r_.__value_.__r.__words[0]; *a3 = v31; } else { LABEL_53: result = *(__n128 *)__s; *(_OWORD *)&a3->__r_.__value_.__l.__data_ = *(_OWORD *)__s; a3->__r_.__value_.__r.__words[2] = __s[2]; __s[1] = 0; __s[2] = 0; *__s = 0; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source