Function at 0x140205340
Capabilities:
Set registry value

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0xc8
mov rax, qword [0x1405420e0]
xor rax, rsp
mov qword [rbp + 7], rax
mov rdi, rdx
mov rbx, rcx
xor r15d, r15d
lea rcx, [rbp - 0x71]
mov rdx, r8
mov qword [rbp - 0x71], r15
mov r14b, r9b
mov rsi, r8
call fcn.140206a94
mov dword [rbp - 0x79], eax
test eax, eax
jne 0x1402054f5
movzx eax, r14b
lea r9d, [rax*2 + 1]
mov eax, dword [rdi + 0x10]
add eax, eax
cmp byte [rbp + 0x77], r15b
lea ecx, [rax + 2]
cmove ecx, eax
cmp qword [rdi + 0x18], 8
mov rax, rdi
jb 0x1402053b5
mov rax, qword [rdi]
cmp qword [rbx + 0x18], 8
mov rdx, rbx
jb 0x1402053c2
mov rdx, qword [rbx]
mov dword [rsp + 0x28], ecx
xor r8d, r8d
mov rcx, qword [rbp - 0x71]
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
nop dword [rax + rax]
mov dword [rbp - 0x79], eax
test eax, eax
je 0x140205508
call fcn.1400550c0
mov r10, qword [rax + 8]
cmp dword [r10], 3
jbe 0x1402054f2
cmp qword [rbx + 0x18], 8
lea rax, str.Failed_to_set_registry_key
mov qword [rbp - 0x49], rax
lea rax, [rbp - 0x79]
mov qword [rbp - 0x39], rax
mov qword [rbp - 0x41], 0x36
mov qword [rbp - 0x31], 4
jb 0x140205429
mov rbx, qword [rbx]
or rdx, 0xffffffffffffffff
lea rcx, [0x1403cb630]
mov r8, rcx
mov rax, r15
test rbx, rbx
je 0x14020544f
mov r8, rbx
mov rax, rdx
inc rax
cmp word [rbx + rax*2], r15w
jne 0x140205445
cmp qword [rsi + 0x18], 8
lea eax, [rax*2 + 2]
mov dword [rbp - 0x21], eax
mov qword [rbp - 0x29], r8
mov dword [rbp - 0x1d], r15d
jb 0x14020546b
mov rsi, qword [rsi]
mov r8, rcx
mov rax, r15
test rsi, rsi
je 0x140205486
mov r8, rsi
mov rax, rdx
inc rax
cmp word [rsi + rax*2], r15w
jne 0x14020547c
cmp qword [rdi + 0x18], 8
lea eax, [rax*2 + 2]
mov dword [rbp - 0x11], eax
mov qword [rbp - 0x19], r8
mov dword [rbp - 0xd], r15d
jb 0x1402054a2
mov rdi, qword [rdi]
mov rax, r15
test rdi, rdi
je 0x1402054ba
mov rcx, rdi
mov rax, rdx
inc rax
cmp word [rdi + rax*2], r15w
jne 0x1402054b0
lea eax, [rax*2 + 2]
mov qword [rbp - 9], rcx
mov dword [rbp - 1], eax
mov dword [rbp + 3], r15d
lea rax, [rbp - 0x69]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rdx, [0x140481e0a]
xor r8d, r8d
mov dword [rsp + 0x20], 7
mov rcx, r10
call fcn.140001208
mov eax, dword [rbp - 0x79]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x140205604
call fcn.1400550c0
mov r10, qword [rax + 8]
cmp dword [r10], 4
jbe 0x140205601
cmp qword [rbx + 0x18], 8
lea rax, str.Write_registry_value
mov qword [rbp - 0x49], rax
mov qword [rbp - 0x41], MsiGetActiveDatabase
jb 0x140205538
mov rbx, qword [rbx]
or rdx, 0xffffffffffffffff
lea rcx, [0x1403cb630]
mov r8, rcx
mov rax, r15
test rbx, rbx
je 0x14020555e
mov r8, rbx
mov rax, rdx
inc rax
cmp word [rbx + rax*2], r15w
jne 0x140205554
cmp qword [rsi + 0x18], 8
lea eax, [rax*2 + 2]
mov dword [rbp - 0x31], eax
mov qword [rbp - 0x39], r8
mov dword [rbp - 0x2d], r15d
jb 0x14020557a
mov rsi, qword [rsi]
mov r8, rcx
mov rax, r15
test rsi, rsi
je 0x140205595
mov r8, rsi
mov rax, rdx
inc rax
cmp word [rsi + rax*2], r15w
jne 0x14020558b
cmp qword [rdi + 0x18], 8
lea eax, [rax*2 + 2]
mov dword [rbp - 0x21], eax
mov qword [rbp - 0x29], r8
mov dword [rbp - 0x1d], r15d
jb 0x1402055b1
mov rdi, qword [rdi]
mov rax, r15
test rdi, rdi
je 0x1402055c9
mov rcx, rdi
mov rax, rdx
inc rax
cmp word [rdi + rax*2], r15w
jne 0x1402055bf
lea eax, [rax*2 + 2]
mov qword [rbp - 0x19], rcx
mov dword [rbp - 0x11], eax
mov dword [rbp - 0xd], r15d
lea rax, [rbp - 0x69]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rdx, [0x140481fbb]
xor r8d, r8d
mov dword [rsp + 0x20], 6
mov rcx, r10
call fcn.140001208
mov ebx, r15d
mov rcx, qword [rbp - 0x71]
test rcx, rcx
je 0x140205619
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
mov eax, ebx
mov rcx, qword [rbp + 7]
xor rcx, rsp
call fcn.140356560
add rsp, 0xc8
pop r15
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret