Moshi Monsters PNG'd XML

Textures, recreate headers, conversions, algorithms and parsing of image files
oddMLan
Posts: 13
Joined: Mon Jan 19, 2015 12:29 am

Moshi Monsters PNG'd XML

Post by oddMLan »

Hi, Mind Candy (the makers behind the online game "Moshi Monsters") obfuscate/encrypt some of their assets by converting plaintext such as XML to bitmaps. Yeah, sounds a bit unusual.

Here's an example of a file that's encoded
http://c.mmcdn.net/game/season.2.7.1/1. ... _convo.xml
You can right click this link and "Save as" and rename the extention to PNG. It should look like this:
Image

Decompiling their flash game I stumbled upon the decryption algorithm (attached). Looks really intriguing. But, it's ActionScript, I suppose since it's so similar to EcmaScript it could be translated to that OR, I don't know if it could be something that could be programmed in QuickBMS. Either way, doesn't look like a trivial task to do.

Opinions? Some advice would be really appreciated. I did try to understand the algorithm a bit, looks complex to me with byteshifts and AND operators, bitmap rotations, etc. help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/operators.html
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Moshi Monsters PNG'd XML

Post by aluigi »

Linked the topic also in the graphics section to give it more visibility.
dniel888
Posts: 9
Joined: Mon Dec 22, 2014 1:04 am

Re: Moshi Monsters PNG'd XML

Post by dniel888 »

the decrypted data is in a spiral (made of pixels) starting at the center and then goes clockwise or anticlockwise, the pixel at the center holds the data for determining the byte order of the data in the pixels (RGB, BGR, etc) and the direction of the spiral (clockwise or anticlockwise) .

the decryption process needs to read the pixels, then read the pixel at the center, and after reading the spiral's direction and byte order - loop on the remaining pixels in a spiral from the center.