Crusader_Decomp/scripts/_tmp_apply_owner_resource_accessors.py
2026-04-09 00:32:12 +02:00

39 lines
No EOL
1.2 KiB
Python

import sys
sys.path.insert(0, r"k:\mcp\GhidraMCP")
import bridge_mcp_ghidra as bridge
updates = [
{
"address": "1430:014c",
"name": "MaterializeChecked",
"comment": (
"Owner-resource wrapper over helper vtable slot +0x0c. "
"Called by InitSlotOwnerBuffers and EnsureSlotChunkLoaded to materialize owner data "
"and assert if the first output byte is 0xff."
),
},
{
"address": "1430:0195",
"name": "QueryMaterializationSize",
"comment": (
"Owner-resource wrapper over helper vtable slot +0x04. "
"Current best read from the 1430:0000 create path is a size-query callback used ahead "
"of owner-data materialization."
),
},
]
for update in updates:
print(f"=== {update['address']} -> {update['name']} ===")
print(
bridge.set_function_class(
function_address=update["address"],
class_path="Remorse::EntityVmOwnerResource",
method_name=update["name"],
)
)
print(bridge.set_decompiler_comment(update["address"], update["comment"]))
print(bridge.get_function_by_address(update["address"]))
print()