Function at 0x1401d6420
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 [0x14049e510]
xor rax, rsp
mov qword [rbp + 7], rax
mov rbx, rdx
mov rdi, rcx
xor r15d, r15d
lea rcx, [rbp - 0x71]
mov rdx, r8
mov qword [rbp - 0x71], r15
mov r14b, r9b
mov rsi, r8
call fcn.1401d7804
mov dword [rbp - 0x79], eax
test eax, eax
jne 0x1401d65ce
movzx eax, r14b
lea r9d, [rax*2 + 1]
mov eax, dword [rbx + 0x10]
add eax, eax
cmp byte [rbp + 0x77], r15b
je 0x1401d6487
add eax, 2
cmp qword [rbx + 0x18], 8
mov rcx, rbx
jb 0x1401d6494
mov rcx, qword [rbx]
cmp qword [rdi + 0x18], 8
mov rdx, rdi
jb 0x1401d64a1
mov rdx, qword [rdi]
mov dword [rsp + 0x28], eax
xor r8d, r8d
mov qword [rsp + 0x20], rcx
mov rcx, qword [rbp - 0x71]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
mov dword [rbp - 0x79], eax
test eax, eax
je 0x1401d65e1
call fcn.14004d8a4
mov r10, qword [rax + 8]
cmp dword [r10], 3
jbe 0x1401d65cb
cmp qword [rdi + 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 0x1401d6502
mov rdi, qword [rdi]
or rdx, 0xffffffffffffffff
lea rcx, [0x140344690]
mov r8, rcx
mov rax, r15
test rdi, rdi
je 0x1401d6528
mov r8, rdi
mov rax, rdx
inc rax
cmp word [rdi + rax*2], r15w
jne 0x1401d651e
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 0x1401d6544
mov rsi, qword [rsi]
mov r8, rcx
mov rax, r15
test rsi, rsi
je 0x1401d655f
mov r8, rsi
mov rax, rdx
inc rax
cmp word [rsi + rax*2], r15w
jne 0x1401d6555
cmp qword [rbx + 0x18], 8
lea eax, [rax*2 + 2]
mov dword [rbp - 0x11], eax
mov qword [rbp - 0x19], r8
mov dword [rbp - 0xd], r15d
jb 0x1401d657b
mov rbx, qword [rbx]
mov rax, r15
test rbx, rbx
je 0x1401d6593
mov rcx, rbx
mov rax, rdx
inc rax
cmp word [rbx + rax*2], r15w
jne 0x1401d6589
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, [0x1403ddf2a]
xor r8d, r8d
mov dword [rsp + 0x20], 7
mov rcx, r10
call fcn.140001158
mov eax, dword [rbp - 0x79]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x1401d66dd
call fcn.14004d8a4
mov r10, qword [rax + 8]
cmp dword [r10], 4
jbe 0x1401d66da
cmp qword [rdi + 0x18], 8
lea rax, str.Write_registry_value
mov qword [rbp - 0x49], rax
mov qword [rbp - 0x41], MsiGetActiveDatabase
jb 0x1401d6611
mov rdi, qword [rdi]
or rdx, 0xffffffffffffffff
lea rcx, [0x140344690]
mov r8, rcx
mov rax, r15
test rdi, rdi
je 0x1401d6637
mov r8, rdi
mov rax, rdx
inc rax
cmp word [rdi + rax*2], r15w
jne 0x1401d662d
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 0x1401d6653
mov rsi, qword [rsi]
mov r8, rcx
mov rax, r15
test rsi, rsi
je 0x1401d666e
mov r8, rsi
mov rax, rdx
inc rax
cmp word [rsi + rax*2], r15w
jne 0x1401d6664
cmp qword [rbx + 0x18], 8
lea eax, [rax*2 + 2]
mov dword [rbp - 0x21], eax
mov qword [rbp - 0x29], r8
mov dword [rbp - 0x1d], r15d
jb 0x1401d668a
mov rbx, qword [rbx]
mov rax, r15
test rbx, rbx
je 0x1401d66a2
mov rcx, rbx
mov rax, rdx
inc rax
cmp word [rbx + rax*2], r15w
jne 0x1401d6698
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, [0x1403ddee9]
xor r8d, r8d
mov dword [rsp + 0x20], 6
mov rcx, r10
call fcn.140001158
mov ebx, r15d
mov rcx, qword [rbp - 0x71]
test rcx, rcx
je 0x1401d66ec
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov eax, ebx
mov rcx, qword [rbp + 7]
xor rcx, rsp
call fcn.1402dfdb0
add rsp, 0xc8
pop r15
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret