Advertisement
Guest User

soft re

a guest
Dec 26th, 2020
854
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.68 KB | None | 0 0
  1. #    Name: softdenchi_remove.py
  2. #
  3. #   Usage: Drag game.exe onto softdenchi_remove.py.
  4. #          This will make a new exe in the same location as game.exe.
  5. #
  6. # Process: SoftDenchi is a DRM that requires you to run its parent program in
  7. #          the background before it will run the protected binary. The parent
  8. #          service behaves eerily similar to malware in that it is constantly
  9. #          running in the background, even when you aren't using applications
  10. #          protected by it. The parent service UCManSvc is somewhat intricate
  11. #          especially when compared to the trivial wrapper which protects the
  12. #          main program. The wrapper itself puts the protected binary data at
  13. #          the end of its own binary content. You may think that DRM wrappers
  14. #          would obfuscate or encrypt the binary data it aims to protect, but
  15. #          with SoftDenchi this is not the case. As such, the main program is
  16. #          easily extracted if you can find where it begins. This script uses
  17. #          the executable file header to find the start of the protected data
  18. #          and dumps the data to a new executable. Now we can enjoy a legally
  19. #          obtained game without needing to install an ever-present watchdog.
  20. #          
  21. # Version: Works with the latest version (5.0.5.0/May 2017) as of August 2018.
  22.  
  23. import sys
  24.  
  25. in_path = sys.argv[1]
  26. out_path = in_path[:-4] + "-nodrm.exe"
  27.  
  28. with open(in_path, "rb") as drm_file, open(out_path, "wb") as cleaned_file:
  29.     drm_data = drm_file.read()
  30.     exe_header = drm_data[:4] # 4D 5A 90 00
  31.     start_location = drm_data.find(exe_header, 1)
  32.     protected_data = drm_data[start_location:]
  33.     cleaned_file.write(protected_data)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement