// // cocos2d::ZipUtils::decompressString from 0x10023db3c to 0x10023dd48 (524 bytes) // // 6 xrefs: // > GameLevelManager::onGetLevelSaveDataCompleted @ 0x10008edc8 // > PlayLayer::init @ 0x100115df8 // > GManager::loadFromCompressedString @ 0x10024a878 // > LevelEditorLayer::init @ 0x100357474 // > GJAccountManager::onSyncAccountCompleted @ 0x10039f9dc // > GJAccountManager::onSyncAccountCompleted @ 0x10039fac8 // // 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 // void __usercall cocos2d::ZipUtils::decompressString(void **a1@, int a2@, char a3@, std::string *a4@) { void **v5; // x20 int v7; // w9 std::string::size_type v8; // x10 std::string::size_type v9; // x8 std::string::size_type v10; // x22 __int64 v11; // x8 _BYTE *v12; // x10 std::string::value_type v13; // w10 std::string *p_p; // x11 std::string *v15; // x0 __int64 v16; // x21 int v17; // w0 void *v18; // x20 std::string __p; // [xsp+0h] [xbp-40h] BYREF void *v20; // [xsp+18h] [xbp-28h] v5 = a1; v7 = *((char *)a1 + 23); v8 = *((char *)a1 + 23); if ( v7 < 0 ) { v9 = (std::string::size_type)a1[1]; if ( (int)v9 < 1 ) { sub_1000097D0(a4, *a1, (unsigned __int64)a1[1]); return; } v20 = nullptr; if ( (a2 & 1) != 0 ) goto LABEL_7; a1 = (void **)*a1; LABEL_26: v16 = sub_100240884(a1); goto LABEL_27; } if ( !*((_BYTE *)a1 + 23) ) goto LABEL_40; v20 = nullptr; if ( !a2 ) goto LABEL_26; v9 = (std::string::size_type)a1[1]; LABEL_7: memset(&__p, 0, sizeof(__p)); if ( v7 >= 0 ) v10 = v8; else v10 = v9; std::string::resize(&__p, v10, 0); if ( v10 ) { v11 = 0; do { if ( *((char *)v5 + 23) >= 0 ) v12 = v5; else v12 = *v5; v13 = v12[v11] ^ a3; if ( (__p.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) p_p = &__p; else p_p = (std::string *)__p.__r_.__value_.__r.__words[0]; p_p->__r_.__value_.__s.__data_[v11++] = v13; } while ( v10 > (unsigned int)v11 ); } if ( (__p.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v15 = &__p; else v15 = (std::string *)__p.__r_.__value_.__r.__words[0]; v16 = sub_100240884(v15); if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__p.__r_.__value_.__l.__data_); LABEL_27: if ( (int)v16 < 1 ) { if ( v20 ) { operator delete[](v20); v20 = nullptr; } LABEL_39: if ( *((char *)v5 + 23) < 0 ) { sub_1000097D0(a4, *v5, (unsigned __int64)v5[1]); return; } LABEL_40: *(_OWORD *)&a4->__r_.__value_.__l.__data_ = *(_OWORD *)v5; a4->__r_.__value_.__r.__words[2] = (std::string::size_type)v5[2]; return; } __p.__r_.__value_.__r.__words[0] = 0; v17 = sub_10023EA54(v20, v16, &__p, 0x100000); if ( v17 < 1 ) { if ( v20 ) { operator delete[](v20); v20 = nullptr; } if ( __p.__r_.__value_.__r.__words[0] ) operator delete[](__p.__r_.__value_.__l.__data_); goto LABEL_39; } a4->__r_.__value_.__r.__words[0] = 0; a4->__r_.__value_.__l.__size_ = 0; a4->__r_.__value_.__r.__words[2] = 0; v18 = (void *)__p.__r_.__value_.__r.__words[0]; std::string::append(a4, __p.__r_.__value_.__l.__data_, (unsigned int)v17); if ( v20 ) { operator delete[](v20); v20 = nullptr; } if ( v18 ) operator delete[](v18); }
GD Web Decomp Icon

GD Web Decomp

Raw Source