feat(patcher): add executable patching and local archive support
Keep patch definitions and dependencies separate from the patch engine. Resolve all patches before writing, verify expected bytes, and refuse to overwrite the input executable. Include a read-only check command for comparing definitions with their assembly source. Allow locally rebuilt script archives to load in the offline client. Verify the patch against the 2.61.0.37 executable and confirm that the patched copy remains readable as PE.
This commit is contained in:
1 parent
8d26ad0fbd
commit
f014f327e5
12 files changed
+701
No files matched your search
@@ -0,0 +1,22 @@
|
||||
class PatchError(Exception):
|
||||
"""A patch cannot be applied, so nothing was written."""
|
||||
|
||||
|
||||
class DefinitionError(PatchError):
|
||||
"""A patch definition on disk is malformed."""
|
||||
|
||||
|
||||
class LocateError(PatchError):
|
||||
"""A patch site could not be found, or was found in more than one place.
|
||||
|
||||
The caller reports which patches are affected and which features depend on them;
|
||||
it never falls back to a guessed address.
|
||||
"""
|
||||
|
||||
|
||||
class VerifyError(PatchError):
|
||||
"""The bytes at a located site are not what the definition expects.
|
||||
|
||||
Either the game version differs more than the signature could detect, or the
|
||||
executable is already patched.
|
||||
"""
|
||||
Reference in new issue
Block a user