// // cocos2d::ZipUtils::ccDecodeEncodedPvr from 0x5efa74 to 0x5efba0 (300 bytes) // // 2 xrefs: // > cocos2d::ZipUtils::ccInflateCCZFile @ 0x5f032a // > cocos2d::ZipUtils::ccInflateCCZFile @ 0x5f0344 // // 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 // cocos2d::ZipUtils *__fastcall cocos2d::ZipUtils::ccDecodeEncodedPvr(cocos2d::ZipUtils *this, unsigned int *a2, int a3) { unsigned int v3; // r2 unsigned int v4; // r3 char *v5; // r7 int v6; // r4 unsigned int v7; // r8 int v8; // lr int v9; // r3 cocos2d::ZipUtils *v10; // r4 int v11; // r2 if ( !cocos2d::ZipUtils::s_bEncryptionKeyIsValid ) { v3 = 0; v4 = dword_ACA8EC; do { v5 = &cocos2d::ZipUtils::s_bEncryptionKeyIsValid; v6 = 0; v3 -= 1640531527; v7 = v3 >> 2; do { v8 = ((unsigned __int8)v6++ ^ (unsigned __int8)v7) & 3; v4 = *((_DWORD *)v5 + 1) + (((v4 ^ cocos2d::ZipUtils::s_uEncryptedPvrKeyParts[v8]) + (*((_DWORD *)v5 + 2) ^ v3)) ^ (((v4 >> 5) ^ (4 * *((_DWORD *)v5 + 2))) + ((16 * v4) ^ (*((_DWORD *)v5 + 2) >> 3)))); *((_DWORD *)v5 + 1) = v4; v5 += 4; } while ( v6 != 1023 ); v4 = dword_ACA8EC + ((((4 * cocos2d::ZipUtils::s_uEncryptionKey[0]) ^ (v4 >> 5)) + (((unsigned int)cocos2d::ZipUtils::s_uEncryptionKey[0] >> 3) ^ (16 * v4))) ^ ((cocos2d::ZipUtils::s_uEncryptionKey[0] ^ v3) + (v4 ^ cocos2d::ZipUtils::s_uEncryptedPvrKeyParts[~(_BYTE)v7 & 3]))); dword_ACA8EC = v4; } while ( v3 != -1253254570 ); cocos2d::ZipUtils::s_bEncryptionKeyIsValid = 1; } v9 = 0; v10 = this; v11 = 0; while ( v9 < (int)a2 && v9 != 512 ) { ++v9; *(_DWORD *)v10 ^= cocos2d::ZipUtils::s_uEncryptionKey[v11]; v10 += 4; if ( v11 + 1 >= 1024 ) v11 = 0; else ++v11; } while ( v9 < (int)a2 ) { *((_DWORD *)this + v9) ^= cocos2d::ZipUtils::s_uEncryptionKey[v11]; v9 += 64; if ( v11 + 1 >= 1024 ) v11 = 0; else ++v11; } return this; }
GD Web Decomp Icon

GD Web Decomp

Raw Source