Jewel Quest (cfge? jpge?)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
JeffMakesGames
Posts: 73
Joined: Fri Feb 03, 2017 8:47 pm

Jewel Quest (cfge? jpge?)

Post by JeffMakesGames »

I have no idea if these are encrypted or if they use some sort of zlib/zip thing for every image in the game/config/text/etc. or what. It's a mystery to me. Maybe someone else will have better luck.

http://www.jeffmakesgames.com/misc/board1-1.jpge
http://www.jeffmakesgames.com/misc/story.cfge
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Jewel Quest (cfge? jpge?)

Post by aluigi »

The jpge file is just XORed with the byte 0x01.

No idea what cfge should represent.
emtu
Posts: 2
Joined: Tue Jun 22, 2021 10:33 pm

Re: Jewel Quest (cfge? jpge?)

Post by emtu »

aluigi wrote:No idea what cfge should represent.

I don't know whether or not this decryption method has a name, but it uses a ton of subtraction. You have to look at each line individually (ignore all 0D 0A and 00 bytes). I can't access the linked files, but I've seen older Jewel Quest files start with FF FE. Those bytes should also be ignored.

On each line, you have to start subtracting by a certain amount.

On the 1st, 4th, 7th line and so on, you start with 0D.
On the 2nd, 5th, 8th line and so on, you start with 0E.
On the 3rd, 6th, 9th line and so on, you start with 0F.

Let's take, for example, the first line. From the first byte of that line, you subtract 0D. The amount you subtract by increase every byte, so from the second one you subtract 0E, from the third one 0F, from the fourth 10 and so on. After 24 bytes in a line, this amount resets to what it was on the first byte.

I've made a more visual explanation in this video:
https://www.youtube.com/watch?v=MO4K7st-n-c
JeffMakesGames
Posts: 73
Joined: Fri Feb 03, 2017 8:47 pm

Re: Jewel Quest (cfge? jpge?)

Post by JeffMakesGames »

Any idea why they made a txt file so complex like this?

EDIT: Also, link should be working above.
emtu
Posts: 2
Joined: Tue Jun 22, 2021 10:33 pm

Re: Jewel Quest (cfge? jpge?)

Post by emtu »

They didn't want us to mess with the files, I guess.