Function at 0x140178960
Capabilities:
Delete registry key
Install driver
Persist via windows service
Set registry value
Unload driver

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xb0
mov rdi, qword [rcx + 8]
movzx r15d, dl
mov rbx, qword [0x1402c1ba0]
mov r14, rcx
mov rdx, qword [0x1402c5ff0]
xor r13d, r13d
mov qword [rbp - 0x29], r13
add rbx, qword [rdi]
lea rcx, [rbx + 0x12]
call sym.SystemInformer.exe_Ordinal_1240
mov rsi, rax
mov qword [rax], rbx
lea rcx, [rax + 0x10]
mov qword [rax + 8], rcx
mov word [rcx + rbx], r13w
mov r8, qword [0x1402c1ba0]
mov rdx, qword [str.RegistryMachineSystemCurrentControlSetServices_]
mov rcx, qword [rax + 8]
call fcn.14020c7e0
mov rcx, qword [0x1402c1ba0]
add rcx, qword [rsi + 8]
mov r8, qword [rdi]
mov rdx, qword [rdi + 8]
call fcn.14020c7e0
movzx eax, word [rsi]
mov edi, 0xffffffff
mov word [rbp - 0x21], ax
movzx eax, word [rsi]
add ax, 2
mov word [rbp - 0x1f], ax
mov rax, qword [rsi + 8]
mov qword [rbp - 0x19], rax
mov rax, qword [rsi]
cmp rax, 0xfffe
jbe 0x140178a2f
lea rcx, [rsi - 0x10]
lock xadd dword [rcx + 8], edi
cmp edi, 1
jne 0x140178a25
nop
call fcn.140143da0
mov eax, 0xc0000106
jmp 0x140178d9b
test r15b, r15b
je 0x140178c76
mov word [rbp - 0x49], ax
lea r9, [rbp - 9]
add ax, 2
lea rdx, [rbp - 0x49]
mov word [rbp - 0x47], ax
xor r8d, r8d
mov rax, qword [rsi + 8]
xor ecx, ecx
mov qword [rbp - 0x41], rax
lea rax, [rbp + 0x77]
mov qword [rsp + 0x20], rax
call fcn.14016ae40
mov ebx, eax
test eax, eax
js 0x140178aab
lea rax, [rbp + 0x67]
xor r9d, r9d
mov qword [rsp + 0x30], rax
lea r8, [rbp - 9]
mov dword [rsp + 0x28], r13d
lea rcx, [rbp - 0x39]
mov edx, 0x20006
mov qword [rsp + 0x20], r13
call qword [sym.imp.ntdll.dll_NtCreateKey]
mov rcx, qword ds:[rbp + 0x77]
mov ebx, eax
test rcx, rcx
je 0x140178aab
call qword [sym.imp.ntdll.dll_NtClose]
test ebx, ebx
js 0x140178c57
cmp dword [rbp + 0x67], 1
jne 0x140178c4d
mov rdx, qword [r14]
lea rax, [0x14028cb98]
mov qword [rsp + 0xf8], r12
lea rcx, [rbp - 0x49]
mov r12d, 8
mov qword [rbp - 0x41], rax
mov qword [rbp - 0x49], r12
call sym.SystemInformer.exe_Ordinal_1298
mov rcx, qword [rbp - 0x39]
lea rdx, [rbp - 0x49]
mov rbx, rax
mov dword [rsp + 0x28], 4
lea rax, str.ErrorControl
mov dword [rbp + 0x77], 1
mov qword [rbp - 0x41], rax
mov r9d, 4
lea rax, [rbp + 0x77]
mov dword [rbp - 0x49], 0x1a0018
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_NtSetValueKey]
mov rcx, qword [rbp - 0x39]
lea rax, str.Type
mov qword [rbp - 0x41], rax
lea rdx, [rbp - 0x49]
lea rax, [rbp + 0x7f]
mov dword [rsp + 0x28], 4
mov r9d, 4
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rbp + 0x7f], 1
mov dword [rbp - 0x49], 0xa0008
call qword [sym.imp.ntdll.dll_NtSetValueKey]
mov rcx, qword [rbp - 0x39]
lea rax, [0x14027bbb8]
mov qword [rbp - 0x41], rax
lea rdx, [rbp - 0x49]
lea rax, [rbp - 0x31]
mov dword [rsp + 0x28], 4
mov r9d, 4
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rbp - 0x31], 4
mov dword [rbp - 0x49], 0xc000a
call qword [sym.imp.ntdll.dll_NtSetValueKey]
mov ecx, dword [rbx]
lea rdx, str.ImagePath
mov rax, qword [rbx + 8]
add ecx, 2
mov dword [rsp + 0x28], ecx
mov r9d, 1
mov rcx, qword [rbp - 0x39]
xor r8d, r8d
mov qword [rbp - 0x41], rdx
lea rdx, [rbp - 0x49]
mov dword [rbp - 0x49], 0x140012
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_NtSetValueKey]
mov rax, qword [r14 + 0x10]
mov r9d, 1
xor r8d, r8d
mov dword [rbp - 0x49], 0x160014
mov edx, dword [rax]
mov rcx, qword [rax + 8]
add edx, 2
mov dword [rsp + 0x28], edx
lea rax, str.ObjectName
mov qword [rsp + 0x20], rcx
lea rdx, [rbp - 0x49]
mov rcx, qword [rbp - 0x39]
mov qword [rbp - 0x41], rax
call qword [sym.imp.ntdll.dll_NtSetValueKey]
lea rcx, [rbx - 0x10]
mov eax, edi
lock xadd dword [rcx + 8], eax
mov r12, qword [rsp + 0xf8]
cmp eax, 1
jne 0x140178c45
nop
call fcn.140143da0
mov rcx, r14
call fcn.140178420
mov rcx, qword [rbp - 0x39]
call qword [sym.imp.ntdll.dll_NtClose]
cmp byte [r14 + 0x39], r13b
je 0x140178c6a
mov rcx, qword [r14 + 8]
mov dl, 1
call fcn.1401954c0
jmp 0x140178c93
lea rcx, [rbp - 0x21]
call qword [sym.imp.ntdll.dll_NtLoadDriver]
jmp 0x140178c93
cmp byte [r14 + 0x39], r13b
je 0x140178c89
mov rcx, qword [r14 + 8]
xor edx, edx
call fcn.1401954c0
jmp 0x140178c93
lea rcx, [rbp - 0x21]
call qword [sym.imp.ntdll.dll_NtUnloadDriver]
mov ebx, eax
test eax, eax
js 0x140178ca9
nop dword [rax]
test r15b, r15b
jne 0x140178d86
mov r9, rsi
mov dword [rsp + 0x20], r13d
xor r8d, r8d
lea rcx, [rbp - 0x39]
mov edx, 0x30019
call sym.SystemInformer.exe_Ordinal_1555
test eax, eax
js 0x140178d86
mov rcx, qword [0x1402c1b80]
mov word [rbp - 0x49], cx
lea eax, [rcx + 2]
mov word [rbp - 0x47], ax
mov rax, qword [str.Parameters]
mov qword [rbp - 0x41], rax
cmp rcx, 0xfffe
ja 0x140178d59
mov rcx, qword [rbp - 0x39]
lea rax, [rbp + 0x77]
lea r9, [rbp - 9]
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [rbp - 0x49]
call fcn.14016ae40
mov r14d, eax
test eax, eax
js 0x140178d3c
lea r8, [rbp - 9]
mov edx, 0x10000
lea rcx, [rbp - 0x29]
call qword [sym.imp.ntdll.dll_NtOpenKey]
mov rcx, qword [rbp + 0x77]
mov r14d, eax
test rcx, rcx
je 0x140178d3c
call qword [sym.imp.ntdll.dll_NtClose]
nop dword [rax]
test r14d, r14d
js 0x140178d59
mov rcx, qword [rbp - 0x29]
call qword [sym.imp.ntdll.dll_NtDeleteKey]
mov rcx, qword [rbp - 0x29]
call qword [sym.imp.ntdll.dll_NtClose]
mov rcx, qword [rbp - 0x39]
lea r8, [0x140178880]
xor r9d, r9d
xor edx, edx
call sym.SystemInformer.exe_Ordinal_1485
mov rcx, qword [rbp - 0x39]
call qword [sym.imp.ntdll.dll_NtDeleteKey]
mov rcx, qword ds:[rbp - 0x39]
call qword [sym.imp.ntdll.dll_NtClose]
lea rcx, [rsi - 0x10]
lock xadd dword [rcx + 8], edi
cmp edi, 1
jne 0x140178d99
call fcn.140143da0
mov eax, ebx
add rsp, 0xb0
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbx
pop rbp
ret