Jump to content


Photo

How is woldata.key and game's serial combined?


  • Please log in to reply
1 reply to this topic

#1 XJDHDR

XJDHDR

    New Conscript

  • Members
  • Pip
  • 2 posts

Posted 08 January 2019 - 08:14 AM

I just want to know how exactly the serial and woldata.key are combined together to form the encoded serial stored in the registry for RA2 (and vice versa)? I ask because I recently noticed that Emperor: Battle for Dune appears to use the same mechanism for it's serial in the registry. I also noticed there is a program available to manipulate RA2's serial here: https://files.zzattack.org/index.php?dir=ra2

I would like to try my hand at making a similar program for E:BfD.

 

Thanks for any help anyone can provide.



#2 XJDHDR

XJDHDR

    New Conscript

  • Members
  • Pip
  • 2 posts

Posted 16 January 2019 - 08:06 AM

I managed to get a bit of info by sending a PM to zzattack. He can't remember exactly how they are combined but believes that "a super simple encoding" is used and pointed me towards this source code written by @Olaf : https://github.com/OlafvdSpek/xcc/blob/master/XWIS%20Client/dlg_serials.cpp

 

Unfortunately, C++ code is a bit beyond my depth. As far as I can tell, line 70 looks like what I'm looking for but I'm still trying to decipher what exactly is going on.

serial[j] = (serial[j] + s.data()[i] + 2) % 10 + '0';

Can anyone help me figure this out? Please and thank you!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users