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

Disassembly:
mov r11, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xf0
mov qword [rsp + 0xb8], 0xfffffffffffffffe
mov qword [r11 + 0x18], rbx
mov qword [r11 + 0x20], rsi
mov rax, qword [0x140040468]
xor rax, rsp
mov qword [rsp + 0xe8], rax
mov rbx, rdx
mov rdx, rcx
mov rsi, qword [0x1400416c8]
mov qword [rsp + 0x68], rsi
mov qword [rsp + 0x60], rsi
xor esi, esi
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x78], rsi
mov qword [r11 - 0x98], rsi
cmp qword [rcx + 0x18], 8
jb 0x1400159ad
mov rdx, qword [rcx]
mov qword [rsp + 0xd8], 7
mov qword [rsp + 0xd0], rsi
mov word [rsp + 0xc0], si
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
lea rcx, [rsp + 0xc0]
call fcn.14000ce60
nop
lea r8, [rsp + 0xc0]
mov rdx, rbx
lea rcx, [rsp + 0x70]
call fcn.14000b8a0
nop
cmp qword [rsp + 0xd8], 8
jb 0x140015a18
mov rcx, qword [rsp + 0xc0]
call fcn.14001a248
mov r15d, esi
mov r14, qword [rsp + 0x78]
mov r13, qword [rsp + 0x70]
movabs rax, 0x6666666666666667
mov edi, r15d
mov rcx, r14
sub rcx, r13
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp rdi, rdx
jae 0x140015d3e
mov qword [rsp + 0xc0], rsi
mov qword [rsp + 0xc8], rsi
mov qword [rsp + 0xd0], rsi
lea rax, [rdi + rdi*4]
lea rdx, [r13 + rax*8]
mov qword [rsp + 0xa8], 7
mov qword [rsp + 0xa0], rsi
mov word [rsp + 0x90], si
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rcx, [rsp + 0x90]
call fcn.14000c9d0
lea rdx, [rsp + 0xc0]
lea rcx, [rsp + 0x90]
call fcn.14000ba30
mov r12, qword [rsp + 0xc8]
mov rcx, r12
mov rbx, qword [rsp + 0xc0]
sub rcx, rbx
movabs rax, 0x6666666666666667
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp rdx, 5
je 0x140015b67
test rbx, rbx
je 0x140015b29
mov rdi, rbx
cmp rdi, r12
je 0x140015b20
cmp qword [rdi + 0x18], 8
jb 0x140015b0b
mov rcx, qword [rdi]
call fcn.14001a248
mov qword [rdi + 0x18], 7
mov qword [rdi + 0x10], rsi
mov word [rdi], si
add rdi, 0x28
jmp 0x140015af7
mov rcx, rbx
call fcn.14001a248
nop
test r13, r13
je 0x140015b62
mov rdi, r13
cmp rdi, r14
je 0x140015b5a
cmp qword [rdi + 0x18], 8
jb 0x140015b45
mov rcx, qword [rdi]
call fcn.14001a248
mov qword [rdi + 0x18], 7
mov qword [rdi + 0x10], rsi
mov word [rdi], si
add rdi, 0x28
jmp 0x140015b31
mov rcx, r13
call fcn.14001a248
jmp 0x140015d8b
lea rcx, [rbx + 0xa0]
cmp qword [rcx + 0x18], 8
jb 0x140015b78
mov rcx, qword [rcx]
call fcn.14001a540
mov dword [rsp + 0x50], eax
mov qword [0x1400416c8], 0xffffffff80000002
mov esi, 1
lea rdi, [rbx + 0x50]
mov r8, qword [rdi + 0x10]
cmp r8, rsi
jae 0x140015ba6
mov rsi, r8
test r8, r8
je 0x140015bf6
mov rax, qword [rdi + 0x18]
cmp rax, 8
jb 0x140015bb5
mov rdx, qword [rdi]
jmp 0x140015bb8
mov rdx, rdi
cmp rax, 8
jb 0x140015bc3
mov rcx, qword [rdi]
jmp 0x140015bc6
mov rcx, rdi
sub r8, rsi
add r8, r8
lea rdx, [rdx + rsi*2]
call fcn.14001aa60
mov r11, qword [rdi + 0x10]
sub r11, rsi
mov qword [rdi + 0x10], r11
cmp qword [rdi + 0x18], 8
jb 0x140015bec
mov rax, qword [rdi]
jmp 0x140015bef
mov rax, rdi
xor ecx, ecx
mov word [rax + r11*2], cx
mov r9, qword [rbx + 0x60]
mov esi, 1
dec r9
mov r8, qword [rdi + 0x10]
cmp r8, r9
jae 0x140015c17
lea rcx, str.invalid_string_position
call fcn.1400195ac
sub r8, r9
cmp r8, rsi
jae 0x140015c27
mov rsi, r8
test r8, r8
je 0x140015c81
mov rax, qword [rdi + 0x18]
cmp rax, 8
jb 0x140015c36
mov rdx, qword [rdi]
jmp 0x140015c39
mov rdx, rdi
cmp rax, 8
jb 0x140015c44
mov rcx, qword [rdi]
jmp 0x140015c47
mov rcx, rdi
sub r8, rsi
add r8, r8
lea rax, [r9 + rsi]
lea rdx, [rdx + rax*2]
lea rcx, [rcx + r9*2]
call fcn.14001aa60
mov r11, qword [rdi + 0x10]
sub r11, rsi
mov qword [rdi + 0x10], r11
cmp qword [rdi + 0x18], 8
jb 0x140015c75
mov rax, qword [rdi]
jmp 0x140015c78
mov rax, rdi
xor esi, esi
mov word [rax + r11*2], si
jmp 0x140015c83
xor esi, esi
cmp qword [rdi + 0x18], 8
jb 0x140015c8d
mov rdi, qword [rdi]
mov qword [rsp + 0x40], rsi
lea rax, [rsp + 0x58]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rsi
mov eax, dword [0x1400418d8]
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], esi
xor r9d, r9d
xor r8d, r8d
lea rdx, str.SYSTEMCurrentControlSetServicesBTHPORTParametersSupportedServices
mov rcx, qword [0x1400416c8]
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x140015d02
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
mov rdx, rdi
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
mov rdi, rbx
cmp rdi, r12
je 0x140015d2e
cmp qword [rdi + 0x18], 8
jb 0x140015d19
mov rcx, qword [rdi]
call fcn.14001a248
mov qword [rdi + 0x18], 7
mov qword [rdi + 0x10], rsi
mov word [rdi], si
add rdi, 0x28
jmp 0x140015d05
mov rcx, rbx
call fcn.14001a248
inc r15d
jmp 0x140015a25
test r13, r13
je 0x140015d78
mov rdi, r13
cmp rdi, r14
je 0x140015d6f
cmp qword [rdi + 0x18], 8
jb 0x140015d5a
mov rcx, qword [rdi]
call fcn.14001a248
mov qword [rdi + 0x18], 7
mov qword [rdi + 0x10], rsi
mov word [rdi], si
add rdi, 0x28
jmp 0x140015d46
mov rcx, r13
call fcn.14001a248
nop
mov rsi, qword [rsp + 0x68]
jmp 0x140015d84
mov qword [0x1400416c8], rsi
mov rcx, qword [rsp + 0xe8]
xor rcx, rsp
call fcn.140019650
lea r11, [rsp + 0xf0]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret