Software Cracking with dotPeek

by redstarx

I'm going to give an intro to peeking at other people's code.

For this example, I'll be using JetBrain's dotPeek 1.5 to get access to 5 Lives Studio's Satellite Reign pre-order Backer Skins downloadable content (DLC).

Satellite Reign is a cyberpunk tactical strategy game that came out in August of 2015.  It was kickstarted and backers got access to special content that was never released to people who bought it at release.  I'm going to show you how to access that content.

The first thing you'll need is the dotPeek 1.5 decompiler software.  You'll also need a copy of Satellite Reign.  If you bought it on Steam, it will install in:

C:\Program Files (x86)\Steam\steamapps\common\SatelliteReign

First, you need to know a bit about what you're decompiling: Satellite Reign was created in the Unity game engine and its source code was created using the .NET framework.  Drag any of the DLL files in your game installation into your dotPeek window and you can view their source code.  You could have lots of fun looking at the source and figuring out the rest by yourself probably, but to save time I'll tell you which DLL holds the DLC check code.

The code you are looking for is in:

C:\Program Files (x86)\Steam\steamapps\common\SatelliteReign\SatelliteReignWindows_Data\Managed\Assemnbly-CSharp.dll

We're looking for DLC called the Backer Skins, so let's try putting "skins" into the search bar.  Wow, so easy!  We immediately find a boolean called:

BackerSkinsAvailable():bool

A boolean is a true or false, so we know this is probably what we're looking for.  If we right-click on BackerSkinAvailable() and hit "Go To Declaration" we find this code hidden with a bunch of other gems.

public bool BackerSkinsAvailable()
{
   if (this.m_BackerSkin)
      return true;
   if ((UnityEngine.Object) DebugOptions.Get() != (UnityEngine.Object) null)
      return DebugOptions.Get().m_BackerOutfitsAvailable;
      return false;
}

Keep in mind we want BackerSkinsAvailable() to equal true, so we need to find out what makes m_BackerSkin true.  If you search in turn for m_BackerSkin you will find this code in the initial startup code:

if (File.Exists("BackerSkin.dat"))
   this.m_BackerSkin = true;

Stop and think about this for a second; if file BackerSkin.dat exists, then the Backer Skins are unlocked.  What has to be in BackerSkin.dat?  It doesn't matter - the code just checks to see if it's there.  So just make an empty file in:

C:\Program Files (x86)\Steam\steamapps\common\SatelliteReign

named BackerSkin.dat and you're good to go!

You can poke around the code like this in your video games and try all types of things to get better enjoyment out of them, like reactivating cut features such as drivable cars and creating enemy agents.

Have fun!

Return to $2600 Index