Plants Vs. Zombies 1 (Mobile, v2.4.60, *.CDAT, Cocos Creator DATa?)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Plants Vs. Zombies 1 (Mobile, v2.4.60, *.CDAT, Cocos Creator DATa?)

Post by LolHacksRule »

Can someone figure out these files? They appear to be made by CCreator (not sure where to find it) given by the filesystem. I think they are encrypted, given by the header of CRYPT_RES...

UPDATE: CCreator is Cocos Creator when looking at the executable code. Some are PNGs given by some leftover header data.

http://www.filedropper.com/pvzv2460cdats
LokiReborn
Posts: 190
Joined: Fri Aug 26, 2016 3:11 pm

Re: Plants Vs. Zombies 1 (Mobile, v2.4.60, *.CDAT, Cocos Creator DATa?)

Post by LokiReborn »

LolHacksRule wrote:Can someone figure out these files? They appear to be made by CCreator (not sure where to find it) given by the filesystem. I think they are encrypted, given by the header of CRYPT_RES...

UPDATE: CCreator is Cocos Creator when looking at the executable code. Some are PNGs given by some leftover header data.

http://www.filedropper.com/pvzv2460cdats


From the looks of it the cdata files are a wrapper format, in some circumstances the data isn't encrypted at the least like with default_btn_disabled.cdat for example.
I think the mobile exe would need to be examined to find what the exact usage is though and sadly that's not really my specialty I'll try to take a look though.
yingfengtingyu
Posts: 4
Joined: Thu Feb 24, 2022 4:05 am

Re: Plants Vs. Zombies 1 (Mobile, v2.4.60, *.CDAT, Cocos Creator DATa?)

Post by yingfengtingyu »

Yes, they are encrypted by xor encryption. Just first 100 bytes were encrypted by { 0x41, 0x53, 0x32, 0x33, 0x44, 0x53, 0x52, 0x45, 0x50, 0x4C, 0x4B, 0x4C, 0x33, 0x33, 0x35, 0x4B, 0x4F, 0x34, 0x34, 0x33, 0x39, 0x30, 0x33, 0x32, 0x4E, 0x38, 0x33, 0x34, 0x35, 0x4E, 0x46 }. You can see how to decrypt cdat at https://github.com/YingFengTingYu/PopStudio/