Function at 0x100065138
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, [0x100152eb8]
mov eax, 5
lea rbx, [0x10001e990]
lea r15, [0x10001e550]
mov rcx, qword [0x100152eb8]
cmp rcx, r14
je 0x1000651b4
test byte [rcx + 0x1c], 1
je 0x1000651b4
cmp byte [rcx + 0x19], al
jb 0x1000651b4
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.100057d6c
mov rcx, qword [0x100152eb8]
xor esi, esi
lea edi, [rsi + 2]
test rbx, rbx
je 0x1000651c8
test rbp, rbp
je 0x1000651c8
test r12, r12
jne 0x1000651f6
cmp rcx, r14
je 0x1000651f1
test byte [rcx + 0x1c], dil
je 0x1000651f1
cmp byte [rcx + 0x19], dil
jb 0x1000651f1
mov edx, 0xb
mov r8, r15
mov rcx, qword [rcx + 0x10]
call fcn.100034764
mov rcx, qword [0x100152eb8]
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 0x100065463
lea rcx, [0x100151100]
mov rax, qword [0x100151100]
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.100039d9c
lea ebp, [rbx + 4]
mov rbx, qword [rsp + 0xa8]
mov rcx, qword [0x100152eb8]
cmp rcx, r14
je 0x10006527f
test byte [rcx + 0x1c], dil
je 0x10006527f
cmp byte [rcx + 0x19], bpl
jb 0x10006527f
lea edx, [rbp + 8]
mov r9, rbx
mov r8, r15
mov rcx, qword [rcx + 0x10]
call fcn.100034788
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.10004f40c
test eax, eax
je 0x1000652e1
mov rcx, qword [0x100152eb8]
cmp rcx, r14
je 0x1000652dc
test byte [rcx + 0x1c], dil
je 0x1000652dc
cmp byte [rcx + 0x19], dil
jb 0x1000652dc
mov edx, 0xd
mov r8, r15
mov rcx, qword [rcx + 0x10]
call fcn.100034764
mov esi, 0x8000ffff
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1000652fc
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
test esi, esi
js 0x100065457
mov rcx, qword [0x100152eb8]
cmp rcx, r14
je 0x10006532d
test byte [rcx + 0x1c], dil
je 0x10006532d
cmp byte [rcx + 0x19], bpl
jb 0x10006532d
mov edx, 0xe
mov r8, r15
mov rcx, qword [rcx + 0x10]
call fcn.100034764
xor eax, eax
test r12, r12
setne al
test eax, eax
jne 0x100065344
mov ecx, 0x80004005
call fcn.100036264
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 0x1000653b0
mov rcx, qword [0x100152eb8]
cmp rcx, r14
je 0x1000653a9
test byte [rcx + 0x1c], dil
je 0x1000653a9
cmp byte [rcx + 0x19], dil
jb 0x1000653a9
mov edx, 0xf
mov r8, r15
mov rcx, qword [rcx + 0x10]
call fcn.100034764
mov rcx, qword [0x100152eb8]
mov esi, 0x8000ffff
jmp 0x1000653b7
mov rcx, qword [0x100152eb8]
test esi, esi
js 0x100065463
cmp rcx, r14
je 0x1000653e1
test byte [rcx + 0x1c], dil
je 0x1000653e1
cmp byte [rcx + 0x19], bpl
jb 0x1000653e1
mov edx, 0x10
mov r8, r15
mov rcx, qword [rcx + 0x10]
call fcn.100034764
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 0x10006544e
mov rcx, qword [0x100152eb8]
cmp rcx, r14
je 0x100065447
test byte [rcx + 0x1c], dil
je 0x100065447
cmp byte [rcx + 0x19], dil
jb 0x100065447
mov edx, 0x11
mov r8, r15
mov rcx, qword [rcx + 0x10]
call fcn.100034764
mov rcx, qword [0x100152eb8]
mov esi, 0x8000ffff
jmp 0x100065463
mov rcx, qword [0x100152eb8]
jmp 0x100065463
mov rbx, qword [rsp + 0x48]
mov rcx, qword [0x100152eb8]
cmp rcx, r14
je 0x100065495
test byte [rcx + 0x1c], 1
je 0x100065495
movzx eax, byte [rcx + 0x19]
test esi, esi
mov edx, 5
cmovns edi, edx
cmp eax, edi
jl 0x100065495
mov edx, 0x12
mov r9d, esi
mov r8, r15
mov rcx, qword [rcx + 0x10]
call fcn.100036328
nop
test rbx, rbx
je 0x1000654a3
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