Function at 0x4153d0
Capabilities:
Create service
Query service configuration
Query service status
Start service

Disassembly:
push rbp
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x8a8
lea rbp, [rsp + 0x80]
mov r8d, 0xf003f
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov qword [0x007bce50], rax
test rax, rax
je 0x415600
lea rbx, [rbp + 0x20]
mov r8d, 0x400
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
call rsi
mov r8d, eax
mov eax, 0x3ff
test r8d, r8d
je 0x41544b
jmp 0x415628
cmp dx, 0x2f
je 0x415457
dec rax
je 0x415463
movzx edx, word [rbx + rax*2]
mov ecx, eax
cmp dx, 0x5c
jne 0x415440
inc ecx
movsxd rcx, ecx
xor eax, eax
mov word [rbp + rcx*2 + 0x20], ax
mov r8d, 0xf
lea rdx, str.WinRing0x64.sys
mov rcx, rbx
call sub.msvcrt.dll_wcsncat
mov rcx, qword [0x007bce50]
mov r8d, 0xf01ff
lea rdx, str.WinRing0_1_2_0
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov qword [0x007bce48], rax
test rax, rax
je 0x4154d7
lea rdx, str.service_WinRing0_1_2_0_already_exists
mov ecx, 0x10
call fcn.0040b1a0
mov rcx, qword [0x007bce48]
mov rdx, rbp
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x415640
call fcn.00415300
mov r12d, eax
test al, al
je 0x4155b9
movzx r12d, byte [0x007bce40]
test r12b, r12b
jne 0x415571
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 1
mov rcx, qword [0x007bce50]
lea r8, str.WinRing0_1_2_0
mov r9d, 0xf01ff
mov rdx, r8
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov qword [0x007bce48], rax
mov rcx, rax
test rax, rax
je 0x415697
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x4155cc
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
lea rcx, str..WinRing0_1_2_0
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [0x00733100], rax
mov r12d, 1
cmp rax, 0xffffffffffffffff
je 0x4156af
mov eax, r12d
lea rsp, [rbp + 0x828]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop rbp
ret
call rsi
cmp eax, 0x420
je 0x415571
cmp eax, 2
je 0x415723
mov r8d, eax
lea rdx, str.failed_to_start_WinRing0_driver__error__u
xor ecx, ecx
call fcn.0040b1a0
call fcn.00415300
jmp 0x4155b9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
cmp eax, 5
je 0x415681
lea rdx, str.Failed_to_open_service_control_manager__error__u
xor ecx, ecx
call fcn.0040b1a0
xor r12d, r12d
jmp 0x4155b9
lea rdx, str.Failed_to_get_path_to_driver__error__u
xor ecx, ecx
call fcn.0040b1a0
xor r12d, r12d
jmp 0x4155b9
mov rcx, qword [0x007bce48]
lea rdi, [rbp - 4]
mov r12, qword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
xor r8d, r8d
xor edx, edx
mov r9, rdi
mov dword [rbp - 4], 0
call r12
call rsi
cmp eax, 0x7a
je 0x4156ca
cmp dword [rbp + 4], 4
jne 0x4154c7
mov byte [0x007bce40], 1
jmp 0x415571
lea rdx, str.To_access_MSR_register_Administrator_privileges_are_required.
xor ecx, ecx
call fcn.0040b1a0
xor r12d, r12d
jmp 0x4155b9
call rsi
mov r8d, eax
lea rdx, str.Failed_to_install_WinRing0_driver__error__u
xor ecx, ecx
call fcn.0040b1a0
jmp 0x4155b9
call rsi
mov r8d, eax
lea rdx, str.Failed_to_connect_to_WinRing0_driver__error__u
xor ecx, ecx
call fcn.0040b1a0
xor r12d, r12d
jmp 0x4155b9
mov eax, dword [rbp - 4]
add rax, 0x3f
shr rax, 4
shl rax, 4
call fcn.007228f0
mov rcx, qword [0x007bce48]
sub rsp, rax
lea r13, [rsp + 0xaf]
and r13, 0xffffffffffffffc0
mov r8d, dword [rbp - 4]
mov r9, rdi
mov rdx, r13
call r12
test eax, eax
je 0x41566b
mov r8, qword [r13 + 0x10]
lea rdx, str.service_path:__s
mov ecx, 2
call fcn.0040b1a0
jmp 0x41566b
lea rdx, str.Failed_to_start_WinRing0_driver:_WinRing0x64.sys_not_found
xor ecx, ecx
call fcn.0040b1a0
jmp 0x4155ef