Skip to content

e-gleba/airstrike3d-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

192 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

AirStrike 3D Reverse Engineering

Reverse engineering the AirStrike 3D game series

gamelogo

PCGamingWiki - Original Game

๐ŸŽฎ About

My nostalgic journey into reverse engineering AirStrike 3D - the first PC game that captured my imagination as a kid. This repository contains tools and research for understanding the game's internals.

overlay preview

overlay wireframe

๐Ÿ•ต๏ธ About the Game

AirStrike 3D is a helicopter shoot-em-up series developed by DivoGames (Nizhny Novgorod, Russia) and published through Alawar Entertainment. The engine and all three franchise titles were built by a two-person team.

developers

Name Role Links
Anton Petrov Engine architect, CTO & co-founder LinkedIn
Dmitry Zakharov Co-founder โ€”

Both names are embedded as string literals ({Anton Petrov}, {Dmitry Zakharov}) in the Gulf Thunder executable's credits data. Petrov describes the engine on LinkedIn as "my first game engine featuring a custom scripting language and hardware-accelerated 3D graphics โ€” powered three titles in the Air Strike 3D franchise".

After DivoGames, Petrov became CTO at Game Insight (2012โ€“2019, Nizhny Novgorod department), then co-founded Colossi Games in Cyprus (2020โ€“present).

deaddybear โ†’ divogames

Before DivoGames was officially founded (~2004), the initial AirStrike chapters were developed under a group called Deaddybear. Community research on r/airstrike3d found that Deaddybear's earlier game Treasure Mole used a nearly identical .pak archive format โ€” confirming shared codebase ancestry. Deaddybear also released Bomberman vs Digger (2002).

franchise timeline

Year Title Engine Version
2002 AirStrike 3D: Operation W.A.T. v1.x (OpenGL, Deaddybear era)
2004 AirStrike 2 v2.06 (OpenGL 1.1, MSVC 7.0)
2005โ€“2007 AirStrike II: Gulf Thunder v2.71 (Direct3D 8, MSVC 8.0)

๐Ÿ”ฌ Engine Internals

Custom C++ engine with no third-party framework. Uses Quake-style subsystem prefixes:

Subsystem Prefix Examples
Game logic G_ G_LoadBin, G_LoadLevelList
Renderer R_ R_LoadModel, R_RegisterModel, R_RegisterShadow
Sound S_ S_Init, S_RegisterSound
Window MW_ MW_CreateWindow

graphics api evolution

Version API Compiler Compile timestamp Rich header
v2.06 (as3d2.exe) OpenGL 1.1 (opengl32.dll, glu32.dll) MSVC 7.0 (.NET 2002/2003) 2004-05-15 10:12:58 UTC โœ…
v2.71 (Gulf.exe) Direct3D 8 (d3d8.dll) MSVC 8.0 (VS2005) 2007-05-15 13:49:28 UTC โœ…

third-party libraries

  • BASS โ€” Audio library. 3D positional audio, EAX effects, MO3/tracker module playback.
  • libjpeg โ€” Copyright (C) 1996, Thomas G. Lane (found in Gulf exe strings).
  • zlib + libpng โ€” PNG texture support.
  • Custom scripting language โ€” Confirmed by Petrov on LinkedIn, no public documentation survived.

asset formats

Format Extension Description
Archives .apk Custom encrypted containers (XOR, 1024-byte key table). Not Android APK.
Models .mdl Custom 3D format with version checks (R_LoadModel: Illegal model version.)
Textures .tga Standard Targa. Organized in gfx/, menu/, tiles/ dirs.
Levels maps/levels.txt Plaintext level list (encrypted inside .apk)
Audio .mo3 Tracker modules via BASS library
Config config.ini Plaintext, stored alongside the executable

rtti / c++ details

MSVC RTTI type descriptors found in the Gulf binary (e.g. .?AVIntroPageDivoGames@@), confirming C++ with virtual inheritance and RTTI enabled. Divo Master string suggests an internal tool or debug mode.

๐Ÿ”’ ASProtect 1.0 Analysis

The v2.06 executable (as3d2.exe, 199,680 bytes) is packed with ASProtect 1.0 by Alexey Solodovnikov.

identification

Indicator Value Meaning
Entry point .data section (0x1DB3001) Packer stub, not original code
EP signature 60 E8 01 00 00 00 PUSHAD + CALL +1 โ€” textbook ASProtect 1.0
Section flags All 0xC0000040 (RWX) Packer rewrites all section attributes
.text entropy 8.00 (maximum) Fully encrypted/compressed
Visible IAT 3 imports: GetProcAddress, GetModuleHandleA, LoadLibraryA Real IAT resolved at runtime
Compression aPLib (LZ77 variant) See scripts/static_exe_unpacker.py
Hashes MD5: 1ba6f0187c43d07587e5212f1cb14190 SHA256: bc68bf37...81fb1a

