-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreboot.inc
More file actions
36 lines (35 loc) · 878 Bytes
/
reboot.inc
File metadata and controls
36 lines (35 loc) · 878 Bytes
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
_user_code _reboot
xor eax, eax
mov al, _SYSCALL_ARGCPY
int 030H
cmp dword [_USER_SHELL_ARGUMENT_VIRTUAL], 0H
jz _reboot_start
xor eax, eax
mov al, _SYSCALL_WRITE
mov ebx, _TELETYPE_CURRENT
mov ecx, _reboot_invalid
mov edx, _reboot_invalid.sizeof
int 030H
mov ebx, (not 0H)
jmp _reboot_exit
_reboot_start:
xor eax, eax
mov al, _SYSCALL_REBOOT
mov ebx, _REBOOT_MAGIC1
mov ecx, _REBOOT_MAGIC2
mov edx, _REBOOT_CMD_RESTART
int 030H
xor eax, eax
mov al, _SYSCALL_WRITE
mov ebx, _TELETYPE_CURRENT
mov ecx, _reboot_permission
mov edx, _reboot_permission.sizeof
int 030H
xor ebx, ebx
_reboot_exit:
xor eax, eax
mov al, _SYSCALL_EXIT
int 030H
_reboot_permission string "reboot permission denied", 00AH
_reboot_invalid string "reboot invalid usage", 00AH
end _user_code