Jump to content

IE xor encryption


igi

Recommended Posts

Is the xor encryption key accurate for all IE games that use xor encryption?

 

When I extract boolean.ids from BG2 I get a 48 byte file starting 0xEF 0xBF 0xBD 0xEF. Xor these gives 0x67 0x17 0x32 0x55 which is surprisingly far away from anything resembling

5
0 FALSE
1 TRUE

 

Of this this ignores the fact that to start with I have a 48 byte file, whereas the decrypted version should be around 20 bytes...

Link to comment

DLTCEP fails to open the encrypted file (there are no errors or warnings, but the contents doesn't load into the editor window.

 

Presumably the extraction code is at fault then (though it has successfully extracted every other file correctly except these encrypted IDS files...)?

 

 

For reference the complete encrypted boolean.ids I extract is:

 


0xEF 0xBF 0xBD 0xEF 0xBF 0xBD 0xEF 0xBF0x-0xBD 0xEF 0xBF 0xBD 0xEF 0xBF 0xBD 0xEF
0xBF 0xBD 0xEF 0xBF 0xBD 0xEF 0xBF 0xBD0x-0xEF 0xBF 0xBD 0xEF 0xBF 0xBD 0xEF 0xBF
0xBD 0xEF 0xBF 0xBD 0xEF 0xBF 0xBD 0xEF0x-0xBF 0xBD 0xEF 0xBF 0xBD 0xE1 0xA9 0xBE

 

 

I've tried running the xor decryption ignoring the first two marker bytes, but I still don't get a sensible output. My current code is

 int markerLength = 2;
 for (int i = 0; i < input.Length - markerLength; i++)
 {
result[i] = (char)(input[i + markerLength] ^ xorKey[i % 64]);
 }

 

 

Someone pointing out my obvious mistakes would be really appreciated.

Link to comment

This bothered me for some time and not really important any more.

IWD2 cheat commands are obfuscated by the formula: y=x*2+8

Starting from 0x08AF630 (file offset 0x04AF630) we read:

CTRLALTDELETE
FIRSTAID
HANS
MIDAS
ADDGOLD
ADDSPELL
CHECKVAR
CREATEITEM
ENABLECHEATKEYS
EXPLOREAREA
MOVETOAREA
SETCURRENTXP
SETGLOBAL
SETCHAPTER
JEFFKATTACKS
JEFFKDEFENDS  

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...