Skip to content

Instantly share code, notes, and snippets.

@maboloshi
Last active November 26, 2024 03:00
Show Gist options
  • Save maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47 to your computer and use it in GitHub Desktop.
Save maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47 to your computer and use it in GitHub Desktop.
Crack Sublime Text and Sublime Merge

Note

  1. If you can, please purchase the genuine license through the official channel and support the software developer.
  2. All crack methods here are implemented by @leogx9r.
  3. All data is not guaranteed to be authoritative or correct, nor has it been tested across the platform, nor is it responsible for any errors, lost data, etc. in practice! Please assess yourself!!!
  4. I am only within the ability to update the information based on the existing crack methods until the existing rules fail.

Sublime Patcher Script for personal use

The code implementation is very poor.
https://gist.github.com/maboloshi/5baecbddacf43855f13240b63be5673d

ToC

Sublime Text Sublime Merge
Stable channel win / linux / mac / mac-arm64 win / linux / mac / mac-arm64
Dev channel win / linux / mac / mac-arm64 win / linux / mac / mac-arm64

How to Crack Sublime Text, Stable Channel, Build 4152

Thanks to @leogx9r for providing cracking methods.

https://gist.github.com/JerryLokjianming/71dac05f27f8c96ad1c8941b88030451?permalink_comment_id=3762200#gistcomment-3762200 https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3802197#gistcomment-3802197 https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3803204#gistcomment-3803204

Win64

Desciption Offset Original Patched
Initial License Check 0x000A8D78 55 41 57 41 48 31 C0 C3
Persistent License Check 1 0x000071D0 E8 17 FE 20 00 90 90 90 90 90
Persistent License Check 2 0x000071E9 E8 FE FD 20 00 90 90 90 90 90
Disable Server Validation Thread 0x000AAB3E 55 56 57 48 83 EC 30 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x000A8945 55 C3
Disable Crash Reporter 0x00000400 41 C3

for 4117, 4118: https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3927712#gistcomment-3927712

Bat Script
:: for Win64
cd /d "C:\Program Files\Sublime Text" || exit
certutil -hashfile sublime_text.exe md5 | find /i "15BB398D5663B89A44372EF15F70A46F" || exit
echo 000A8D78: 48 31 C0 C3          | xxd -r - sublime_text.exe
echo 000071D0: 90 90 90 90 90       | xxd -r - sublime_text.exe
echo 000071E9: 90 90 90 90 90       | xxd -r - sublime_text.exe
echo 000AAB3E: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text.exe
echo 000A8945: C3                   | xxd -r - sublime_text.exe
echo 00000400: C3                   | xxd -r - sublime_text.exe

PS:xxd.exe extracted from git for windows

The license can be any string.

Blocked by Microsoft Defender SmartScreen -> More Info -> Run Anyway

