Function at 0x414620
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 [0x0073ae50], rax
test rax, rax
je 0x414850
lea rbx, [rbp + 0x20]
mov r8d, 0x400
xor ecx, ecx
mov rdx, rbx
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 0x41469b
jmp 0x414880
cmp dx, 0x2f
je 0x4146a7
dec rax
je 0x4146b3
movzx edx, word [rbx + rax*2]
mov ecx, eax
cmp dx, 0x5c
jne 0x414690
inc ecx
movsxd rcx, ecx
mov word [rbp + rcx*2 + 0x20], 0
mov r8d, 0xf
lea rdx, str.WinRing0x64.sys
mov rcx, rbx
call sub.msvcrt.dll_wcsncat
mov rcx, qword [0x0073ae50]
mov r8d, 0xf01ff
lea rdx, str.WinRing0_1_2_0
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov qword [0x0073ae48], rax
test rax, rax
je 0x414727
lea rdx, str.service_WinRing0_1_2_0_already_exists
mov ecx, 0x10
call fcn.0040b2f0
mov rcx, qword [0x0073ae48]
mov rdx, rbp
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x4148a0
call fcn.00414540
mov r12d, eax
test al, al
je 0x414809
movzx r12d, byte [0x0073ae40]
test r12b, r12b
jne 0x4147c1
lea r8, str.WinRing0_1_2_0
mov rcx, qword [0x0073ae50]
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
mov r9d, 0xf01ff
mov rdx, r8
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
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rcx, rax
mov qword [0x0073ae48], rax
test rax, rax
je 0x4148f7
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x41481c
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], pe_nt_image_headers64
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 3
mov edx, 0xc0000000
lea rcx, str..WinRing0_1_2_0
mov r12d, 1
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [0x006b3100], rax
cmp rax, 0xffffffffffffffff
je 0x41490f
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 0x4147c1
cmp eax, 2
je 0x414983
mov r8d, eax
lea rdx, str.failed_to_start_WinRing0_driver__error__u
xor ecx, ecx
call fcn.0040b2f0
call fcn.00414540
jmp 0x414809
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
cmp eax, 5
je 0x4148e1
lea rdx, str.Failed_to_open_service_control_manager__error__u
xor ecx, ecx
xor r12d, r12d
call fcn.0040b2f0
jmp 0x414809
lea rdx, str.Failed_to_get_path_to_driver__error__u
xor ecx, ecx
xor r12d, r12d
call fcn.0040b2f0
jmp 0x414809
lea rdi, [rbp - 4]
xor r8d, r8d
xor edx, edx
mov rcx, qword [0x0073ae48]
mov r9, rdi
mov r12, qword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
mov dword [rbp - 4], 0
call r12
call rsi
cmp eax, 0x7a
je 0x41492a
cmp dword [rbp + 4], 4
jne 0x414717
mov byte [0x0073ae40], 1
jmp 0x4147c1
lea rdx, str.To_access_MSR_register_Administrator_privileges_are_required.
xor ecx, ecx
xor r12d, r12d
call fcn.0040b2f0
jmp 0x414809
call rsi
lea rdx, str.Failed_to_install_WinRing0_driver__error__u
xor ecx, ecx
mov r8d, eax
call fcn.0040b2f0
jmp 0x414809
call rsi
lea rdx, str.Failed_to_connect_to_WinRing0_driver__error__u
xor ecx, ecx
xor r12d, r12d
mov r8d, eax
call fcn.0040b2f0
jmp 0x414809
mov eax, dword [rbp - 4]
add rax, 0x1f
shr rax, 4
shl rax, 4
call fcn.006a3330
mov rcx, qword [0x0073ae48]
mov r8d, dword [rbp - 4]
sub rsp, rax
mov r9, rdi
lea r13, [rsp + 0x8f]
and r13, 0xffffffffffffffe0
mov rdx, r13
call r12
test eax, eax
je 0x4148cb
mov r8, qword [r13 + 0x10]
lea rdx, str.service_path:__s
mov ecx, 2
call fcn.0040b2f0
jmp 0x4148cb
lea rdx, str.Failed_to_start_WinRing0_driver:_WinRing0x64.sys_not_found
xor ecx, ecx
call fcn.0040b2f0
jmp 0x41483f