🍌bananary analysis 🍌
Find a file
2024-07-17 01:37:26 -04:00
3.3.5a feat(profile): binana x64dbg-gen now generates a types file from C source headers 2024-07-17 01:37:26 -04:00
ghidra chore(binana): update files 2024-07-13 17:42:21 -04:00
go feat(profile): binana x64dbg-gen now generates a types file from C source headers 2024-07-17 01:37:26 -04:00
script feat(profile): binana x64dbg-gen now generates a types file from C source headers 2024-07-17 01:37:26 -04:00
.gitattributes chore(binana): mark x32dbg databases as binary 2024-07-13 17:45:33 -04:00
.gitignore chore(binana): add files 2024-07-07 03:00:06 -04:00
go.mod feat(profile): binana x64dbg-gen now generates a types file from C source headers 2024-07-17 01:37:26 -04:00
go.sum feat(profile): binana x64dbg-gen now generates a types file from C source headers 2024-07-17 01:37:26 -04:00
README.md feat(profile): binana x64dbg-gen now generates a types file from C source headers 2024-07-17 01:37:26 -04:00

binana

This repository hosts some work related to studying the original game binaries.

You can use the information here to get a headstart when working on the Whoa project.

Header files

To make reverse engineering easier, C header files to match the original executable's memory layout are provided.

Symbol files

Symbol files are text files that map addresses to functions and variables/data labels.

In this repo, script/compile-symbols is used to concatenate our organized symbol files into one big file (<game version>/symbol/main.sym).

To refresh the gigantic main.sym file after changing one of the source symbol files:

script/compile-symbols <game version>

Loading information into Ghidra

Importing headers

To import the main header file into your Ghidra project,

  1. go to File > Parse C Source....
  2. Select clib.prf as your parse configuration, and clear all source files and input paths.
  3. Add the header <game version>/include/main.h to the Source files to parse combo box.
  4. Add the path to <game version>/include to the Include paths combo box.
  5. press Parse to Program.

If all goes well, Data Type Manager will now contain the data structures from the headers.

Importing symbols

To import the symbol file into your Ghidra project,

  1. go to Window > Script Manager
  2. In the table view, lookup ImportSymbolsScript.py
  3. Run the script
  4. Enter the path to <game version>/symbol/main.sym

Loading information into x64dbg (x32dbg)

For ease of debugging, we provide x64dbg databases (generated by the Go tool from symbol maps), as well as x64dbg type information (generated by the same Go tool from the C headers).

Importing database

To load the database information into x64dbg:

  1. Open x96dbg.exe or x32dbg.exe directly
  2. Load your game binary
  3. Go to File > Database > Import database
  4. Navigate to /x32dbg/game.dd32`.

Importing types

To load the type information JSON file:

  1. Open the binary in x32dbg.exe
  2. in the console, type: LoadTypes <full path to local binana repository>\x32dbg\types.json