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

Disassembly:
push rbp
push rbx
lea rbp, [rsp - 0x228]
sub rsp, 0x328
mov rax, qword [0x1402b5020]
xor rax, rsp
mov qword [rbp + 0x210], rax
cmp qword [rcx + 0x18], 0
mov rbx, rcx
mov qword [rsp + 0x50], 0
jne 0x14016d4ca
cmp qword [rcx + 0x20], 0
jne 0x14016d4ca
cmp dword [rcx + 0x28], 0
jne 0x14016d4ca
xor eax, eax
jmp 0x14016d730
lea rax, str.SystemCurrentControlSetServices_
mov dword [rbp - 0x60], 1
mov qword [rbp - 0x48], rax
lea r8, [rbp]
mov rax, qword [rcx + 8]
mov r9d, 0x208
mov qword [rbp - 0x50], 0x44
lea rcx, [rbp - 0x60]
mov edx, 3
movups xmm0, xmmword [rax]
lea rax, [0x140282728]
mov dword [rbp - 0x40], 1
mov qword [rbp - 8], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
movaps xmmword [rbp - 0x30], xmm0
mov dword [rbp - 0x20], 1
mov qword [rbp - 0x10], 0x16
call sym.SystemInformer.exe_PhFormatToBuffer
test al, al
jne 0x14016d545
mov eax, 0xc0000001
jmp 0x14016d730
mov rcx, qword [rsp + 0x60]
add rcx, 0xfffffffffffffffe
mov qword [rsp + 0x348], rdi
mov word [rsp + 0x40], cx
lea eax, [rcx + 2]
mov word [rsp + 0x42], ax
lea rax, [rbp]
mov qword [rsp + 0x48], rax
cmp rcx, 0xfffe
jbe 0x14016d585
mov edi, 0xc0000106
lfence
jmp 0x14016d726
xor r8d, r8d
lea rax, [rsp + 0x68]
lea r9, [rsp + 0x70]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x40]
lea rcx, [r8 - 3]
call fcn.1401608a0
mov edi, eax
test eax, eax
js 0x14016d5f4
lea rax, [rsp + 0x58]
xor r9d, r9d
mov qword [rsp + 0x30], rax
lea r8, [rsp + 0x70]
mov dword [rsp + 0x28], 0
lea rcx, [rsp + 0x50]
mov edx, 0x30006
mov qword [rsp + 0x20], 0
call qword [sym.imp.ntdll.dll_NtCreateKey]
mov rcx, qword [rsp + 0x68]
mov edi, eax
test rcx, rcx
je 0x14016d5f0
call qword [sym.imp.ntdll.dll_NtClose]
test edi, edi
jns 0x14016d5fc
lfence
jmp 0x14016d726
mov rax, qword [rbx + 0x18]
mov qword [rsp + 0x350], r14
mov qword [rsp + 0x320], r15
test rax, rax
je 0x14016d65e
mov ecx, dword [rax]
lea rdx, str.PortName
mov rax, qword [rax + 8]
add ecx, 2
mov dword [rsp + 0x28], ecx
mov r9d, 1
mov rcx, qword [rsp + 0x50]
xor r8d, r8d
mov qword [rsp + 0x48], rdx
lea rdx, [rsp + 0x40]
mov dword [rsp + 0x40], 0x120010
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_NtSetValueKey]
mov edi, eax
test eax, eax
js 0x14016d6f5
mov rax, qword [rbx + 0x20]
test rax, rax
je 0x14016d6ac
mov ecx, dword [rax]
lea rdx, str.Altitude
mov rax, qword [rax + 8]
add ecx, 2
mov dword [rsp + 0x28], ecx
mov r9d, 1
mov rcx, qword [rsp + 0x50]
xor r8d, r8d
mov qword [rsp + 0x48], rdx
lea rdx, [rsp + 0x40]
mov dword [rsp + 0x40], 0x120010
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_NtSetValueKey]
mov edi, eax
test eax, eax
js 0x14016d6f5
add rbx, 0x28
cmp dword [rbx], 0
je 0x14016d709
mov rcx, qword [rsp + 0x50]
lea rax, str.Flags
mov dword [rsp + 0x28], 4
lea rdx, [rsp + 0x40]
mov r9d, 4
mov qword [rsp + 0x48], rax
xor r8d, r8d
mov dword [rsp + 0x40], 0xc000a
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ntdll.dll_NtSetValueKey]
mov edi, eax
test eax, eax
jns 0x14016d709
cmp dword [rsp + 0x58], 1
jne 0x14016d70b
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ntdll.dll_NtDeleteKey]
jmp 0x14016d70b
xor edi, edi
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ntdll.dll_NtClose]
mov r15, qword [rsp + 0x320]
mov r14, qword [rsp + 0x350]
mov eax, edi
mov rdi, qword [rsp + 0x348]
mov rcx, qword [rbp + 0x210]
xor rcx, rsp
call fcn.1401dd6a0
add rsp, 0x328
pop rbx
pop rbp
ret