aboutsummaryrefslogtreecommitdiff
path: root/tools/ghidra
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-07-18 19:02:46 +0300
committerValentin Popov <valentin@popov.link>2026-07-18 19:02:46 +0300
commit35531075148e3d6ee3875510308ab30709649bb5 (patch)
treee52fd9855291f32470c71e2062b38c9be3de0428 /tools/ghidra
parent5052edbee97afd84e0b146091e8002f2a1748a85 (diff)
downloadfparkan-35531075148e3d6ee3875510308ab30709649bb5.tar.xz
fparkan-35531075148e3d6ee3875510308ab30709649bb5.zip
docs(control): recover AniMesh config provenance
Diffstat (limited to 'tools/ghidra')
-rw-r--r--tools/ghidra/ExportAniMeshControlCaller.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/ghidra/ExportAniMeshControlCaller.java b/tools/ghidra/ExportAniMeshControlCaller.java
new file mode 100644
index 0000000..083d27f
--- /dev/null
+++ b/tools/ghidra/ExportAniMeshControlCaller.java
@@ -0,0 +1,21 @@
+// Emits the function containing the observed AniMesh Control-loader sequence.
+import ghidra.app.decompiler.DecompInterface;
+import ghidra.app.script.GhidraScript;
+import ghidra.program.model.address.Address;
+import ghidra.program.model.listing.Function;
+
+public class ExportAniMeshControlCaller extends GhidraScript {
+ @Override
+ public void run() throws Exception {
+ Address address = currentProgram.getAddressFactory().getDefaultAddressSpace()
+ .getAddress(0x100032e7L);
+ Function function = currentProgram.getFunctionManager().getFunctionContaining(address);
+ println("===== AniMesh Control caller =====");
+ if (function == null) { println("missing"); return; }
+ println("entry=" + function.getEntryPoint());
+ DecompInterface decompiler = new DecompInterface();
+ decompiler.openProgram(currentProgram);
+ println(decompiler.decompileFunction(function, 60, monitor).getDecompiledFunction().getC());
+ decompiler.dispose();
+ }
+}