Patching Sublime Text 4 Build 4169
July 25, 2024
Disclaimer
The information included in this post is for educational purposes only. Any material on this webpage may not be reproduced, retransmitted, or redisplayed other than for personal or educational use.
Introduction
A patch is a software update for an existing application or operating system. Patching allows for modifying a compiled program when the source code is unavailable.
Instructions
The following is a list of instructions required to patch Sublime Text 4 Build 4169 on the 64-bit version of Windows:
1. Visit https://www.sublimetext.com/download and left-click on the appropriate download link.
2. Head to the location of the completed download and run Sublime Text Setup. Install Sublime Text.
3. Head to the location of the installed Sublime Text application. Create a copy of the application and paste it into a directory that is different from the directory of the original installation. This copy will be the experimental application.
4. Visit https://hexed.it/ and left-click on "Open file". After the File Explorer initializes, double-click on the copy of the application. The application will load within the website.
5. The hexadecimal string that we want to patch is 80 78 05 00 0F 94 C1
. Paste this string into the "Search for" text field. Ensure that the "Data Type" is set to "Hexadecimal Values" and then left-click on the "Find next" button to search for viable entries. In this case, one entry appears: 0x0002260B
. We will need to modify this region of memory in order to patch the application.
6. Replace 80 78 05 00 0F 94 C1
with C6 40 05 01 48 85 C9
. After overwriting the original string, left-click on "Save as" and replace the experimental application with it. The experimental application is now patched.
7. Copy the patched application and paste it into the directory of the original installation. A prompt will appear, and you should left-click on "Replace the file in the destination". After the original application has been replaced with the patched version, run the application to verify its success.
8. You should now no longer see the "(UNREGISTERED)" text in the application header. Additionally, if you left-click on "Help", then you should see a button that reads "Remove License". This indicates that you already have the license. Since Sublime Text periodically contacts its license verification servers to evaluate the legitimacy of the license, you will need to prevent any attempts from the application to connect to its license verification servers in order to not lose access to the application.
9. Open C:\Windows\System32\drivers\etc\hosts in a text editor. Add the following lines to the hosts file:
0.0.0.0 www.sublimetext.com
0.0.0.0 sublimetext.com
0.0.0.0 sublimehq.com
0.0.0.0 license.sublimehq.com
0.0.0.0 45.55.255.55
0.0.0.0 45.55.41.223
This will block any attempts from the application to connect to its license verification servers.