Wednesday 22 February 2017

Several Beginnings

Hello, folks!
I'm hopefully going to be writing a whole series about reverse engineering Skyrim.  I do not pretend to be an expert on reverse engineering, or video games, or much of anything, really.  Everything I say should be taken with a whole load of salt.  Product names sometimes given.  This shouldn't be construed as a recommendation.  I understand that some people might be interested in stealing things.  I'm fairly neutral on that, but I ask you to not comment on how you've gone about doing that.  The information I give won't be terribly helpful if that is your goal, either.

To follow along, you will want a copy of Skyrim: Special Edition.  As I write, it is about 20 GBP on Steam.
You will also need a copy of IDA, the interactive disassembler.  The free version will probably work fine.  The demo version should, in theory, work, but you will be unable to save, which may be ... annoying.  .  It is rather expensive.  (FIXME: Double-check what editions/versions of IDA will actually work -- we want something that will do x86-64, plus decompiler.)

So, enough with the preliminaries.  If you simply load skyrimse.exe in IDA, you won't get very far -- the .text section, where the actual code is, is quite effectively obfuscated.  After several false starts, I realized that I shouldn't be looking for a general solution, but rather one focused on Steam... and a small amount of googling found Steamless.  I've not yet managed to pierce it's inner workings, but it appears to work quite well.  I left the plugin at "automatic", and checked all the boxes.  When loading the file in ida, select "manual load" and "load resources", and say "yes" to everything -- this will preserve as much information that we might want later as possible.

(Edited 2017-02-26 for style.)