Screenshot
![Screenshot](https://i.imgur.com/t4QlRZ6.png)

![Screenshot](https://i.imgur.com/18372Rh.png)

Linux

Desciption Offset Original Patched
Initial License Check 0x00415013 55 41 57 41 48 31 C0 C3
Persistent License Check 1 0x00409037 E8 C0 CC 12 00 90 90 90 90 90
Persistent License Check 2 0x0040904F E8 A8 CC 12 00 90 90 90 90 90
Disable Server Validation Thread 0x00416CA4 55 41 56 53 41 89 F6 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x00414C82 41 C3
Disable Crash Reporter 0x003FA310 55 C3
Bash Script
# for Linux
cd /opt/sublime_text || exit
md5sum -c <<<"7038C3B1CC79504602DA70599D4CCCE9  sublime_text" || exit
echo 00415013: 48 31 C0 C3          | xxd -r - sublime_text
echo 00409037: 90 90 90 90 90       | xxd -r - sublime_text
echo 0040904F: 90 90 90 90 90       | xxd -r - sublime_text
echo 00416CA4: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text
echo 00414C82: C3                   | xxd -r - sublime_text
echo 003FA310: C3                   | xxd -r - sublime_text

macOS

Desciption Offset Original Patched
Initial License Check 0x0009F313 55 48 89 E5 48 31 C0 C3
Persistent License Check 1 0x00009CEF E8 3C 2D 13 00 90 90 90 90 90
Persistent License Check 2 0x00009D07 E8 24 2D 13 00 90 90 90 90 90
Disable Server Validation Thread 0x000A085D 55 48 89 E5 41 57 41 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x0009EF0E 55 C3
Disable Crash Reporter 0x00002A87 55 C3
Bash Script
# for MacOS
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "B07FDB3A228A46DF1CC178FE60B64D3B" || exit
echo 0009F313: 48 31 C0 C3          | xxd -r - sublime_text
echo 00009CEF: 90 90 90 90 90       | xxd -r - sublime_text
echo 00009D07: 90 90 90 90 90       | xxd -r - sublime_text
echo 000A085D: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text
echo 0009EF0E: C3                   | xxd -r - sublime_text
echo 00002A87: C3                   | xxd -r - sublime_text
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Text.app"

Requires Apple Command Line Tools to be installed

macOS (ARM64)

Based on: https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3929427#gistcomment-3929427

Desciption Offset Original Patched
Initial License Check 0x01060C90 FC 6F BA A9 E6 03 1E AA E0 03 1F AA C0 03 5F D6
Persistent License Check 1 0x00FEAD18 40 BB 03 94 1F 20 03 D5
Persistent License Check 2 0x00FEAD2C 3B BB 03 94 1F 20 03 D5
Disable Server Validation Thread 0x01061F28 F6 57 BD A9 C0 03 5F D6
Disable License Notify Thread 0x01060908 FC 6F BD A9 C0 03 5F D6
Disable Crash Reporter 0x00FE5780 FC 6F BC A9 C0 03 5F D6
Bash Script
# for macOS (ARM64)
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "B07FDB3A228A46DF1CC178FE60B64D3B" || exit
echo 01060C90: E0 03 1F AA C0 03 5F D6 | xxd -r - sublime_text
echo 00FEAD18: 1F 20 03 D5             | xxd -r - sublime_text
echo 00FEAD2C: 1F 20 03 D5             | xxd -r - sublime_text
echo 01061F28: C0 03 5F D6             | xxd -r - sublime_text
echo 01060908: C0 03 5F D6             | xxd -r - sublime_text
echo 00FE5780: C0 03 5F D6             | xxd -r - sublime_text
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Text.app"

Requires Apple Command Line Tools to be installed


How to Crack Sublime Text, Dev Channel, Build 4154

Thanks to @leogx9r for providing cracking methods.

https://gist.github.com/JerryLokjianming/71dac05f27f8c96ad1c8941b88030451?permalink_comment_id=3762200#gistcomment-3762200 https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3802197#gistcomment-3802197 https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3803204#gistcomment-3803204

Win64

Desciption Offset Original Patched
Initial License Check 0x0009E47C 55 41 57 41 48 31 C0 C3
Persistent License Check 1 0x0000647C E8 23 7C 20 00 90 90 90 90 90
Persistent License Check 2 0x00006495 E8 0A 7C 20 00 90 90 90 90 90
Disable Server Validation Thread 0x000A0222 55 56 57 48 83 EC 30 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x0009E043 55 C3

for 4117, 4118: https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3927712#gistcomment-3927712

Bat Script
:: for Win64
cd /d "C:\Program Files\Sublime Text" || exit
certutil -hashfile sublime_text.exe md5 | find /i "ADF277D39672D83637AB708FC45413C8" || exit
echo 0009E47C: 48 31 C0 C3          | xxd -r - sublime_text.exe
echo 0000647C: 90 90 90 90 90       | xxd -r - sublime_text.exe
echo 00006495: 90 90 90 90 90       | xxd -r - sublime_text.exe
echo 000A0222: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text.exe
echo 0009E043: C3                   | xxd -r - sublime_text.exe

PS:xxd.exe extracted from git for windows

The license can be any string.

Blocked by Microsoft Defender SmartScreen -> More Info -> Run Anyway

Screenshot
![Screenshot](https://i.imgur.com/t4QlRZ6.png)

![Screenshot](https://i.imgur.com/18372Rh.png)

Linux

Desciption Offset Original Patched
Initial License Check 0x00443F94 55 41 57 41 48 31 C0 C3
Persistent License Check 1 0x0042B210 E8 37 44 14 00 90 90 90 90 90
Persistent License Check 2 0x0042B228 E8 1F 44 14 00 90 90 90 90 90
Disable Server Validation Thread 0x00445EB6 55 41 56 53 41 89 F6 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x00443BF8 41 C3
Bash Script
# for Linux
cd /opt/sublime_text || exit
md5sum -c <<<"8836FE092DBB7BC8D3D2375D34510CA9  sublime_text" || exit
echo 00443F94: 48 31 C0 C3          | xxd -r - sublime_text
echo 0042B210: 90 90 90 90 90       | xxd -r - sublime_text
echo 0042B228: 90 90 90 90 90       | xxd -r - sublime_text
echo 00445EB6: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text
echo 00443BF8: C3                   | xxd -r - sublime_text

macOS

Desciption Offset Original Patched
Initial License Check 0x0009D527 55 48 89 E5 48 31 C0 C3
Persistent License Check 1 0x000097F5 E8 AE 12 13 00 90 90 90 90 90
Persistent License Check 2 0x0000980D E8 96 12 13 00 90 90 90 90 90
Disable Server Validation Thread 0x0009EA9D 55 48 89 E5 41 57 41 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x0009D122 55 C3
Bash Script
# for MacOS
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "E1A3347BECDA7CC1EF583ECACECACBDC" || exit
echo 0009D527: 48 31 C0 C3          | xxd -r - sublime_text
echo 000097F5: 90 90 90 90 90       | xxd -r - sublime_text
echo 0000980D: 90 90 90 90 90       | xxd -r - sublime_text
echo 0009EA9D: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text
echo 0009D122: C3                   | xxd -r - sublime_text
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Text.app"

Requires Apple Command Line Tools to be installed

macOS (ARM64)

Based on: https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3929427#gistcomment-3929427

Desciption Offset Original Patched
Initial License Check 0x010758B8 FC 6F BA A9 E6 03 1E AA E0 03 1F AA C0 03 5F D6
Persistent License Check 1 0x01000360 33 A4 03 94 1F 20 03 D5
Persistent License Check 2 0x01000374 2E A4 03 94 1F 20 03 D5
Disable Server Validation Thread 0x01076B54 F6 57 BD A9 C0 03 5F D6
Disable License Notify Thread 0x01075534 FC 6F BD A9 C0 03 5F D6
Bash Script
# for macOS (ARM64)
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "E1A3347BECDA7CC1EF583ECACECACBDC" || exit
echo 010758B8: E0 03 1F AA C0 03 5F D6 | xxd -r - sublime_text
echo 01000360: 1F 20 03 D5             | xxd -r - sublime_text
echo 01000374: 1F 20 03 D5             | xxd -r - sublime_text
echo 01076B54: C0 03 5F D6             | xxd -r - sublime_text
echo 01075534: C0 03 5F D6             | xxd -r - sublime_text
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Text.app"

Requires Apple Command Line Tools to be installed


How to Crack Sublime Merge, Stable Channel, Build 2083

Thanks to @leogx9r for providing cracking methods.

https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3823090#gistcomment-3823090 https://gist.github.com/JerryLokjianming/71dac05f27f8c96ad1c8941b88030451?permalink_comment_id=3762883#gistcomment-3762883 https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3802197#gistcomment-3802197

Win64

Desciption Offset Original Patched
Initial License Check 0x000251A8 55 41 57 41 56 41 55 41 48 C7 C0 19 01 00 00 C3
Persistent License Check 1 0x000286A3 E8 70 AA 26 00 90 90 90 90 90
Persistent License Check 2 0x000286BC E8 57 AA 26 00 90 90 90 90 90
Disable Server Validation Thread 0x000269B8 55 56 57 48 83 EC 30 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x00024DCD 55 C3
Disable Crash Reporter 0x00023F18 41 C3
Bat Script
:: for Win64
cd /d "C:\Program Files\Sublime Merge" || exit
certutil -hashfile sublime_merge.exe md5 | find /i "E33B76ADA6E7E7577CD4E81A7A4580C7" || exit
echo 000251A8: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge.exe
echo 000286A3: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 000286BC: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 000269B8: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_merge.exe
echo 00024DCD: C3                      | xxd -r - sublime_merge.exe
echo 00023F18: C3                      | xxd -r - sublime_merge.exe

PS:xxd.exe extracted from git for windows

Linux

thinks @urxi here

Bash Script
# for Linux
cd /opt/sublime_merge || exit
md5sum -c <<<"86F61A82E7EE8DD9BDC4CF16A7C8E825  sublime_merge" || exit
echo 0045A360: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 0045D21D: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0045D23A: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0045B990: C3                      | xxd -r - sublime_merge
echo 0045A05A: C3                      | xxd -r - sublime_merge
echo 00459ABA: C3                      | xxd -r - sublime_merge

macOS

Desciption Offset Original Patched
Initial License Check 0x0002C2DF 55 48 89 E5 41 57 41 56 48 C7 C0 19 01 00 00 C3
Persistent License Check 1 0x0002E96C E8 1F B9 18 00 90 90 90 90 90
Persistent License Check 2 0x0002E98B E8 00 B9 18 00 90 90 90 90 90
Disable Server Validation Thread 0x0002D295 55 48 89 E5 41 57 41 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x0002BF6A 55 C3
Disable Crash Reporter 0x0002B7AB 55 C3
Bash Script
# for MacOS
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "B1AADED4F196EEEEBF8D5A6F98B11288" || exit
echo 0002C2DF: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 0002E96C: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002E98B: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002D295: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_merge
echo 0002BF6A: C3                      | xxd -r - sublime_merge
echo 0002B7AB: C3                      | xxd -r - sublime_merge
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Merge.app"

Requires Apple Command Line Tools to be installed

macOS (ARM64)

!!!! May have expired !!!!

Based on:

Desciption Offset Original Patched
Initial License Check 0x014D9060 FC 6F BA A9 E6 03 1E AA E0 03 1F AA C0 03 5F D6
Persistent License Check 1 0x014DAF68 AB B6 04 94 1F 20 03 D5
Persistent License Check 2 0x014DAF7C A6 B6 04 94 1F 20 03 D5
Disable Server Validation Thread 0x014D9DBC F6 57 BD A9 C0 03 5F D6
Disable License Notify Thread 0x014D8D9C FC 6F BD A9 C0 03 5F D6
Disable Crash Reporter 0x014D86E4 FC 6F BC A9 C0 03 5F D6
Bash Script
# for macOS (ARM64)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "B1AADED4F196EEEEBF8D5A6F98B11288" || exit
echo 014D9060: E0 03 1F AA C0 03 5F D6 | xxd -r - sublime_merge
echo 014DAF68: 1F 20 03 D5             | xxd -r - sublime_merge
echo 014DAF7C: 1F 20 03 D5             | xxd -r - sublime_merge
echo 014D9DBC: C0 03 5F D6             | xxd -r - sublime_merge
echo 014D8D9C: C0 03 5F D6             | xxd -r - sublime_merge
echo 014D86E4: C0 03 5F D6             | xxd -r - sublime_merge
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Merge.app"

Requires Apple Command Line Tools to be installed


How to Crack Sublime Merge, Dev Channel, Build 2085

Thanks to @leogx9r for providing cracking methods.

https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3823090#gistcomment-3823090 https://gist.github.com/JerryLokjianming/71dac05f27f8c96ad1c8941b88030451?permalink_comment_id=3762883#gistcomment-3762883 https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3802197#gistcomment-3802197

Win64

Desciption Offset Original Patched
Initial License Check 0x00025300 55 41 57 41 56 41 55 41 48 C7 C0 19 01 00 00 C3
Persistent License Check 1 0x00028813 E8 B8 7F 27 00 90 90 90 90 90
Persistent License Check 2 0x0002882C E8 9F 7F 27 00 90 90 90 90 90
Disable Server Validation Thread 0x00026B20 55 56 57 48 83 EC 30 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x00024F25 55 C3
Disable Crash Reporter 0x00024070 41 C3
Bat Script
:: for Win64
cd /d "C:\Program Files\Sublime Merge" || exit
certutil -hashfile sublime_merge.exe md5 | find /i "8B6590708E6AAE98AC3AE29135DB084F" || exit
echo 00025300: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge.exe
echo 00028813: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 0002882C: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 00026B20: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_merge.exe
echo 00024F25: C3                      | xxd -r - sublime_merge.exe
echo 00024070: C3                      | xxd -r - sublime_merge.exe

PS:xxd.exe extracted from git for windows

Linux

thinks @urxi here

Bash Script
# for Linux
cd /opt/sublime_merge || exit
md5sum -c <<<"958DA6B7EC687B25F55A16FF6A3D9BD0  sublime_merge" || exit
echo 0045F22C: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 004620F9: 90 90 90 90 90          | xxd -r - sublime_merge
echo 00462116: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0046086C: C3                      | xxd -r - sublime_merge
echo 0045EF26: C3                      | xxd -r - sublime_merge
echo 0045E986: C3                      | xxd -r - sublime_merge

macOS

Desciption Offset Original Patched
Initial License Check 0x0002C4CB 55 48 89 E5 41 57 41 56 48 C7 C0 19 01 00 00 C3
Persistent License Check 1 0x0002EB48 E8 15 23 19 00 90 90 90 90 90
Persistent License Check 2 0x0002EB67 E8 F6 22 19 00 90 90 90 90 90
Disable Server Validation Thread 0x0002D471 55 48 89 E5 41 57 41 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x0002C156 55 C3
Disable Crash Reporter 0x0002B997 55 C3
Bash Script
# for MacOS
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "D67510219FB14938A47BE39260C87215" || exit
echo 0002C4CB: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 0002EB48: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002EB67: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002D471: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_merge
echo 0002C156: C3                      | xxd -r - sublime_merge
echo 0002B997: C3                      | xxd -r - sublime_merge
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Merge.app"

Requires Apple Command Line Tools to be installed

macOS (ARM64)

!!!! May have expired !!!!

Based on:

Desciption Offset Original Patched
Initial License Check 0x015027EC FC 6F BA A9 E6 03 1E AA E0 03 1F AA C0 03 5F D6
Persistent License Check 1 0x015046D4 78 C9 04 94 1F 20 03 D5
Persistent License Check 2 0x015046E8 73 C9 04 94 1F 20 03 D5
Disable Server Validation Thread 0x0150352C F6 57 BD A9 C0 03 5F D6
Disable License Notify Thread 0x01502528 FC 6F BD A9 C0 03 5F D6
Disable Crash Reporter 0x01501E70 FC 6F BC A9 C0 03 5F D6
Bash Script
# for macOS (ARM64)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "D67510219FB14938A47BE39260C87215" || exit
echo 015027EC: E0 03 1F AA C0 03 5F D6 | xxd -r - sublime_merge
echo 015046D4: 1F 20 03 D5             | xxd -r - sublime_merge
echo 015046E8: 1F 20 03 D5             | xxd -r - sublime_merge
echo 0150352C: C0 03 5F D6             | xxd -r - sublime_merge
echo 01502528: C0 03 5F D6             | xxd -r - sublime_merge
echo 01501E70: C0 03 5F D6             | xxd -r - sublime_merge
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Merge.app"

Requires Apple Command Line Tools to be installed

ST's new version of hexadecimal editing method

From: https://gist.github.com/opastorello/4d494d627ec9012367028c89cb7a1945

Search : 80 78 05 00 0f 94 c1 first result , replace: c6 40 05 01 48 85 c9

This patch is applicable to all x86-64 CPU platforms of ST.

ST's old version hexadecimal editing method

From: https://gist.github.com/opastorello/4d494d627ec9012367028c89cb7a1945?permalink_comment_id=4495369#gistcomment-4495369

97 94 0D --> 00 00 00

License Key:

----- BEGIN LICENSE -----
TwitterInc
200 User License
EA7E-890007
1D77F72E 390CDD93 4DCBA022 FAF60790
61AA12C0 A37081C5 D0316412 4584D136
94D7F7D4 95BC8C1C 527DA828 560BB037
D1EDDD8C AE7B379F 50C9D69D B35179EF
2FE898C4 8E4277A8 555CE714 E1FB0E43
D5D52613 C3D12E98 BC49967F 7652EED2
9D2D2E61 67610860 6D338B72 5CF95C69
E36B85CC 84991F19 7575D828 470A92AB
------ END LICENSE ------
@Destitute-Streetdwelling-Guttersnipe

@maboloshi You use "C3" (ret) to patch "Disable License Notify Thread". But I saw @leogx9r wrote that "Simply return 0 here to disable." in comment https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47#gistcomment-3802197.
Is this a mistake? Why don't you use ret 0?

@Destitute-Streetdwelling-Guttersnipe

@leogx9r thanks for your great contribution. I'm curious about the Server Validation Thread. In your analysis, you suggest to use ret 1 to disable it.
However, I saw someone named rufoa posted patches for it using ret for many versions of SM (from 2027 to 2059).
I tried ret on SM 2059 and it seems ok.
Do you think patching with ret has the same effect?

@leogx9r
Copy link

leogx9r commented Sep 15, 2021

@Destitute-Streetdwelling-Guttersnipe It does have the same effect. The function returns the value of pthread_join() or something similar. I didn't see Sublime Text/Merge use the return value but decided to have it return the proper value anyways for consistency (which upon research seems it required zero so I guess I documented that wrong).

The only function you really need to have a return value is for the license checking function, which requires zero always. The rest are basically optional. The return value isn't actually used (based on my reverse engineering) on the other functions.

Edit: On Windows it returns the value of CreateThread() which requires a non-zero value to indicate success. I originally patched this on Windows so I used the same method for Linux/MacOS -- they instead use pthread which requires a zero value to indicate success, so I guess that's where I got mixed up. So you should ideally return 1 on Windows (or any non-zero value) and 0 on Linux but it doesn't matter really since the value is never used.

@Destitute-Streetdwelling-Guttersnipe

@leogx9r thanks for the explanation. I think this also answer my question to @maboloshi about "License Notify Thread". We can return anything since the return value is ignored.

I created a patcher in my github which uses the patterns you posted. I upgraded them to use reghex (which is regex with hex bytes), so that I can combine more actions into 1 pattern.
For example: reghex="(?<= 41 B8 . . . . ) E8 . . . . (48|49) . .", fix=nop5 can be used to patch the invalidate1 call for both dev and stable versions of ST (48 for dev, 49 for stable), the offset to E8 is described by the lookahead (?<= 41 B8 . . . . ).
Another example: reghex="(?<= E8 ) . . . .", patch=ret0, is_ref=True can be used to patch the license_check call without the need to analyze the instruction length of Call (E8).
I hope to make it less dependent on x64 and easier to add support for arm64.

@ShineUnM
Copy link

How about 4115?

@Destitute-Streetdwelling-Guttersnipe

@kepeto you must provide the list of Fix yourself. Please see the section usage in README.md for detail.

If you don't know any fix, you can use the famous patch for 97 94 0D (see https://gist.github.com/JerryLokjianming/71dac05f27f8c96ad1c8941b88030451)

@leogx9r
Copy link

leogx9r commented Sep 24, 2021

Sublime Text v4115 Crack

Windows (x64 Only)

Patterns have updated for invalidation/validation function:

    Windows x64 Pattern 1: `direct reference sig: (+0x6) 41 B8 ? ? ? ? E8 ? ? ? ? 48 8B 96 ? ? ? ?`
                Pattern 2: `direct reference sig: (+0x6) 41 B8 ? ? ? ? E8 ? ? ? ? E8 ? ? ? ? 48 89 F1`

Note: Patterns are unchanged for Linux/MacOS.

image

Linux (x64 Only)

image

MacOS (x64 Only)

image

Proof

image

@kepeto
Copy link

kepeto commented Sep 26, 2021

I have made a rough Python 3 patcher for Sublime Text v4113 Windows x64 that uses leogx9r's signatures instead of hardcoded offsets.

https://github.com/rainbowpigeon/sublime-text-4-patcher

image

If there is demand, I can probably update it to support Linux and macOS.

from @leogx9r recommendation I can confirm 4115 work with this tool (same pattern), just add 4115 @line: 264

image

image

@Destitute-Streetdwelling-Guttersnipe

I put a regex pattern in my patcher that can detect new version (along with channel, os, arch) without any modification.
/updates/(?P<channel>\w+)_update_check\?version=\d+&platform=(?P<os>\w+)&arch=(?P<arch>\w+)

@bms8197
Copy link

bms8197 commented Sep 28, 2021

So is there a patcher that works on MacOS (ARM version) or just for Windows for now?

@Destitute-Streetdwelling-Guttersnipe

Current patterns still work on SM 2060. They use ret 281 again in license check. All releases since SM 2056 (except 2058) are like this. Maybe SM 2058 was just an anomaly.

@Destitute-Streetdwelling-Guttersnipe
Copy link

Destitute-Streetdwelling-Guttersnipe commented Sep 28, 2021

Based on the work of @leogx9r and @maboloshi, I updated my patcher to support Mac M1. But I guess it's only suitable for version 4114 on Mac M1.
image

PS: the patterns of @maboloshi are mostly correct, except the license check. My pattern is:

Fix(name="license_check", reghex="E6 03 1E AA ED 65 0E 94", patch="E0 03 1F AA C0 03 5F D6")

@bms8197
Copy link

bms8197 commented Sep 28, 2021

@Destitute-Streetdwelling-Guttersnipe where exactly can I get that patcher?

@Destitute-Streetdwelling-Guttersnipe

Mac version of ST can run on both x64 and M1 CPUs, so I improved my patcher to patch for both platforms at once:
image

@Destitute-Streetdwelling-Guttersnipe
Copy link

Destitute-Streetdwelling-Guttersnipe commented Sep 29, 2021

@bms8197 it's at https://github.com/Destitute-Streetdwelling-Guttersnipe/reghex_patcher
The patterns are similar to the ones in rainbowpigeon's patcher.

If you don't know any fix, you can use the famous patch for 97 94 0D (see https://gist.github.com/JerryLokjianming/71dac05f27f8c96ad1c8941b88030451)

@bms8197
Copy link

bms8197 commented Sep 29, 2021

@Destitute-Streetdwelling-Guttersnipe is that patcher going to work for 4115 MacOS on M1 cpu or just for 4114?

@Destitute-Streetdwelling-Guttersnipe

@bms8197 I don't include patterns since I want to make a generic patcher. You have to add patterns yourself.

There are patterns for 4114 on Mac M1 in this page, such as https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47#gistcomment-3908103.
I don't know if they work on 4115 or not.

@bms8197
Copy link

bms8197 commented Sep 29, 2021

@Destitute-Streetdwelling-Guttersnipe allright, thanks for the info. It beats me at the moment so I'll just stick with my 4114 fully registered version. There are no things that I actually need in 4115 at the moment so...

@maboloshi
Copy link
Author

maboloshi commented Sep 30, 2021

Sublime Text v4116

==========================================================================================
[*] Download: sublime_text_build_4116_x64.zip, from: https://download.sublimetext.com/sublime_text_build_4116_x64.zip ...
>>>: 29.1MB [00:12, 2.31MB/s]
[*] Extract: sublime_text.exe, from: sublime_text_build_4116_x64.zip ...
[>] Attempting to autodetect application type ...
[*] Detected input file as Sublime Text ...
[*] Windows PE Detected -> 9849248 Bytes
    MD5 Checksum -> 1E9700C9AE636755E674176196C6546D
[>] Found RVA pattern for "isValidLicense" at 0xA8730 -> 0xFFFFE29F -> 0xA69D4 ...
[*] Rewrite data '55 41 57 41' -> '48 31 C0 C3' ...

[>] Found pattern for "invalidationFunction" at 0x711A ...
[*] Rewrite data 'E8 A5 60 20 00' -> '90 90 90 90 90' ...

[!] No pattern found for "validationFunction" ...

[>] Found pattern for "validationFunction2" at 0x7133 ...
[*] Rewrite data 'E8 8C 60 20 00' -> '90 90 90 90 90' ...

[>] Found pattern for "serverThread" at 0xA847F ...
[*] Rewrite data '55 56 57 48 83 EC 30' -> '48 31 C0 48 FF C0 C3' ...

[>] Found pattern for "licenseNotifyThread" at 0xA65CF ...
[*] Rewrite data '55' -> 'C3' ...

[>] Found pattern for "crashReporter" at 0x400 ...
[*] Rewrite data '41' -> 'C3' ...

==========================================================================================
[*] Download: sublime_text_build_4116_x64.tar.xz, from: https://download.sublimetext.com/sublime_text_build_4116_x64.tar.xz ...
>>>: 17.2MB [00:04, 3.86MB/s]
[*] Extract: sublime_text/sublime_text, from: sublime_text_build_4116_x64.tar.xz ...
[>] Attempting to autodetect application type ...
[*] Detected input file as Sublime Text ...
[*] Linux ELF Detected -> 8739760 Bytes
    MD5 Checksum -> E825B21D7821A49D1DB6583D089CF0E9
[>] Found RVA pattern for "isValidLicense" at 0x3781CE -> 0xFFFFE96F -> 0x376B42 ...
[*] Rewrite data '55 41 57 41' -> '48 31 C0 C3' ...

[>] Found pattern for "invalidationFunction" at 0x36CC85 ...
[*] Rewrite data 'E8 A4 B4 11 00' -> '90 90 90 90 90' ...

[>] Found pattern for "validationFunction" at 0x36CCA0 ...
[*] Rewrite data 'E8 89 B4 11 00' -> '90 90 90 90 90' ...

[>] Found pattern for "serverThread" at 0x3785CD ...
[*] Rewrite data '55 41 56 53 41 89 F6' -> '48 31 C0 48 FF C0 C3' ...

[>] Found pattern for "licenseNotifyThread" at 0x376806 ...
[*] Rewrite data '41' -> 'C3' ...

[>] Found pattern for "crashReporter" at 0x360930 ...
[*] Rewrite data '55' -> 'C3' ...

==========================================================================================
[*] Download: sublime_text_build_4116_mac.zip, from: https://download.sublimetext.com/sublime_text_build_4116_mac.zip ...
>>>: 43.7MB [00:16, 2.59MB/s]
[*] Extract: Sublime Text.app/Contents/MacOS/sublime_text, from: sublime_text_build_4116_mac.zip ...
[>] Attempting to autodetect application type ...
[*] Detected input file as Sublime Text ...
[*] MacOS Mach-O Detected -> 33166448 Bytes
    MD5 Checksum -> DA00E096337A07B659B573CA7FC4D352
[>] Found RVA pattern for "isValidLicense" at 0x93D8A -> 0xFFFFF1A3 -> 0x92F32 ...
[*] Rewrite data '55 48 89 E5' -> '48 31 C0 C3' ...

[>] Found pattern for "invalidationFunction" at 0x8E7E ...
[*] Rewrite data 'E8 93 16 12 00' -> '90 90 90 90 90' ...

[>] Found pattern for "validationFunction" at 0x8E9D ...
[*] Rewrite data 'E8 74 16 12 00' -> '90 90 90 90 90' ...

[>] Found pattern for "serverThread" at 0x94297 ...
[*] Rewrite data '55 48 89 E5 41 57 41' -> '48 31 C0 48 FF C0 C3' ...

[>] Found pattern for "licenseNotifyThread" at 0x92B50 ...
[*] Rewrite data '55' -> 'C3' ...

[>] Found pattern for "crashReporter" at 0x2FE7 ...
[*] Rewrite data '55' -> 'C3' ...

↓ The following rules are not validated for ARM64 and are missing rule "license_check" ↓

[>] Found pattern for "invalidationFunction_arm64" at 0xF69744 ...
[*] Rewrite data '48 95 03 94' -> '1F 20 03 D5' ...

[>] Found pattern for "validationFunction_arm64" at 0xF69758 ...
[*] Rewrite data '43 95 03 94' -> '1F 20 03 D5' ...

[>] Found pattern for "serverThread_arm64" at 0xFD8F38 ...
[*] Rewrite data 'F6 57 BD A9' -> 'C0 03 5F D6' ...

[>] Found pattern for "licenseNotifyThread_arm64" at 0xFD7AAC ...
[*] Rewrite data 'FC 6F BD A9' -> 'C0 03 5F D6' ...

[>] Found pattern for "crashReporte_arm64" at 0xF64DB8 ...
[*] Rewrite data 'FC 6F BC A9' -> 'C0 03 5F D6' ...

@bms8197
Copy link

bms8197 commented Sep 30, 2021

@maboloshi can we get that patcher from somewhere or is it private?

@kepeto
Copy link

kepeto commented Sep 30, 2021

@rainbowpigeon patch working for 4116 build

image
image
image

@Destitute-Streetdwelling-Guttersnipe

@maboloshi
Copy link
Author

@Destitute-Streetdwelling-Guttersnipe I know, but this only applies to 4114.

@Destitute-Streetdwelling-Guttersnipe

It's Friday, so let's have some fun with binary 🚀
@maboloshi you can use this pattern for license_check with 4116:

        Fix(name="license_check", reghex=f"(?<= {0b0000000000001000:02x} {0b0000000000000000:02x} {0b0000000010000000:02x} {0b0000000001010010:02x} . . . {0b0000000000010100:02x} ) {0b0000000011100110:02x} {0b0000000000000011:02x} {0b0000000000011110:02x} {0b0000000010101010:02x} . . . {0b0000000010010100:02x} {0b0000000011111110:02x} {0b0000000000000011:02x} {0b0000000000000110:02x} {0b0000000010101010:02x}", patch=_ret0),

@bms8197 if you want to patch 4116, you can combine the patches of maboloshi at https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47#gistcomment-3911981 with my patch for license_check:

printf %02x  $((2#0000000011100000)) $((2#0000000000000011)) $((2#0000000000011111)) $((2#0000000010101010)) $((2#0000000011000000)) $((2#0000000000000011)) $((2#0000000001011111)) $((2#0000000011010110)) | xxd -r -p -s $((2#00000000111111010111111000011100)) sublime_text

I haven't tested it on Mac M1, but you can give it a try if you're not afraid of binary digits.

@maboloshi
Copy link
Author

@Destitute-Streetdwelling-Guttersnipe Good job 😆 👍

[>] Found pattern for "isValidLicense_arm64" at 0xFD7E1C ...
[*] Rewrite data 'E6 03 1E AA E4 65 0E 94' -> 'E0 03 1F AA C0 03 5F D6' ...

@bms8197
Copy link

bms8197 commented Oct 1, 2021

@Destitute-Streetdwelling-Guttersnipe it beats me completely how to patch 4116. I tried several methods combining those patches but it's not working. I'm pretty sure I'm doing something wrong here. This hex stuff is not for me as it seems...

Copy link

ghost commented Oct 5, 2021

@rainbowpigeon patch working for 4116 build

@kepeto Thanks for testing. I have pushed the changes to support those new dev builds.

@sharunkumar
Copy link

sharunkumar commented Oct 6, 2021

echo|set /p="7D6D201F6E924801C0B872398877C8A1 sublime_merge.exe" >nul 2>&1 | md5sum -c - || exit

getting an exit at this point in SM version 2060 🤔

@sharunkumar
Copy link

@sharunkumar You need to download Command Line Tools for Windows 64 and extract the Command Line Tools.

I did download that and added the binaries to path. I am still getting the exit. I think the MD5 sum isn't matching

@sharunkumar
Copy link

also, if I skip the md5sum check the rest of the commands doesn't seem to work

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