Function at 0x140009760
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
push rbp
lea rbp, [rsp - 0x57]
sub rsp, 0xc0
mov rax, qword [0x140084060]
xor rax, rsp
mov qword [rbp + 0x47], rax
xor ebx, ebx
mov dword [rbp - 0x11], ebx
lea rax, [rbp - 0x19]
mov qword [rsp + 0x20], rax
lea r9d, [rbx + 2]
xor r8d, r8d
lea rdx, str.SYSTEMCurrentControlSetControlTerminal_Server
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x1400098c7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r10, [rbp + 0x41]
nop
sub r10, 2
mov eax, 0xcccccccd
mul r9d
mov r8d, edx
shr r8d, 3
movzx ecx, r8w
shl cx, 2
lea edx, [rcx + r8]
add dx, dx
sub r9w, dx
add r9w, 0x30
mov word [r10], r9w
mov r9d, r8d
test r8d, r8d
jne 0x1400097c0
mov qword [rbp - 0x39], rbx
mov qword [rbp - 0x29], rbx
mov qword [rbp - 0x21], 7
mov word [rbp - 0x39], bx
lea rax, [rbp + 0x41]
cmp r10, rax
je 0x14000982b
lea r8, [rbp + 0x41]
sub r8, r10
sar r8, 1
mov rdx, r10
lea rcx, [rbp - 0x39]
call fcn.1400023b0
nop
lea r8, [rbp - 0x39]
lea rdx, str.Failed_to_open_registry_key._Error_code:
lea rcx, [rbp - 9]
call fcn.140006570
nop
mov rdx, qword [rbp - 0x21]
cmp rdx, 8
jb 0x140009880
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x39]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000987b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140009a4a
call fcn.14003ba0c
mov rdx, qword [rbp + 0xf]
cmp rdx, 8
jb 0x1400098c0
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 9]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400098bb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140009a44
call fcn.14003ba0c
xor al, al
jmp 0x140009a21
mov dword [rsp + 0x28], 4
lea rax, [rbp - 0x11]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.fDenyTSConnections
mov rcx, qword [rbp - 0x19]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x140009a15
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r10, [rbp + 0x41]
nop word [rax + rax]
sub r10, 2
mov eax, 0xcccccccd
mul r9d
shr edx, 3
movzx ecx, dx
shl cx, 2
lea r8d, [rcx + rdx]
add r8w, r8w
sub r9w, r8w
add r9w, 0x30
mov word [r10], r9w
mov r9d, edx
test edx, edx
jne 0x140009910
mov qword [rbp - 0x39], rbx
mov qword [rbp - 0x29], rbx
mov qword [rbp - 0x21], 7
mov word [rbp - 0x39], bx
lea rax, [rbp + 0x41]
cmp r10, rax
je 0x140009976
lea r8, [rbp + 0x41]
sub r8, r10
sar r8, 1
mov rdx, r10
lea rcx, [rbp - 0x39]
call fcn.1400023b0
nop
lea r8, [rbp - 0x39]
lea rdx, str.Failed_to_set_registry_value._Error_code:
lea rcx, [rbp - 9]
call fcn.140006570
nop
mov rdx, qword [rbp - 0x21]
cmp rdx, 8
jb 0x1400099c7
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x39]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400099c2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140009a3e
call fcn.14003ba0c
mov rcx, qword [rbp - 0x19]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdx, qword [rbp + 0xf]
cmp rdx, 8
jb 0x1400098c0
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 9]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400098bb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140009a44
jmp 0x1400098bb
mov rcx, qword [rbp - 0x19]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, 1
mov rcx, qword [rbp + 0x47]
xor rcx, rsp
call fcn.14003b9b0
mov rbx, qword [rsp + 0xd0]
add rsp, 0xc0
pop rbp
ret
call fcn.140042fc0
int3
call fcn.140042fc0
int3
call fcn.140042fc0
int3