-
Notifications
You must be signed in to change notification settings - Fork 0
/
win32_misc.s
67 lines (58 loc) · 1.57 KB
/
win32_misc.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
; these APIs should have been in SP4 or the post-SP4 hotfixes
; perhaps even backported to the post-SP6a package for NT4 (!)
; -despair
.686p
.mmx
.model flat
_text segment public 'CODE'
assume cs:_text
assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing
; Yes, the undecorated form of this contains an extra underscore
; to avoid conflicting with translation units that are able to
; import the "real" API entry
public __RtlCaptureContext@4
__RtlCaptureContext@4 proc near
var_4= dword ptr -4
arg_0= dword ptr 4
push ebx
mov ebx, [esp+4+arg_0]
mov [ebx+0B0h], eax
mov [ebx+0ACh], ecx
mov [ebx+0A8h], edx
mov eax, [esp+4+var_4]
mov [ebx+0A4h], eax
mov [ebx+0A0h], esi
mov [ebx+9Ch], edi
jmp CaptureRest
__RtlCaptureContext@4 endp
public _RtlpCaptureContext@4
_RtlpCaptureContext@4 proc near
arg_0= dword ptr 4
push ebx
mov ebx, [esp+4+arg_0]
mov dword ptr [ebx+0B0h], 0
mov dword ptr [ebx+0ACh], 0
mov dword ptr [ebx+0A8h], 0
mov dword ptr [ebx+0A4h], 0
mov dword ptr [ebx+0A0h], 0
mov dword ptr [ebx+9Ch], 0
CaptureRest::
mov word ptr [ebx+0BCh], cs
mov word ptr [ebx+98h], ds
mov word ptr [ebx+94h], es
mov word ptr [ebx+90h], fs
mov word ptr [ebx+8Ch], gs
mov word ptr [ebx+0C8h], ss
pushf
pop dword ptr [ebx+0C0h]
mov eax, [ebp+4]
mov [ebx+0B8h], eax
mov eax, [ebp+0]
mov [ebx+0B4h], eax
lea eax, [ebp+8]
mov [ebx+0C4h], eax
pop ebx
retn 4
_RtlpCaptureContext@4 endp
_text ends
end