Skip to content

Instantly share code, notes, and snippets.

@jaoye
Last active April 21, 2023 17:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jaoye/f77608ba49f240c46384544d9245356a to your computer and use it in GitHub Desktop.
Save jaoye/f77608ba49f240c46384544d9245356a to your computer and use it in GitHub Desktop.
[Crack Sublime Text] #Crach
IDA Pro
open '/Applications/Sublime\ Text.app/Contents/MacOS/Sublime\ Text'
[File] -> [Produce file] -> [Create C file]
get 'Sublime Text.c'
search 'Sublime Text.c' Find "Thanks for purchasing!" in [show_thanks]
search show_thanks fun
'''
if ( v13 )
{
v14 = *((_QWORD *)this + 74);
v12 = v14 + 8;
v15 = apple_fruit((__int64)&v50, v14 + 8, (unsigned int *)(v14 + 4), &v41, (_BYTE *)(v14 + 1));
v16 = (bool *)*((_QWORD *)this + 74);
*v16 = v15 == 1;
switch ( v15 )
{
case 1:
std::__1::basic_string<char,std::__1::char_traits<char>,std::__1::allocator<char>>::operator=(v16 + 32);
std::__1::basic_string<char,std::__1::char_traits<char>,std::__1::allocator<char>>::basic_string(&v38, &v50);
....
....
if ( *(_BYTE *)(*((_QWORD *)v6 + 74) + 1LL) )
{
v28 = (_QWORD *)operator new(0x18uLL);
*v28 = off_100731948;
v28[1] = show_upgrade_required;
}
else
{
v28 = (_QWORD *)operator new(0x18uLL);
*v28 = off_100731948;
v28[1] = show_thanks;
}
}
}
'''
wii find [apple_fruit] is a key function
edit apple_fruit return 1
'''
48 C7 C0 01 00 00 00 C3
'''
@jaoye
Copy link
Author

jaoye commented May 7, 2019

https://gist.github.com/vertexclique/9839383
cs475x

Version Platform Offset Original Cracked
3207 macOS 0x6234B 55 C3
    0x62061 55 C3
    0xDAC5B 55 48 89 E5 41 57 41 56 48 C7 C0 01 00 00 00 C3
printf '\xc3' | dd seek=$((0x6234b)) conv=notrunc bs=1 of=/Applications/Sublime\ Text.app/Contents/MacOS/Sublime\ Text
printf '\xc3' | dd seek=$((0x62061)) conv=notrunc bs=1 of=/Applications/Sublime\ Text.app/Contents/MacOS/Sublime\ Text
printf '\x48\xc7\xc0\x01\x00\x00\x00\xc3' | dd seek=$((0xdac5b)) conv=notrunc bs=1 of=/Applications/Sublime\ Text.app/Contents/MacOS/Sublime\ Text

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