re_match: byte-match functions with the game's compiler (Visual C++ 2003)
Runs R:/Workspace/Tools/re/match71.py for up to 50 addresses from main or an agent's worktree; configured by matcher/match_flags in [reverse].
This commit is contained in:
1 parent
584fabeb74
commit
c7e678eacb
5 files changed
+78
-3
No files matched your search
@@ -503,6 +503,21 @@ def _gh(fn):
|
||||
raise ToolError(str(error)) from None
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def re_match(targets: str, decomp: str | None = None) -> dict:
|
||||
"""Compile functions with the game's own compiler (Visual C++ 2003, cl 13.10) and compare them with the
|
||||
original bytes. targets: up to 50 addresses, e.g. '0x412F70, 0x4ADC70'; decomp: your worktree (default main).
|
||||
status 'match' means byte-identical apart from linker-filled addresses; 'arguments in registers' means the
|
||||
game passed them in registers (link-time code generation) and the rest is identical. similarity (0-1)
|
||||
compares instructions, so you can see whether a rewrite moved closer. Matching is a bonus, not a gate:
|
||||
readable, correct C comes first."""
|
||||
try:
|
||||
from .reverse import match_functions
|
||||
return match_functions(harbor().project.reverse, targets, decomp)
|
||||
except (HarborError, projects.ProjectError) as error:
|
||||
raise ToolError(str(error)) from None
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def ghidra_tools() -> list:
|
||||
"""The tools of the team's shared Ghidra session (GhidrAssistMCP, read-only, the curated project with every
|
||||
|
||||
Reference in new issue
Block a user