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

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x490]
sub rsp, 0x590
mov rax, qword [0x1402bf040]
xor rax, rsp
mov qword [rbp + 0x480], rax
mov rax, qword [rcx + 8]
lea r14, str.SystemCurrentControlSetServices_
xor esi, esi
mov dword [rbp - 0x70], 1
mov qword [rsp + 0x50], rsi
lea r8, [rbp + 0x60]
mov qword [rsp + 0x60], rsi
mov rdi, rcx
mov qword [rbp - 0x60], 0x44
lea rcx, [rbp - 0x70]
mov qword [rbp - 0x58], r14
mov r9d, 0x208
movups xmm0, xmmword [rax]
lea rax, [rsp + 0x78]
mov dword [rbp - 0x50], 1
mov edx, 2
mov qword [rsp + 0x20], rax
movaps xmmword [rbp - 0x40], xmm0
call sym.SystemInformer.exe_PhFormatToBuffer
test al, al
jne 0x1401765dc
mov ebx, 0xc0000001
lfence
jmp 0x140176957
mov rcx, qword ds:[rsp + 0x78]
add rcx, 0xfffffffffffffffe
mov word [rsp + 0x40], cx
lea eax, [rcx + 2]
mov word [rsp + 0x42], ax
lea rax, [rbp + 0x60]
mov qword [rsp + 0x48], rax
cmp rcx, 0xfffe
jbe 0x140176616
mov ebx, 0xc0000106
lfence
jmp 0x140176957
lea rax, [rsp + 0x68]
xor r8d, r8d
lea r9, [rbp - 0x30]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x40]
mov rcx, 0xfffffffffffffffd
call fcn.140168740
mov ebx, eax
test eax, eax
js 0x1401766de
lea rax, [rsp + 0x70]
xor r9d, r9d
mov qword [rsp + 0x30], rax
lea r8, [rbp - 0x30]
mov dword [rsp + 0x28], esi
lea rcx, [rsp + 0x60]
mov edx, 0x30006
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ntdll.dll_NtCreateKey]
mov rcx, qword [rsp + 0x68]
mov ebx, eax
test rcx, rcx
je 0x140176686
nop
call qword [sym.imp.ntdll.dll_NtClose]
test ebx, ebx
js 0x1401766de
mov rcx, qword [rsp + 0x60]
lea rax, str.SupportedFeatures
mov qword [rsp + 0x48], rax
lea rdx, [rsp + 0x40]
lea rax, [rdi + 0x28]
mov dword [rsp + 0x28], 4
mov r9d, 4
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rsp + 0x40], 0x240022
call qword [sym.imp.ntdll.dll_NtSetValueKey]
mov ebx, eax
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x1401766da
call qword [sym.imp.ntdll.dll_NtClose]
test ebx, ebx
jns 0x1401766e6
lfence
jmp 0x140176957
cmp qword [rdi + 0x18], rsi
jne 0x1401766fe
cmp qword [rdi + 0x20], rsi
jne 0x1401766fe
cmp dword [rdi + 0x2c], esi
jne 0x1401766fe
xor eax, eax
jmp 0x140176959
lfence
mov rax, qword [rdi + 8]
lea r8, [rbp + 0x270]
mov dword [rbp], 1
lea rcx, [rbp]
mov qword [rbp + 0x10], 0x44
mov r9d, 0x208
mov qword [rbp + 0x18], r14
mov edx, 3
movups xmm0, xmmword [rax]
lea rax, [0x14028a3b8]
mov dword [rbp + 0x20], 1
mov qword [rbp + 0x58], rax
lea rax, [rbp - 0x80]
mov qword [rsp + 0x20], rax
movaps xmmword [rbp + 0x30], xmm0
mov dword [rbp + 0x40], 1
mov qword [rbp + 0x50], 0x16
call sym.SystemInformer.exe_PhFormatToBuffer
test al, al
jne 0x140176773
mov eax, 0xc0000001
jmp 0x140176959
mov rcx, qword ds:[rbp - 0x80]
add rcx, 0xfffffffffffffffe
mov word [rsp + 0x40], cx
lea eax, [rcx + 2]
mov word [rsp + 0x42], ax
lea rax, [rbp + 0x270]
mov qword [rsp + 0x48], rax
cmp rcx, 0xfffe
ja 0x140176609
lea rax, [rsp + 0x68]
xor r8d, r8d
lea r9, [rbp - 0x30]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x40]
mov rcx, 0xfffffffffffffffd
call fcn.140168740
mov ebx, eax
test eax, eax
js 0x1401766de
lea rax, ds:[rsp + 0x58]
xor r9d, r9d
mov qword [rsp + 0x30], rax
lea r8, [rbp - 0x30]
mov dword [rsp + 0x28], esi
lea rcx, [rsp + 0x50]
mov edx, 0x30006
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ntdll.dll_NtCreateKey]
mov rcx, qword [rsp + 0x68]
mov ebx, eax
test rcx, rcx
je 0x140176818
call qword [sym.imp.ntdll.dll_NtClose]
nop dword [rax + rax]
test ebx, ebx
js 0x1401766de
mov qword [rsp + 0x5b8], r15
lfence
cmp qword [rdi + 0x18], rsi
je 0x140176889
lfence
mov rax, qword [rdi + 0x18]
mov r9d, 1
xor r8d, r8d
mov dword [rsp + 0x40], 0x120010
mov edx, dword [rax]
mov rcx, qword [rax + 8]
add edx, 2
mov dword [rsp + 0x28], edx
lea rax, str.PortName
mov qword [rsp + 0x20], rcx
lea rdx, [rsp + 0x40]
mov rcx, qword [rsp + 0x50]
mov qword [rsp + 0x48], rax
call qword [sym.imp.ntdll.dll_NtSetValueKey]
mov ebx, eax
test eax, eax
js 0x14017692c
cmp qword [rdi + 0x20], rsi
je 0x1401768db
lfence
mov rax, qword [rdi + 0x20]
mov r9d, 1
xor r8d, r8d
mov dword [rsp + 0x40], 0x120010
mov edx, dword [rax]
mov rcx, qword [rax + 8]
add edx, 2
mov dword [rsp + 0x28], edx
lea rax, str.Altitude
mov qword [rsp + 0x20], rcx
lea rdx, [rsp + 0x40]
mov rcx, qword [rsp + 0x50]
mov qword [rsp + 0x48], rax
call qword [sym.imp.ntdll.dll_NtSetValueKey]
mov ebx, eax
test eax, eax
js 0x14017692c
add rdi, 0x2c
cmp dword [rdi], esi
je 0x140176942
lea rax, str.Flags
mov dword ds:[rsp + 0x40], 0xc000a
mov qword [rsp + 0x48], rax
lfence
mov rcx, qword [rsp + 0x50]
lea rdx, [rsp + 0x40]
mov dword [rsp + 0x28], 4
mov r9d, 4
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ntdll.dll_NtSetValueKey]
mov ebx, eax
test eax, eax
jns 0x140176942
cmp dword [rsp + 0x58], 1
jne 0x140176944
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ntdll.dll_NtDeleteKey]
nop
jmp 0x140176944
mov ebx, esi
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ntdll.dll_NtClose]
mov r15, qword [rsp + 0x5b8]
mov eax, ebx
mov rcx, qword [rbp + 0x480]
xor rcx, rsp
call fcn.1401e4160
lea r11, ss:[rsp + 0x590]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret