Skip to content

Instantly share code, notes, and snippets.

@knot126
Created July 14, 2025 04:39
Show Gist options
  • Select an option

  • Save knot126/12598e0656f7e38854721c70e865d13a to your computer and use it in GitHub Desktop.

Select an option

Save knot126/12598e0656f7e38854721c70e865d13a to your computer and use it in GitHub Desktop.

Revisions

  1. knot126 created this gist Jul 14, 2025.
    15 changes: 15 additions & 0 deletions crack_prism_launcher.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    #!/usr/bin/env python
    from pathlib import Path
    from sys import argv

    # I would rather do a symbol lookup, but this works too :P
    uncrackedbytes = bytes([0xF3, 0x0F, 0x1E, 0xFA, 0x41, 0x54, 0x4C, 0x8D, 0x67, 0x58])
    patch = b"\xb8\x01\x00\x00\x00\xc3"

    binary = Path(argv[1]).read_bytes()

    print(hex(binary.index(uncrackedbytes)))

    binary = binary.replace(uncrackedbytes, patch + (len(uncrackedbytes) - len(patch)) * b"\x00")

    Path(argv[1] + ".patched").write_bytes(binary)