-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
69df3df
commit caf8cd3
Showing
4 changed files
with
59 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
.code | ||
|
||
; THIS FUNCTION IS CURSED. | ||
; The original function barely utilizes any registers, so functions calling it don't care about their temporary registers getting corrupted. | ||
; The hook changes them, so we run into crashes. | ||
|
||
; Push every register known to mankind to overcome this issue. | ||
|
||
?getStrImp@@YAPEBDH@Z proto | ||
|
||
?implOfGetStr@@YAPEBDH@Z: | ||
push rbx | ||
push rdx | ||
push rsi | ||
push rdi | ||
push r8 | ||
push r9 | ||
push r10 | ||
push r11 | ||
push r12 | ||
push r13 | ||
push r14 | ||
push r15 | ||
|
||
call ?getStrImp@@YAPEBDH@Z | ||
|
||
pop r15 | ||
pop r14 | ||
pop r13 | ||
pop r12 | ||
pop r11 | ||
pop r10 | ||
pop r9 | ||
pop r8 | ||
pop rdi | ||
pop rsi | ||
pop rdx | ||
pop rbx | ||
|
||
ret | ||
|
||
public ?implOfGetStr@@YAPEBDH@Z | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters