Skip to content

Development

Alisenai edited this page Dec 13, 2020 · 25 revisions

For building, use Visual Studio Community 2019 or a compatible IDE.

All binaries are 32-bit because the game is 32 bit and also the free version of the Detours library cant do 64 bit. However, everything runs fine on a 64-bit system.

Development happens on the dev branch, beta versions get built from the beta branch, and release versions from the master branch.

Deobfuscation

Please note that no decompiled source code of the game is provided, instead, you must decompile your own copy of the game.

First of all, copy setup.bat.example to setup.bat and adjust the paths to your environment. Then, install https://github.com/djkaty/Il2CppInspector (Version 2020.2) and https://github.com/glmcdona/Process-Dump (http://split-code.com/processdump.html) and add both to your PATH or change setup.bat. Launch the game, and then run decompile.bat.

If Il2CppInspector fails to launch, delete everything in AppData\Local\Temp\.net.

Deobfuscation tips

  • Use the AUMDeobfuscator tool for automatic deobfuscation.
  • Look at the files generated by IL2CPPInspector
  • Look for unobfuscated enum entry names or function names
  • Use the dynamic_analysis.py script to generate tracing hooks for runtime observation
  • Hook multiple functions and look at the stack trace
  • Attach the debugger and explore memory

Build Options

If you want to build for a specific version of the game (each build uses different obfuscated names), append the preprocessor macro GAME_VERSION in the project configuration like this: GAME_VERSION=20209220. See the README for version numbers.

Testing

A post-build task is defined in Visual Studio, which calls the file vmupload.bat. This script copies the compiled DLL to the Steam game installation directory and pushes it to a few test VMs if you enabled this in setup.bat.

For testing, I recommend setting up a private game server using https://github.com/Impostor/Impostor or https://github.com/roobscoob/NodePolus.

Coding Style Guide

Prefer C++11 & stdlib features over legacy C, do not use C-like string handling except if required by external APIs. Use nullptr instead of NULL. Curly brackets in a new line if the code block has more than one line. Use the following naming scheme:

  • Files containing classes/structs: ClassName.cpp / StructName.h
  • Other files: other-file.h
  • Functions: CamelCase
  • Variables: lowerCamelCase
  • Classes/Structs: CamelCase
  • Enums/Defines: SCREAMING_CAMEL
  • Hooks/Trampolines: OriginalName_Hook and OriginalName_Trampoline
  • Deobfuscated classes/structs: ClassName
  • Deobfuscated class members: ClassName_MemberName
  • Deobfuscated enums/-entries: ClassName_EnumName__Enum and ClassName_EnumName__Enum_EntryName
Clone this wiki locally