This project can be utilized immediately using files we have already generated. However, if you wish to make modifications to the C header and symbol files, **it may be necessary to refresh the generated files that are based on them**.
You'll need:
- Go >= 1.22
- git
- Make
- Bash shell
You can regenerate everything to include your changes with:
To make looking at the binary easier, C header files to match the original executable's memory layout are provided. They aim to be lightweight and self-contained, so that many tools can make use of them.
The format is based on the one used in the stock Ghidra script `ImportSymbolsScript.py`:
```
DataLabel 00DDAA77AA l
FunctionName 00CC00DDEE f
```
To improve the call stack view in x64dbg, you should append an `end` field to every function, with the address where this function ends and another begins (i.e. after the last instruction of the function):
The best way to know what a particular routine does is to use a debugger.
With our [x64dbg](https://x64dbg.com/) files, you can easily navigate to various functions, read the call stack, play with variables, and explore data structures.
These files are autogenerated from the C header and symbol files, using our `binana` tool written in Go. You can install it like so:
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).
To generate a C struct, open the file you’re interested in, remove the Cheat Engine loading code, and add this line at the end of the file (using `CGCorpse` as an example):
```lua
print(CGCorpse:toCStruct())
```
Then run:
```bash
lua Load_CGCorpse.lua
```
## Generating dependent structs
If you also need dependent (referenced) structs, use:
```lua
print(CGCorpse:toCStructWithDeps())
```
## Options for `toCStruct` and `toCStructWithDeps`
-`collapsePadding` — if `false`, `unk_` fields will be grouped into arrays (default: `true`)
-`flattenInheritance` — if `true`, embedded fields and parent fields will be inlined into the struct (default: `false`)