Monday, May 14, 2007

Ancient Wars - Sparta

Developer: World Forge
Publisher: www.playlogicinternational.com
Official site: Ancient Wars - Sparta
Review:
Eurogamer
Screen shots:


A great new RTS from Eidos and Playlogic, where u can control three empires Sparta, Persia or Egypt. Also Ancient Wars: Sparta isn't a game based on 300 a movie. Game gfx is looks like very nice at least in demo :) So you need a tech new computer.

Minimum System Requirements

System: Intel Pentium®4 2.4 GHz or Athlon XP or equivalent
RAM: 512 MB
Video Memory: 128 MB
Hard Drive Space: 4000 MB

I've coded a tool for this game, game using a pretty tricky encryption, it takes me two days to made stable tool and properly implement decryption algorithm.
Decryption routine looks like:

// ( outbuffsize == decrypt FAT) ? position in stream : size of decompressed stream.

public static byte[] Decrypt(byte[] buff, int outbuffsize)
{
// If buffer length > 0x100 then decrypt only first 0x100 bytes.
int num = ( buff.Length > 0x100 ) ? 0x100 : buff.Length;

for (int i = 0; i < num; i++)
{
int index = ( outbuffsize + i ) % 15;
buff[i] = (byte) (buff[i] ^ m_array[index]);
}
return buff;
}

File structure is simple and looks like:
[StructLayout(LayoutKind.Sequential)]
public struct PAK
{
public int LengthFileName;
public string FileName;
public int Offset;
public int IsPacked; // 1 - true 2 - false
public int PackedSize;
public int UnpackedSize;
public int Crc; // it looks like crc but I'm not sure.
}
I hope you like it: Ancient Wars - Sparta .PAK Extractor v1.0

4 comments:

Triton said...

Thanks! :D Nice job!

Suuk said...

Well, dont works for me with Sparta.pak Sounds/Music files are corrupt/ not playable (not all wavs). But a really nice extractor for the other files. Have also looked for a option to extract the crypted pak files. Good job man :)

Termite said...

Thnx suuk I've fixed this check my new post.

Anonymous said...

Arithmetic operation resulted in an overflow.This error message is for version 1.0 and 1.1