-
Notifications
You must be signed in to change notification settings - Fork 12
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
d79d6cc
commit ab0bc19
Showing
5 changed files
with
89 additions
and
0 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
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
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,57 @@ | ||
_TEXT SEGMENT | ||
|
||
extern NameCrash_prevent_return: qword | ||
extern NameCrash_prevent_helper: proc | ||
|
||
PUBLIC NameCrash_prevent | ||
NameCrash_prevent PROC | ||
|
||
sub rsp, 10h | ||
movdqu [rsp], xmm0 | ||
sub rsp, 10h | ||
movdqu [rsp], xmm1 | ||
sub rsp, 10h | ||
movdqu [rsp], xmm2 | ||
sub rsp, 10h | ||
movdqu [rsp], xmm3 | ||
push rax | ||
push rcx | ||
push rdx | ||
push r8 | ||
push r9 | ||
push r10 | ||
push r11 | ||
sub rsp, 8 ;stack align? | ||
|
||
lea rcx, [rsi+98h] ;ptr to loaded name string | ||
call NameCrash_prevent_helper | ||
|
||
add rsp, 8 | ||
pop r11 | ||
pop r10 | ||
pop r9 | ||
pop r8 | ||
pop rdx | ||
pop rcx | ||
pop rax | ||
movdqu xmm3, [rsp] | ||
add rsp, 10h | ||
movdqu xmm2, [rsp] | ||
add rsp, 10h | ||
movdqu xmm1, [rsp] | ||
add rsp, 10h | ||
movdqu xmm0, [rsp] | ||
add rsp, 10h | ||
|
||
;original code | ||
mov rbx, [rsp+30h] | ||
mov rsi, [rsp+38h] | ||
add rsp, 20h | ||
|
||
jmp NameCrash_prevent_return | ||
|
||
NameCrash_prevent ENDP | ||
|
||
_TEXT ENDS | ||
|
||
END |