Skip to content

Instantly share code, notes, and snippets.

@Fadi002
Created May 23, 2025 22:20
Show Gist options
  • Select an option

  • Save Fadi002/51a505cece648915bc2f32f3b7e6b71d to your computer and use it in GitHub Desktop.

Select an option

Save Fadi002/51a505cece648915bc2f32f3b7e6b71d to your computer and use it in GitHub Desktop.
Crack Sublime Text 4.2.0.0 Build 4200 [latest version]
import sys
import os

NOP = 0x90
offsets_and_values = {
    0x00030170: 0x00,
    0x000A94D0: NOP, 0x000A94D1: NOP, 0x000A94D2: NOP, 0x000A94D3: NOP, 0x000A94D4: NOP, 0x000A94D5: NOP, 0x000A94D6: NOP, 0x000A94D7: NOP, 0x000A94D8: NOP, 0x000A94D9: NOP, 0x000A94DA: NOP, 0x000A94DB: NOP, 0x000A94DC: NOP, 0x000A94DD: NOP, 0x000A94DE: NOP, 0x000A94DF: NOP, 0x000A94E0: NOP, 0x000A94E1: NOP, 0x000A94E2: NOP, 0x000A94E3: NOP, 0x000A94E4: NOP, 0x000A94E5: NOP, 0x000A94E6: NOP, 0x000A94E7: NOP, 0x000A94E8: NOP, 0x000A94E9: NOP, 0x000A94EA: NOP, 0x000A94EB: NOP, 0x000A94EC: NOP, 0x000A94ED: NOP, 0x000A94EE: NOP, 0x000A94EF: NOP, 0x000A94F0: NOP, 0x000A94F1: NOP, 0x000A94F2: NOP, 0x000A94F3: NOP, 0x000A94F4: NOP, 0x000A94F5: NOP, 0x000A94F6: NOP, 0x000A94F7: NOP, 0x000A94F8: NOP, 0x000A94F9: NOP, 0x000A94FA: NOP, 0x000A94FB: NOP, 0x000A94FC: NOP, 0x000A94FD: NOP, 0x000A94FE: NOP, 0x000A94FF: NOP, 0x000A9500: NOP, 0x000A9501: NOP, 0x000A9502: NOP, 0x000A9503: NOP, 0x000A9504: NOP, 0x000A9505: NOP, 0x000A9506: NOP, 0x000A9507: NOP, 0x000A9508: NOP, 0x000A9509: NOP, 0x000A950A: NOP, 0x000A950B: NOP, 0x000A950C: NOP, 0x000A950D: NOP, 0x000A950E: NOP, 0x000A950F: NOP,
    0x001C6CCD: 0x02,
    0x001C6CE4: 0x00,
    0x001C6CFB: 0x00,
}

def patch_exe(input_file, output_file=None):
    output_file = output_file or f"{os.path.splitext(input_file)[0]}_patched.exe"
    try:
        with open(input_file, 'rb') as f:
            data = f.read()
        patched_data = bytearray(data)
        for offset, value in offsets_and_values.items():
            if offset < len(patched_data):
                patched_data[offset] = value
        with open(output_file, 'wb') as f:
            f.write(patched_data)
        print(f"[+] Patch applied successfully! Saved as: {output_file}")

    except Exception as e:
        print(f"Error: {e}")

if __name__ == "__main__":
    if len(sys.argv) < 2:
        print("Usage: python patcher.py <input_file> [output_file]")
    else:
        patch_exe(sys.argv[1], sys.argv[2] if len(sys.argv) > 2 else None)

How to Run:

  1. Save the code in a Python script (e.g., patcher.py).

  2. Open the terminal/command prompt and run the script like so:

    python patcher.py "path_to_sublime_text.exe"

    Replace "path_to_sublime_text.exe" with the actual path to the sublime_text.exe file.

  3. The patched version will be saved in the same directory as the original file (or you can specify a custom output path).

Note:

Please be aware that even after applying the patch, the status may still display as (UNREGISTERED). This is normal, and you can safely disregard this message because the app is already activited.
big thanks to @AdvDebug

