// // cocos2d::ZipUtils::decompressString2 from 0x1002da900 to 0x1002dab2c (556 bytes) // // 4 xrefs: // > sub_1000AF258 @ 0x1000af2d8 // > MusicDownloadManager::parseMusicLibrary @ 0x1001dbd24 // > sub_1001DF084 @ 0x1001df114 // > sub_1001E0638 @ 0x1001e06c4 // // 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:02:44 +0000 // void __usercall cocos2d::ZipUtils::decompressString2( std::string *__return_ptr a1@, std::string::value_type *__s@, std::string::size_type __n@, char a4@, char a5@) { int v6; // w21 unsigned __int64 size; // x21 __int64 v10; // x8 std::string *v11; // x11 std::string::value_type v12; // w11 std::string *v13; // x12 std::string *v14; // x0 __int64 v15; // x22 int v16; // w0 void *v17; // x20 std::string v18; // [xsp+8h] [xbp-58h] BYREF std::string v19; // [xsp+20h] [xbp-40h] BYREF void *v20; // [xsp+38h] [xbp-28h] if ( !__s || (v6 = __n, (int)__n <= 0) ) { sub_100009900(a1, ""); return; } v20 = nullptr; if ( (a4 & 1) != 0 ) { memset(&v19, 0, sizeof(v19)); std::string::append(&v19, __s, (unsigned int)__n); memset(&v18, 0, sizeof(v18)); if ( (v19.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) size = HIBYTE(v19.__r_.__value_.__r.__words[2]); else size = v19.__r_.__value_.__l.__size_; std::string::resize(&v18, size, 0); if ( size ) { v10 = 0; do { if ( (v19.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v11 = &v19; else v11 = (std::string *)v19.__r_.__value_.__r.__words[0]; v12 = v11->__r_.__value_.__s.__data_[v10] ^ a5; if ( (v18.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v13 = &v18; else v13 = (std::string *)v18.__r_.__value_.__r.__words[0]; v13->__r_.__value_.__s.__data_[v10++] = v12; } while ( size > (unsigned int)v10 ); } if ( (v18.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v6 = HIBYTE(v18.__r_.__value_.__r.__words[2]); else v6 = v18.__r_.__value_.__r.__words[1]; if ( (v18.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v14 = &v18; else v14 = (std::string *)v18.__r_.__value_.__r.__words[0]; v15 = sub_1002DD8F8(v14); if ( SHIBYTE(v18.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v18.__r_.__value_.__l.__data_); if ( SHIBYTE(v19.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v19.__r_.__value_.__l.__data_); } else { v15 = sub_1002DD8F8(__s); } if ( (int)v15 < 1 ) { if ( v20 ) { operator delete[](v20); v20 = nullptr; } goto LABEL_41; } v19.__r_.__value_.__r.__words[0] = 0; v16 = sub_1002DBAC8(v20, v15, &v19, 0x100000); if ( v16 < 1 ) { if ( v20 ) { operator delete[](v20); v20 = nullptr; } if ( v19.__r_.__value_.__r.__words[0] ) operator delete[](v19.__r_.__value_.__l.__data_); LABEL_41: a1->__r_.__value_.__r.__words[0] = 0; a1->__r_.__value_.__l.__size_ = 0; a1->__r_.__value_.__r.__words[2] = 0; std::string::append(a1, __s, v6); return; } a1->__r_.__value_.__r.__words[0] = 0; a1->__r_.__value_.__l.__size_ = 0; a1->__r_.__value_.__r.__words[2] = 0; v17 = (void *)v19.__r_.__value_.__r.__words[0]; std::string::append(a1, v19.__r_.__value_.__l.__data_, (unsigned int)v16); if ( v20 ) { operator delete[](v20); v20 = nullptr; } if ( v17 ) operator delete[](v17); }
GD Web Decomp Icon

GD Web Decomp

Raw Source