Ghidra 12.2 project and full dump of isaac-ng.exe v1.9.7.17, query scripts, notes indexed by entity, anm2/rooms reimplementations, and db/ (names + fields) that build.sh re-applies. Fixes awk numeric address comparison in find.sh/decompile.sh. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
16 lines
642 B
Java
16 lines
642 B
Java
// Args: address count outfile. Prints instructions starting at address.
|
|
import ghidra.app.script.GhidraScript;
|
|
import ghidra.program.model.listing.*;
|
|
import java.io.*;
|
|
public class Disasm extends GhidraScript {
|
|
public void run() throws Exception {
|
|
String[] a = getScriptArgs();
|
|
try (PrintWriter o = new PrintWriter(a[2])) {
|
|
Instruction in = getInstructionAt(toAddr(a[0]));
|
|
if (in == null) in = getInstructionAfter(toAddr(a[0]));
|
|
for (int i = 0; in != null && i < Integer.parseInt(a[1]); i++, in = in.getNext())
|
|
o.println(in.getAddress() + " " + in);
|
|
}
|
|
}
|
|
}
|