@Grajales-Camilo
Copy link

Windows Sublime Text Build 4200
Search 0x00046B80
0F B6 51 05 83 F2 01 -> C6 41 05 01 B2 00 90

Thanks for sharing your patch ♥

Not everyone understands hex editing. Instead of manually replacing 0F B6 51 05 83 F2 01 with C6 41 05 01 B2 00 90, you can simply create a Python file (for example, patcher.py) and run it in the same folder as the binary file.

It is recommended to copy the binary file to an external folder, patch it there, and then copy or move it back to the installed program’s folder, agreeing to replace the original file.

Or just run in the terminal: python -c "import shutil; fn='sublime_text.exe'; off=0x46B80; old=bytes.fromhex('0F B6 51 05 83 F2 01'); new=bytes.fromhex('C6 41 05 01 B2 00 90'); shutil.copy2(fn, fn+'.old'); f=open(fn,'r+b'); f.seek(off); d=f.read(len(old)); (d==old) and (f.seek(off),f.write(new),print('[+] Patch applied')) or print('[!] Bytes differ, not patched'); f.close()"

Wow! Incredibly easy. Thank you so much.

@Mohit-Gajula
Copy link

Hey, I modified the patcher to replace the original exe by default instead of creating a separate patched file. This way existing shortcuts still work without needing to update them.

Changes:

  • When no output file is specified, it now backs up the original as *_backup.exe and writes the patch to the original filename
  • Added backup protection so it won't overwrite existing backups
  • Old behavior still works if you specify an output file
import sys
import os

NOP = 0x90
offsets_and_values = {
    0x00030170: 0x00,
    0x000A94D0: NOP, 0x000A94D1: NOP, 0x000A94D2: NOP, 0x000A94D3: NOP, 0x000A94D4: NOP, 0x000A94D5: NOP, 0x000A94D6: NOP, 0x000A94D7: NOP, 0x000A94D8: NOP, 0x000A94D9: NOP, 0x000A94DA: NOP, 0x000A94DB: NOP, 0x000A94DC: NOP, 0x000A94DD: NOP, 0x000A94DE: NOP, 0x000A94DF: NOP, 0x000A94E0: NOP, 0x000A94E1: NOP, 0x000A94E2: NOP, 0x000A94E3: NOP, 0x000A94E4: NOP, 0x000A94E5: NOP, 0x000A94E6: NOP, 0x000A94E7: NOP, 0x000A94E8: NOP, 0x000A94E9: NOP, 0x000A94EA: NOP, 0x000A94EB: NOP, 0x000A94EC: NOP, 0x000A94ED: NOP, 0x000A94EE: NOP, 0x000A94EF: NOP, 0x000A94F0: NOP, 0x000A94F1: NOP, 0x000A94F2: NOP, 0x000A94F3: NOP, 0x000A94F4: NOP, 0x000A94F5: NOP, 0x000A94F6: NOP, 0x000A94F7: NOP, 0x000A94F8: NOP, 0x000A94F9: NOP, 0x000A94FA: NOP, 0x000A94FB: NOP, 0x000A94FC: NOP, 0x000A94FD: NOP, 0x000A94FE: NOP, 0x000A94FF: NOP, 0x000A9500: NOP, 0x000A9501: NOP, 0x000A9502: NOP, 0x000A9503: NOP, 0x000A9504: NOP, 0x000A9505: NOP, 0x000A9506: NOP, 0x000A9507: NOP, 0x000A9508: NOP, 0x000A9509: NOP, 0x000A950A: NOP, 0x000A950B: NOP, 0x000A950C: NOP, 0x000A950D: NOP, 0x000A950E: NOP, 0x000A950F: NOP,
    0x001C6CCD: 0x02,
    0x001C6CE4: 0x00,
    0x001C6CFB: 0x00,
}

