Function at 0x10005bc90
Capabilities:
Persist via windows service
Query or enumerate registry value
Set registry value

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xb8
mov qword [rsp + 0xa0], 0xfffffffffffffffe
mov r15, r9
mov rdi, r8
mov r13, rdx
mov rbp, rcx
mov qword [rsp + 0x58], 0
xor r12d, r12d
lea rcx, [rsp + 0x70]
call fcn.100019218
nop
lea rcx, [rsp + 0x60]
call fcn.10001fee0
nop
lea rcx, [rsp + 0x68]
call fcn.10001fee0
nop
mov r14, qword [rsp + 0x120]
mov dword [r14], r12d
xor edx, edx
xor ecx, ecx
mov r8d, 0x80000000
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
je 0x10005c067
xor ebx, ebx
mov r8d, 0x80000000
mov rdx, qword [r13]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
test rax, rax
jne 0x10005bd3d
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
jne 0x10005c067
jmp 0x10005bd4b
mov ebx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rdx, [0x100012840]
lea rcx, [rsp + 0x120]
call fcn.10001ff98
nop
lea r8, [rsp + 0x60]
mov rdx, r13
lea rcx, [rsp + 0x120]
call fcn.1000327cc
nop
lea rcx, [rsp + 0x120]
call fcn.10001fba0
lea rdx, [0x100012770]
lea rcx, [rsp + 0x120]
call fcn.10001ff98
nop
lea r8, [rsp + 0x68]
lea rdx, [rsp + 0x120]
lea rcx, [rsp + 0x60]
call fcn.1000327cc
nop
lea rcx, [rsp + 0x120]
call fcn.10001fba0
mov qword [rsp + 0x40], 0
lea rax, [rsp + 0x58]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x2001f
mov dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rsp + 0x68]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x10005c067
mov dword [rsp + 0x50], eax
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
lea r13, [0x1000107a0]
mov rdx, r13
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x10005be85
cmp eax, 2
jne 0x10005c067
test ebx, ebx
je 0x10005befa
mov r9, qword [rsp + 0x70]
xor r8d, r8d
lea rdx, [0x100010770]
lea rcx, [rsp + 0x70]
call fcn.10001f560
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x10005be79
mov qword [rcx + 8], rax
jmp 0x10005be7e
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x70], rax
jmp 0x10005befa
test ebx, ebx
je 0x10005befa
mov eax, dword [rsp + 0x50]
test eax, eax
je 0x10005befa
add eax, 4
mov dword [rsp + 0x50], eax
mov ecx, eax
call sub.msvcrt.dll_void____ptr64___cdecl_operator_new___unsigned_long_long_unsigned___int64__
mov qword [rdi], rax
test rax, rax
je 0x10005c067
mov eax, dword [rsp + 0x50]
mov dword [r15], eax
mov r8, rax
xor edx, edx
mov rcx, qword [rdi]
call sub.msvcrt.dll_memset
lea r11, [rsp + 0x50]
mov qword [rsp + 0x28], r11
mov rax, qword [rdi]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov rdx, r13
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x10005c067
mov rdx, qword [rdi]
lea rcx, [rsp + 0x70]
call fcn.100044e08
lea rax, [rsp + 0x120]
mov qword [rsp + 0xa8], rax
mov rdx, rbp
lea rcx, [rsp + 0x120]
call fcn.10001ff10
nop
mov rdx, rax
lea rcx, [rsp + 0x70]
call fcn.100036084
test eax, eax
je 0x10005bfd1
xor eax, eax
mov rdx, qword [rsp + 0x70]
test rdx, rdx
setne al
test eax, eax
jne 0x10005bf4c
mov ecx, 0x80004005
call fcn.10001fd10
int3
add rdx, 0x10
lea rcx, [rsp + 0x120]
call fcn.10001ff10
nop
xor ecx, ecx
mov rax, qword [rsp + 0x120]
test rax, rax
setne cl
test ecx, ecx
jne 0x10005bf7d
mov ecx, 0x80004005
call fcn.10001fd10
int3
mov rcx, qword [rbp]
sub rax, rcx
movzx edx, word [rcx]
cmp dx, word [rcx + rax]
jne 0x10005bf9a
add rcx, 2
test dx, dx
jne 0x10005bf84
xor eax, eax
jmp 0x10005bf9f
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x10005bfb8
lea rdx, [rsp + 0x120]
mov rcx, qword [rsp + 0x128]
call fcn.10001ecdc
mov dword [r14], 1
lea rcx, [rsp + 0x120]
call fcn.10001fba0
jmp 0x10005c054
mov r9, qword [rsp + 0x70]
xor r8d, r8d
mov rdx, qword [rbp]
lea rcx, [rsp + 0x70]
call fcn.10001f560
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x10005bff7
mov qword [rcx + 8], rax
jmp 0x10005bffc
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x70], rax
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x70]
call fcn.100034e1c
mov rbx, rax
test rax, rax
je 0x10005c067
mov eax, dword [rsp + 0x50]
add eax, eax
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
mov r9d, 7
xor r8d, r8d
mov rdx, r13
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x10005c04c
mov rcx, rbx
call sub.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_
jmp 0x10005c067
mov rcx, rbx
call sub.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov r12d, 1
jmp 0x10005c077
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x10005c077
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test rsi, rsi
je 0x10005c086
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
lea rcx, [rsp + 0x68]
call fcn.10001fba0
nop
lea rcx, [rsp + 0x60]
call fcn.10001fba0
nop
lea rcx, [rsp + 0x70]
call fcn.10001f53c
mov eax, r12d
add rsp, 0xb8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret