Advertisement
KirillMysnik

no_maxedict_drop

May 4th, 2017
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.75 KB | None | 0 0
  1. from core import PLATFORM
  2. from memory import Convention, DataType, find_binary
  3. from memory.hooks import PreHook
  4.  
  5.  
  6. if PLATFORM == "windows":
  7.     READ_PRESERVE_ENT_IDENTIFIER = b"\x55\x8B\xEC\x56\x8B\x75\x08\x57\x8B\xF9\x8B\xCE\xE8\x2A\x2A\x2A\x2A"
  8. else:
  9.     READ_PRESERVE_ENT_IDENTIFIER = b"\x55\x89\xE5\x57\x56\x53\x83\xEC\x2C\x8B\x5D\x0C\x81\x7B\x10\xFF\x07\x00\x00"
  10.  
  11.  
  12. engine_bin = find_binary('engine', srv_check=False)
  13.  
  14.  
  15. read_preserve_ent = engine_bin[READ_PRESERVE_ENT_IDENTIFIER].make_function(
  16.     Convention.THISCALL,
  17.     [DataType.POINTER, DataType.POINTER],
  18.     DataType.VOID
  19. )
  20.  
  21.  
  22. @PreHook(read_preserve_ent)
  23. def pre_read_preserve_ent(args):
  24.     print("Hooked into ReadPreserveEnt!")
  25.     args[1].set_int(0, offset=0x10)
  26.     print("...")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement