Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from core import PLATFORM
- from memory import Convention, DataType, find_binary
- from memory.hooks import PreHook
- if PLATFORM == "windows":
- READ_PRESERVE_ENT_IDENTIFIER = b"\x55\x8B\xEC\x56\x8B\x75\x08\x57\x8B\xF9\x8B\xCE\xE8\x2A\x2A\x2A\x2A"
- else:
- READ_PRESERVE_ENT_IDENTIFIER = b"\x55\x89\xE5\x57\x56\x53\x83\xEC\x2C\x8B\x5D\x0C\x81\x7B\x10\xFF\x07\x00\x00"
- engine_bin = find_binary('engine', srv_check=False)
- read_preserve_ent = engine_bin[READ_PRESERVE_ENT_IDENTIFIER].make_function(
- Convention.THISCALL,
- [DataType.POINTER, DataType.POINTER],
- DataType.VOID
- )
- @PreHook(read_preserve_ent)
- def pre_read_preserve_ent(args):
- print("Hooked into ReadPreserveEnt!")
- args[1].set_int(0, offset=0x10)
- print("...")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement