Skip to content

ghidra-run ​

Tool scripts/ghidra-run.sh (script, Scripts). Run one of the tools/ghidra scripts on a binary in an existing, analysed Ghidra project, without analysing it again (about a minute of start-up, so batch addresses in one run).

Run it as scripts/ghidra-run.sh. Source on GitHub.

Its own help ​

This is the help text in the tool itself, as ./gameframe tool ghidra-run prints it.

text
Run one of the tools/ghidra scripts on a binary in an existing, analysed Ghidra project,
without analysing it again (about a minute of start-up, so batch addresses in one run).

  scripts/ghidra-run.sh BINARY SCRIPT OUTPUT [ARGS ...]

  scripts/ghidra-run.sh game.exe decompile analysis/notes/rng.txt 0x140001000 0x140001080
  scripts/ghidra-run.sh game.exe named     analysis/notes/random.txt Random Rand
  scripts/ghidra-run.sh game.exe refs      analysis/notes/refs.txt 0x140009000
  scripts/ghidra-run.sh game.exe vtable    analysis/notes/vt.txt Tree 0x140008000 16
  scripts/ghidra-run.sh game.exe labels    analysis/notes/labels.txt labels/names.tsv
  scripts/ghidra-run.sh game.exe callargs  analysis/notes/sounds.tsv PlaySound rng_next
  scripts/ghidra-run.sh game.bin blocks    analysis/notes/blocks.txt derived/loadmap.tsv

SCRIPT is decompile (ExportAddressBatch: also creates functions Ghidra missed, such as
callbacks reached only through tables), named (ExportNamedFunctions), refs (ExportAddressRefs:
every reference to an address, with the referring function decompiled) or vtable
(ExportVtableSlots: LABEL 0xTABLE [SLOTS] ...) or labels (ApplyLabels: name functions and
globals from a TSV, creating missing functions; it saves the project, so export again after
it with scripts/ghidra-export.sh --labels, or re-run decompile), callargs (ExportCallArgs:
every call to the named functions with the constant arguments at each call) or blocks
(AddMemoryBlocks: add raw pieces of memory from a load map; it saves the project, so
analyse again). Use --project DIR for another project. Ghidra locks a project: run one job
per project at a time.

Named by ​

Skills: re-rea, re-ghidra, re-trace.

Code: Apache 2.0. Content: CC0 1.0. No game material: bring your own copy.