// // cocos2d::ZipUtils::decompressString from 0xb2a3d4 to 0xb2a5fc (552 bytes) // // 7 xrefs: // > GManager::loadFromCompressedString @ 0x588690 // > PlayLayer::init @ 0x5e6440 // > LevelEditorLayer::init @ 0x67c8e4 // > GameLevelManager::onGetLevelSaveDataCompleted @ 0x70b5d4 // > GJAccountManager::onSyncAccountCompleted @ 0x848a18 // > GJAccountManager::onSyncAccountCompleted @ 0x848b00 // > @ 0x6af98 // // 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 // _QWORD *__usercall cocos2d::ZipUtils::decompressString@( cocos2d **a1@, char a2@, char a3@, _QWORD *a4@) { cocos2d *v5; // x0 unsigned __int64 v7; // x25 unsigned __int8 **v9; // x3 int v10; // w19 int v11; // w0 unsigned int v13; // w20 __int64 v14; // x19 cocos2d *v15; // x1 char *v16; // x1 unsigned int *v17; // x0 int v18; // w2 void *p; // [xsp+60h] [xbp+60h] BYREF void *v20; // [xsp+68h] [xbp+68h] BYREF cocos2d *v21; // [xsp+70h] [xbp+70h] BYREF v5 = *a1; v7 = *((_QWORD *)v5 - 3); if ( (int)v7 <= 0 ) { LABEL_13: sub_D18D28(a4); return a4; } p = nullptr; if ( a2 ) { v21 = (cocos2d *)&byte_124B6C8; sub_D17E50(&v21, v7, 0); if ( v7 ) { v13 = 0; v14 = 0; do { v15 = v21; if ( (*((_DWORD *)v21 - 2) & 0x80000000) == 0 ) { sub_D176A8(&v21); v15 = v21; } ++v13; *((_BYTE *)v15 + v14) = a3 ^ *((_BYTE *)*a1 + v14); v14 = v13; } while ( v7 > v13 ); } v10 = base64Decode(v21, (const unsigned __int8 *)*((unsigned int *)v21 - 6), &p, 1u); v16 = (char *)v21 - 24; if ( (__int64 *)((char *)v21 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v17 = (unsigned int *)((char *)v21 - 8); do { v18 = __ldaxr(v17); v9 = (unsigned __int8 **)(unsigned int)(v18 - 1); } while ( __stlxr((unsigned int)v9, v17) ); } else { v18 = *((_DWORD *)v21 - 2); v9 = (unsigned __int8 **)(unsigned int)(v18 - 1); *((_DWORD *)v21 - 2) = (_DWORD)v9; } if ( v18 <= 0 ) operator delete(v16); } } else { v10 = base64Decode(v5, (const unsigned __int8 *)(unsigned int)v7, &p, 1u); } if ( v10 <= 0 ) { if ( p ) { operator delete[](p); p = nullptr; } goto LABEL_13; } v20 = nullptr; v11 = cocos2d::ZipUtils::ccInflateMemory((cocos2d::ZipUtils *)p, (unsigned __int8 *)(unsigned int)v10, &v20, v9); if ( v11 <= 0 ) { if ( p ) { operator delete[](p); p = nullptr; } if ( v20 ) { operator delete[](v20); v20 = nullptr; } goto LABEL_13; } v21 = (cocos2d *)&byte_124B6C8; sub_D15FD4(&v21, v20, v11); if ( p ) { operator delete[](p); p = nullptr; } if ( v20 ) operator delete[](v20); *a4 = v21; return a4; }
GD Web Decomp Icon

GD Web Decomp

Raw Source