Join also our Discord channel! Click here.

Warlords Battlecry 3 - File Decryption

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Post Reply
Krusty
ultra-n00b
Posts: 3
Joined: Mon Dec 14, 2020 11:53 pm
Has thanked: 3 times

Warlords Battlecry 3 - File Decryption

Post by Krusty » Wed Dec 16, 2020 4:50 pm

Heyho, im new to reverse engineering.
My question: is it possible to decrypt this file without using a disassembler on the .exe file, in a reasonable time?
(The game is Warlords Battlecry 3, and its a file that contains Unit stats)

This is the Encrypted file:
Image

heres a Decrypted version:
Image


If its possible can someone tell me how you would approach it?

User avatar
ikskoks
Moderator
Posts: 643
Joined: Thu Jul 26, 2012 5:06 pm
Location: Poland, Łódź
Has thanked: 447 times
Been thanked: 187 times
Contact:

Re: Warlords Battlecry 3 - File Decryption

Post by ikskoks » Thu Dec 17, 2020 12:36 am

There is already a tool for decrypting and editing those ARM files.
It is Dal Gurak's Unit Editor which can be downloaded here https://etheria.fandom.com/wiki/Tool_Downloads

https://imgur.com/a/0UAm8oO

In my opinion you shouldn't reverse engineer file format that was
already figured out by someone else and when some tools exist,
but if you really want to know how it was done, there is no easy way for that
if encryption algorithm is custom.

You can start with analyzing main archive format http://wiki.xentax.com/index.php/Warlords_XCR
then try to figure out how game reads those ARM files inside archive and where is decryption function placed.

You can see some tutorials here viewtopic.php?f=29&t=22266


Edit: There is also Advanced ARM Editor, but it does not support encrypted files
http://www.mediafire.com/download.php?6b2n6n211h1ffok

Edit2: Here is also mirror for Unit Editor (with working mss32.dll inside)
http://www.mediafire.com/?ia8km28yinc1j1h

Krusty
ultra-n00b
Posts: 3
Joined: Mon Dec 14, 2020 11:53 pm
Has thanked: 3 times

Re: Warlords Battlecry 3 - File Decryption

Post by Krusty » Fri Dec 18, 2020 12:45 am

Thanks for the reply.
Im aware that there is a tool for this kind of file already, i just wanted to to try it out for educational purpose, since i have never done anything like this before :)

I will make sure to check out the tutorials and hopefully learn more about it.

User avatar
ikskoks
Moderator
Posts: 643
Joined: Thu Jul 26, 2012 5:06 pm
Location: Poland, Łódź
Has thanked: 447 times
Been thanked: 187 times
Contact:

Re: Warlords Battlecry 3 - File Decryption

Post by ikskoks » Fri Dec 18, 2020 3:42 pm

I have created documentation for this file format and also for decryption method which I was able to implement in Python
http://wiki.xentax.com/index.php/Warlor ... tlecry_ARM
You can check it if you are still interested in this.

You can also see my tool for decryption here
https://github.com/bartlomiejduda/Tools ... _Battlecry

Krusty
ultra-n00b
Posts: 3
Joined: Mon Dec 14, 2020 11:53 pm
Has thanked: 3 times

Re: Warlords Battlecry 3 - File Decryption

Post by Krusty » Sat Dec 19, 2020 10:27 pm

thats nice
how would you get the key?
did you inspect the .exe and searched for a function that generates it or is there a different method?

User avatar
ikskoks
Moderator
Posts: 643
Joined: Thu Jul 26, 2012 5:06 pm
Location: Poland, Łódź
Has thanked: 447 times
Been thanked: 187 times
Contact:

Re: Warlords Battlecry 3 - File Decryption

Post by ikskoks » Sun Dec 20, 2020 9:09 pm

The easiest way in this case is probably load some ARM editor in IDA or in debugger like x64dbg and try to find the function for decryption. :D

But other method would be analyzing game functions and trying to hook them.
This is the standard aproach when there are no editors for file format you are analyzing.

User avatar
ikskoks
Moderator
Posts: 643
Joined: Thu Jul 26, 2012 5:06 pm
Location: Poland, Łódź
Has thanked: 447 times
Been thanked: 187 times
Contact:

Re: Warlords Battlecry 3 - File Decryption

Post by ikskoks » Sat Jan 02, 2021 6:08 pm

Btw, source code for this game is available:
Since its release, the game's source code has become available to the public. Certain members of the community have been entitled distributors, which have special legal permissions to allocate copies of the Warlords Battlecry III source code. The interested member must agree to an NDA license in order to receive the source code. The main basis of the distribution and the head of the operation was located on The Battlefield Forums

Post Reply