Function at 0x140027cd0
Capabilities:
Delete registry key
Delete registry value
Persist via windows service
Set registry value

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x190]
sub rsp, 0x290
mov rax, qword [0x14013d0a8]
xor rax, rsp
mov qword [rbp + 0x180], rax
mov rdi, r8
mov rsi, rdx
mov rbx, rcx
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x40]
mov edx, 0x28
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x140027d87
lea r8, [rsp + 0x48]
xor ecx, ecx
lea rdx, str.SeLoadDriverPrivilege
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x140027d87
mov rax, qword [rsp + 0x48]
lea r8, [rsp + 0x60]
mov rcx, qword [rsp + 0x40]
xor edx, edx
mov qword [rsp + 0x64], rax
xor eax, eax
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x60], 1
mov dword [rsp + 0x6c], 2
lea r9d, [rax + 0x10]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x140027d7c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea r8, [rsp + 0x38]
mov rcx, 0xffffffff80000002
lea rdx, str.SystemCurrentControlSetServicesPROCMON24
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x140027fd7
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov dword [rsp + 0x28], 4
lea rdx, str.Type
mov r9d, 4
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rsp + 0x30], 2
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov dword [rsp + 0x28], 4
lea rdx, str.ErrorControl
mov r9d, 4
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rsp + 0x30], 1
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov dword [rsp + 0x28], 4
lea rdx, [0x1400f7c38]
mov r9d, 4
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rsp + 0x30], 3
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov r8, rbx
lea rdx, str.___s
lea rcx, [rsp + 0x70]
call fcn.140003120
lea rcx, [rsp + 0x70]
mov rax, 0xffffffffffffffff
nop word [rax + rax]
inc rax
cmp word [rcx + rax*2], 0
jne 0x140027e70
mov rcx, qword [rsp + 0x38]
lea rdx, str.ImagePath
add eax, eax
mov r9d, 1
mov dword [rsp + 0x28], eax
xor r8d, r8d
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x38]
mov rdx, rsi
call fcn.140026a90
lea rcx, [0x1400f79a0]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
lea rdx, str.NtLoadDriver
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rcx, str.RegistryMachineSystemCurrentControlSetServicesPROCMON24
mov qword [rsp + 0x58], rcx
mov ecx, 0x7a
mov word [rsp + 0x50], cx
lea rcx, [rsp + 0x50]
call rax
lea rdx, str.SystemCurrentControlSetServicesPROCMON24Enum
mov rcx, 0xffffffff80000002
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
lea rdx, str.SystemCurrentControlSetServicesPROCMON24Security
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
lea rdx, str.SystemCurrentControlSetServicesPROCMON24Parameters
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov rcx, qword [rsp + 0x38]
lea rdx, str.Type
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov rcx, qword [rsp + 0x38]
lea rdx, str.ErrorControl
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov rcx, qword [rsp + 0x38]
lea rdx, [0x1400f7c38]
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov rcx, qword [rsp + 0x38]
lea rdx, str.ImagePath
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x140027fcd
cmp ebx, 0xc000010e
je 0x140027fcd
mov rax, qword [0x1401422a8]
test rax, rax
jne 0x140027fb9
lea rcx, [0x1400f79a0]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
lea rdx, str.RtlNtStatusToDosError
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1401422a8], rax
mov ecx, ebx
call rax
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140027fd7
xor edx, edx
mov rcx, rdi
call fcn.140028000
mov rcx, qword [rbp + 0x180]
xor rcx, rsp
call fcn.1400b5660
mov rbx, qword [rsp + 0x2c8]
add rsp, 0x290
pop rdi
pop rsi
pop rbp
ret