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

Disassembly:
mov rax, rsp
mov dword [rax + 0x10], edx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x80
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov r14d, r9d
mov r12, r8
mov rsi, rcx
mov edi, 1
mov r13d, edi
xor ebx, ebx
mov r15, qword [rsp + 0xe0]
mov dword [r15], ebx
mov qword [rsp + 0x30], rbx
mov ebp, ebx
lea rcx, [rax + 0x18]
call fcn.10001e06c
nop
lea rcx, [rsp + 0xe0]
call fcn.10001e06c
nop
lea rdx, [0x1000124e0]
lea rcx, [rsp + 0x38]
call fcn.10001e134
nop
lea r8, [rsp + 0xd0]
mov rdx, rsi
lea rcx, [rsp + 0x38]
call fcn.10002f9d0
nop
lea rcx, [rsp + 0x38]
call fcn.10001f3ec
lea rdx, [0x100012410]
lea rcx, [rsp + 0x38]
call fcn.10001e134
nop
lea r8, [rsp + 0xe0]
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0xd0]
call fcn.10002f9d0
nop
lea rcx, [rsp + 0x38]
call fcn.10001f3ec
lea r11, [rsp + 0x30]
mov qword [rsp + 0x20], r11
mov r9d, 0x2001f
xor r8d, r8d
mov rdx, qword [rsp + 0xe0]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
je 0x100050d19
cmp eax, 2
je 0x100050d06
mov r9, qword [rsi]
mov r8d, eax
lea rdx, [0x1000112b0]
lea ecx, [rdi + 2]
call fcn.100037e18
mov r13d, ebx
jmp 0x100050d6a
mov r8, qword [rsi]
lea rdx, [0x100011390]
mov ecx, edi
call fcn.100037e18
jmp 0x100050d6a
cmp r12, rbx
jne 0x100050d22
mov ebp, edi
jmp 0x100050d6a
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x20], r12
mov r9d, 7
xor r8d, r8d
lea rdx, [0x100010678]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
cmp eax, ebx
je 0x100050d67
mov r9, qword [rsi]
mov r8d, eax
lea rdx, [0x100011460]
mov ecx, 3
call fcn.100037e18
mov r13d, ebx
jmp 0x100050d6a
mov r13d, edi
mov rcx, qword [rsp + 0x30]
cmp rcx, rbx
je 0x100050d7a
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp ebp, ebx
je 0x100050df8
mov rdx, qword [rsp + 0xe0]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov r14d, 0x80000000
mov r8d, r14d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbp, rax
cmp rax, rbx
je 0x100050df8
mov r8d, r14d
mov rdx, qword [rsi]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
cmp rax, rbx
jne 0x100050de6
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
jne 0x100050def
mov rdx, qword [rsp + 0xd0]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
jmp 0x100050def
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rcx, [rsp + 0x50]
call fcn.100018ee8
nop
cmp r12, rbx
je 0x100050e15
mov rdx, r12
lea rcx, [rsp + 0x50]
call fcn.10003de0c
lea rax, [rsp + 0x38]
mov qword [rsp + 0x48], rax
mov rdx, rsi
lea rcx, [rsp + 0x38]
call fcn.10001e09c
nop
mov r9, r15
lea r8, [rsp + 0x50]
mov edx, dword [rsp + 0xc8]
mov rcx, rax
call fcn.1000522b4
cmp eax, ebx
jne 0x100050e5b
lea rdx, [0x100011520]
mov ecx, 3
call fcn.100037e18
mov edi, ebx
cmp r13d, ebx
je 0x100050e64
cmp edi, ebx
jne 0x100050e69
mov ebx, 0x643
lea rcx, [rsp + 0x50]
call fcn.10001a784
nop
lea rcx, [rsp + 0xe0]
call fcn.10001f3ec
nop
lea rcx, [rsp + 0xd0]
call fcn.10001f3ec
mov eax, ebx
mov rbx, qword [rsp + 0xc0]
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret