Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Here is a bash/GDB script to fix it (tested on GNU/Linux only):
- ```
- #!/bin/bash
- gdb /usr/bin/telegram-desktop << EOF
- tbreak _ZN3App9initMediaEv
- commands
- set {char}_ZN3App9msgRadiusEv=0xB8
- set {int}(_ZN3App9msgRadiusEv+1)=3
- set {char}(_ZN3App9msgRadiusEv+5)=0xC3
- set {char}_Z25replaceStringWithEntitiesRK13QLatin1String5QCharR7QStringP5QListI12EntityInTextEb = 0xC3
- set {char}(_ZNK5Image10pixCircledEii+0) = 0x89
- set {char}(_ZNK5Image10pixCircledEii+1) = 0xD1
- set {char}(_ZNK5Image10pixCircledEii+2) = 0x89
- set {char}(_ZNK5Image10pixCircledEii+3) = 0xF2
- set {char}(_ZNK5Image10pixCircledEii+4) = 0xBE
- set {int}(_ZNK5Image10pixCircledEii+5) = 0x02
- set {char}(_ZNK5Image10pixCircledEii+9) = 0xE9
- set {int}(_ZNK5Image10pixCircledEii+10) = (_ZNK5Image10pixRoundedE16ImageRoundRadiusii) - (_ZNK5Image10pixCircledEii + 14)
- end
- run
- detach
- quit
- EOF
- ```
- Just run it instead of the usual Telegram binary and you're set.
- This replaces the start of `App::msgRadius` with
- mov $0x3, %eax
- retq
- In C++, that is `return 3`;
- Explanation: `0xB8` means `mov` a number to `%eax`, `3` is the border radius, and `0xC3` is `retq`.
- The first instruction in `replaceStringWithEntities` gets replacemed by a `retq`, bypassing it.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement