2019-05-14 14:39:35 +02:00
|
|
|
|
|
|
|
global MmEnableWriteProtect
|
|
|
|
global MmDisableWriteProtect
|
|
|
|
global MmLoadPML4
|
|
|
|
|
|
|
|
MmEnableWriteProtect:
|
|
|
|
push rax
|
|
|
|
mov rax, cr0
|
|
|
|
or rax, 1<<16
|
|
|
|
mov cr0, rax
|
|
|
|
pop rax
|
|
|
|
ret
|
|
|
|
|
|
|
|
MmDisableWriteProtect:
|
|
|
|
push rax
|
|
|
|
mov rax, cr0
|
|
|
|
and rax, ~(1<<16)
|
|
|
|
mov cr0, rax
|
|
|
|
pop rax
|
|
|
|
ret
|
|
|
|
|
|
|
|
MmLoadPML4:
|
2019-05-15 02:26:55 +02:00
|
|
|
push rax
|
|
|
|
mov rax, rdi
|
|
|
|
mov cr3, rax
|
|
|
|
pop rax
|
2019-05-14 14:39:35 +02:00
|
|
|
ret
|