how it works

  1. Section wiping โ€” Original section names erased, all flags set to 0xC0000040. Two .data stubs appended.
  2. aPLib decompression โ€” Compressed .text stored in oversized .data (VirtSize 30 MB, RawSize 4 KB).
  3. OEP byte stealing โ€” First bytes of Original Entry Point executed inside the stub before jumping to OEP+N.
  4. IAT redirection โ€” Import calls routed through ASProtect memory; executes first instructions of real API in-place, then jumps mid-body.
  5. Anti-debug โ€” IsDebuggerPresent(), RDTSC timing, SEH breakpoint detection, debugger driver CreateFile() probes.
  6. Checksums โ€” Code integrity verification to detect runtime patching.
  7. Anti-disasm โ€” Junk bytes after CALL instructions break linear-sweep disassemblers (W32DASM, SOURCER); IDA handles fine.

v2.71 โ€” no protection

Gulf Thunder ships completely unprotected: EP in .text, entropy 6.83, full IAT, developer credits and error strings plainly readable. Much better target for engine analysis.

๐Ÿ”— Related Resources

๐Ÿ”ง Tools

APK Archive Extraction

# Extract game assets from encrypted .apk archives
python extract_apk.py pak0.apk        # Extracts all files
python pack_apk.py extracted_dir/ new.apk  # Repack modified assets

mdl to obj and vice versa

python mdl_obj_converter.py some_file.mdl
python mdl_obj_converter.py some_file.obj

Save previewer (+imhex struct preview)

python decrypt_save.py decrypt game.bin -o decrypted.bin

Audio Conversion

# Convert MO3 tracker modules to standard audio
sudo dnf install libopenmpt openmpt123
openmpt123 --render file.mo3 --output file.wav

Graphics Viewing

# Best TGA texture viewer for Linux
# https://github.com/bluescan/tacentview
tacentview texture.tga

๐Ÿง Linux Compatibility

Running via Steam Proton (Fedora + AMD GPU)

# Fix OpenGL extension issues for old games
MESA_EXTENSION_MAX_YEAR=2003 %command%

Add this to the game's launch options in Steam.

๐Ÿ“‹ Technical Notes

  • Archive Format: Custom encrypted APK containers (not Android APK)
  • Executable: ASProtect v1.0 packed (detected via YARA rules)
  • Assets: TGA textures, MDL 3D models, MO3 audio modules
  • Encryption: XOR cipher with 1024-byte key table

๐Ÿš€ Quick Start

  1. Clone this repository
  2. Extract game assets: python extract_pak.py /path/to/pak0.apk
  3. Browse extracted files in the created directory
  4. Convert audio files as needed

build

  1. download llvm-mingw from https://github.com/mstorsjo/llvm-mingw/releases:
  • llvm-mingw-YYYYMMDD-ucrt-ubuntu-20.04-x86_64.tar.xz for win10+ (ucrt)
  • llvm-mingw-YYYYMMDD-msvcrt-ubuntu-20.04-x86_64.tar.xz for win7+ (legacy crt)
  1. extract to repository root in dir llvm-mingw

  2. Run

cmake --preset llvm-mingw-i686
cmake --build --preset llvm-mingw-i686

note: preset uses jobs=1 due to lld linker deadlock on parallel linking in mingw context

๐Ÿดโ€โ˜ ๏ธ Ghidra Project

๐Ÿ”’ Since the project uses ASProtect 1.0, I decided on Linux using a simple debugger to just walk until we get some kind of loop. The game seems to unpack itself creating some thread, so even the debugger detaches at some moment in ntdll magic ๐Ÿช„, so we need just to pause at any moment and get the address of the desired function (loop).

๐ŸŽฏ The next step is using x64dbg with DumpEx pluginโ€”dump with the address of main loop function. And that's all!

๐Ÿ“Š Stats:

  • ๐Ÿ“ฆ Game weights: 31.2 MB
  • ๐Ÿ” In Ghidra project I've marked some of the interesting places:
    • ๐ŸŽฎ Loading models
    • ๐Ÿ’พ Working with saves
    • ๐Ÿ”ง Core game mechanics

๐Ÿš€ Usage:

Just clone and open with Ghidraโ€”the project is ready to explore yourself!

Maybe some time someone will reverse it completely ๐Ÿ˜ ๐Ÿฆ€โšก

โš–๏ธ Legal

Educational and preservation purposes only. Respect original copyrights.

๐Ÿ“„ License

MIT - Because knowledge should be free, just like the joy of playing games.

๐Ÿ™ Acknowledgments

To that old PC that could barely run the game but somehow made it magical anyway.

About

Toolkit for AirStrike 3D game analysis and apk asset extraction/package + save file view. For educational research and game preservation.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages