Reverse Engineering Azure Striker Gunvolt


Programming Language(s) C#
Software IDA, 010 Editor, Visual Studio

Background

Azure Striker Gunvolt is an action platformer created by Japanese game company Inti Creates and released on the Nintendo 3DS in 2014. Inti Creates was previously known for the Mega Man Zero and Mega Man ZX series of games. In many respects, Gunvolt is a spiritual successor to those games, going as far as to use the same engine.


A year after the game's release, it was ported over to the PC. This article will mostly cover this version of the game.


Audio File Format

All audio files - music, sound effects, and voice work, are stored in the sounds/ directory as a set of .isd files.

At first glance this appears to be a proprietary format. However, without needing to directly looking at the files, there is evidence to suggest otherwise.

Located in the doc/ folder is a file called "OggVorbis_COPYING". This contains licensing information for the Ogg Vorbis playback library, suggesting that Ogg files were used in some capacity.

Once looking at the .isd files through a hex editor, it becomes clear what is going on.

The isd files are actually OGG files that have been "encrypted" by XOR'ing them with a table of values.

The following psuedo code can be used to decrypt these files.

byte[] xorTable = { 0xE0, 0x00, 0xE0, 0x00, 0xA0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0xE0, 0x80, 0x40, 0x40, 0x40, 0x00 };
    for (int i = 0; i < isdData.Length; i++)
        oggData[i] = isdData[i] ^ xorTable[i % 16];