def patch_exe(input_file, output_file=None):
    try:
        # Read the original file
        with open(input_file, 'rb') as f:
            data = f.read()
        
        # Apply patches
        patched_data = bytearray(data)
        for offset, value in offsets_and_values.items():
            if offset < len(patched_data):
                patched_data[offset] = value
        
        # If no output file specified, replace the original
        if output_file is None:
            # Create backup of original file
            backup_file = f"{os.path.splitext(input_file)[0]}_backup{os.path.splitext(input_file)[1]}"
            
            # Rename original to backup
            if os.path.exists(backup_file):
                print(f"[!] Warning: Backup file already exists: {backup_file}")
                print(f"[!] Skipping backup creation to avoid overwriting existing backup")
            else:
                os.rename(input_file, backup_file)
                print(f"[+] Original file backed up as: {backup_file}")
            
            # Write patched data to original filename
            with open(input_file, 'wb') as f:
                f.write(patched_data)
            print(f"[+] Patch applied successfully! Original file replaced: {input_file}")
        else:
            # Write to specified output file
            with open(output_file, 'wb') as f:
                f.write(patched_data)
            print(f"[+] Patch applied successfully! Saved as: {output_file}")

    except Exception as e:
        print(f"Error: {e}")

if __name__ == "__main__":
    if len(sys.argv) < 2:
        print("Usage: python patcher.py <input_file> [output_file]")
    else:
        patch_exe(sys.argv[1], sys.argv[2] if len(sys.argv) > 2 else None)

@pablo1-alpha
Copy link

Windows Sublime Text Build 4200

Search 0x00046B80

0F B6 51 05 83 F2 01 -> C6 41 05 01 B2 00 90

Thank you so much! broo

@pablo1-alpha
Copy link

Finally it works. Thank you everyone for your help...
image

@Bagas1245
Copy link

that works, thank you

@Tyler5252
Copy link

Tyler5252 commented Feb 18, 2026

that works, thank you

How you find 0F B6 51 05 83 F2 01 (0x00046B80) this in that place i have 96 02 55 a7 4c 59 c5 db (0x00046B80) I have this in windows

Please give screenshot or step by step method

@Tyler5252
Copy link

Tyler5252 commented Feb 18, 2026

Screenshot_2026_0218_114940 > Finally it works. Thank you everyone for your help...

image

How you find 0F B6 51 05 83 F2 01 (0x00046B80) this in that place i have 96 02 55 a7 4c 59 c5 db (0x00046B80) I have this in windows

Please give screenshot or step by step method

@Bagas1245
Copy link

that works, thank you

How you find 0F B6 51 05 83 F2 01 (0x00046B80) this in that place i have 96 02 55 a7 4c 59 c5 db (0x00046B80) I have this in windows

Please give screenshot or step by step method

I just follow the steps and didn't replace anything

@Tyler5252
Copy link

Tyler5252 commented Feb 18, 2026

For windows Sublime te*xt 4200
Step 1

First install Sublime Text 4200 (15.4MB)

Step 2
Guys goto in C Folder goto Program Files -> Sublime Text here sublime_text (7,571KB) file take it and upload to

hexedit website ( https://hexed.it/ ) and change that

Uncheck (don't tick) Rational option (very important)
(You can also use any Good Hex Editor to edit )
Search 0x00046B80

0F B6 51 05 83 F2 01 -> C6 41 05 01 B2 00 90

(OR)

copy 0F B6 51 05 83 F2 01 this and search you will get then replace it with C6 41 05 01 B2 00 90 this and save file as sublime_text (7,517 KB)

Step 2

Copy the newly created sublime_text (changed to C6 41 05 01 B2 00 90 ) ,

Step 3

Goto C Folder -> Program Files. -> Sublime Text Folder

backup already existing sublime_text (even delete) here paste copied sublime_text
and EXIT

STEP 4
Now open the Sublime Text Program -> Help -> About Sublime Text -> you will get Unlimited user license.
(This is for complete Beginners who don't know how to do)

This will help you Guys

@pablo1-alpha
Copy link

Screenshot_2026_0218_114940 > Finally it works. Thank you everyone for your help...
image

How you find 0F B6 51 05 83 F2 01 (0x00046B80) this in that place i have 96 02 55 a7 4c 59 c5 db (0x00046B80) I have this in windows

Please give screenshot or step by step method

I think your sublime version is different bro that's why

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment