Function at 0x100065364
Capabilities:
Persist via windows service
Set registry value

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rcx
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x60
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x18], rbp
mov r12, r8
mov rbp, rdx
lea r14, [0x100153eb8]
mov eax, 5
lea rbx, [0x10001e990]
lea r15, [0x10001e550]
mov rcx, qword [0x100153eb8]
cmp rcx, r14
je 0x1000653e0
test byte [rcx + 0x1c], 1
je 0x1000653e0
cmp byte [rcx + 0x19], al
jb 0x1000653e0
lea edx, [rax + 5]
mov qword [r11 - 0x60], r8
mov qword [r11 - 0x68], rbp
mov r9, rbx
mov r8, r15
mov rcx, qword [rcx + 0x10]
call fcn.100057fe8
mov rcx, qword [0x100153eb8]
xor esi, esi
lea edi, [rsi + 2]
test rbx, rbx
je 0x1000653f4
test rbp, rbp
je 0x1000653f4
test r12, r12
jne 0x100065422
cmp rcx, r14
je 0x10006541d
test byte [rcx + 0x1c], dil
je 0x10006541d
cmp byte [rcx + 0x19], dil
jb 0x10006541d
mov edx, 0xb
mov r8, r15
mov rcx, qword [rcx + 0x10]
call fcn.100034784
mov rcx, qword [0x100153eb8]
mov esi, 0x80004003
xor ebx, ebx
mov qword [rsp + 0x48], rbx
and qword [rsp + 0x50], rbx
and qword [rsp + 0x58], rbx
test esi, esi
js 0x10006568f
lea rcx, [0x100152100]
mov rax, qword [0x100152100]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0xa8], rax
mov r9, rbp
lea r8, [0x10001e990]
lea rdx, [0x100021160]
lea rcx, [rsp + 0xa8]
call fcn.100039dd4
lea ebp, [rbx + 4]
mov rbx, qword [rsp + 0xa8]
mov rcx, qword [0x100153eb8]
cmp rcx, r14
je 0x1000654ab
test byte [rcx + 0x1c], dil
je 0x1000654ab
cmp byte [rcx + 0x19], bpl
jb 0x1000654ab
lea edx, [rbp + 8]
mov r9, rbx
mov r8, r15
mov rcx, qword [rcx + 0x10]
call fcn.1000347a8
and qword [rsp + 0x38], 0
and qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x2001f
and dword [rsp + 0x20], 0
xor r9d, r9d
mov r8, rbx
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x48]
call fcn.10004f55c
test eax, eax
je 0x10006550d
mov rcx, qword [0x100153eb8]
cmp rcx, r14
je 0x100065508
test byte [rcx + 0x1c], dil
je 0x100065508
cmp byte [rcx + 0x19], dil
jb 0x100065508
mov edx, 0xd
mov r8, r15
mov rcx, qword [rcx + 0x10]
call fcn.100034784
mov esi, 0x8000ffff
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x100065528
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
test esi, esi
js 0x100065683
mov rcx, qword [0x100153eb8]
cmp rcx, r14
je 0x100065559
test byte [rcx + 0x1c], dil
je 0x100065559
cmp byte [rcx + 0x19], bpl
jb 0x100065559
mov edx, 0xe
mov r8, r15
mov rcx, qword [rcx + 0x10]
call fcn.100034784
xor eax, eax
test r12, r12
setne al
test eax, eax
jne 0x100065570
mov ecx, 0x80004005
call fcn.100036284
int3
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [rax + rax + 2]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r12
mov r9d, edi
xor r8d, r8d
lea rdx, [0x1000211c8]
mov rbx, qword [rsp + 0x48]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x1000655dc
mov rcx, qword [0x100153eb8]
cmp rcx, r14
je 0x1000655d5
test byte [rcx + 0x1c], dil
je 0x1000655d5
cmp byte [rcx + 0x19], dil
jb 0x1000655d5
mov edx, 0xf
mov r8, r15
mov rcx, qword [rcx + 0x10]
call fcn.100034784
mov rcx, qword [0x100153eb8]
mov esi, 0x8000ffff
jmp 0x1000655e3
mov rcx, qword [0x100153eb8]
test esi, esi
js 0x10006568f
cmp rcx, r14
je 0x10006560d
test byte [rcx + 0x1c], dil
je 0x10006560d
cmp byte [rcx + 0x19], bpl
jb 0x10006560d
mov edx, 0x10
mov r8, r15
mov rcx, qword [rcx + 0x10]
call fcn.100034784
mov dword [rsp + 0x90], 7
mov dword [rsp + 0x28], ebp
lea rax, [rsp + 0x90]
mov qword [rsp + 0x20], rax
mov r9d, ebp
xor r8d, r8d
lea rdx, [0x1000211f0]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x10006567a
mov rcx, qword [0x100153eb8]
cmp rcx, r14
je 0x100065673
test byte [rcx + 0x1c], dil
je 0x100065673
cmp byte [rcx + 0x19], dil
jb 0x100065673
mov edx, 0x11
mov r8, r15
mov rcx, qword [rcx + 0x10]
call fcn.100034784
mov rcx, qword [0x100153eb8]
mov esi, 0x8000ffff
jmp 0x10006568f
mov rcx, qword [0x100153eb8]
jmp 0x10006568f
mov rbx, qword [rsp + 0x48]
mov rcx, qword [0x100153eb8]
cmp rcx, r14
je 0x1000656c1
test byte [rcx + 0x1c], 1
je 0x1000656c1
movzx eax, byte [rcx + 0x19]
test esi, esi
mov edx, 5
cmovns edi, edx
cmp eax, edi
jl 0x1000656c1
mov edx, 0x12
mov r9d, esi
mov r8, r15
mov rcx, qword [rcx + 0x10]
call fcn.100036510
nop
test rbx, rbx
je 0x1000656cf
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret