Function at 0x140002f90
Capabilities:
Set registry value

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
mov qword [rbp - 0x18], 0xfffffffffffffffe
mov rsi, rcx
lea rbx, [rcx + 0x18]
mov qword [rbp - 0x10], rbx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor r15d, r15d
cmp dword [rsi + 0x14], r15d
je 0x140002fd4
mov edi, 0x80004004
jmp 0x1400032b7
mov qword [rbp - 0x28], r15
mov qword [rbp + 0x58], r15
mov qword [rbp - 0x20], r15
mov qword [rbp - 0x30], r15
mov qword [rbp + 0x50], r15
mov rcx, qword [rsi + 0x160]
mov rax, qword [rcx]
lea r8, [rbp - 0x28]
xor edx, edx
mov rax, qword [rax + 0x20]
call qword [0x14002a548]
mov edi, eax
test eax, eax
js 0x14000327c
lea rax, [rbp + 0x40]
mov qword [rsp + 0x40], rax
lea rax, [rbp + 0x58]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x2001f
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsi + 0x48]
mov rcx, qword [rbp - 0x28]
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp eax, 0x3fa
jne 0x1400030aa
mov rcx, qword [rsi + 0x160]
mov rax, qword [rcx]
lea r8, [rbp - 0x28]
mov edx, 1
mov rax, qword [rax + 0x20]
call qword [0x14002a548]
mov edi, eax
test eax, eax
js 0x14000327c
lea rax, [rbp + 0x40]
mov qword [rsp + 0x40], rax
lea rax, [rbp + 0x58]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x2001f
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsi + 0x48]
mov rcx, qword [rbp - 0x28]
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
movzx edi, ax
mov r14d, 0x80070000
or edi, r14d
test eax, eax
cmovle edi, eax
test edi, edi
js 0x14000327c
lea rax, [rsi + 0x148]
mov r12d, 4
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], rax
mov r9d, r12d
xor r8d, r8d
lea rdx, str.Type
mov rcx, qword [rbp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
movzx edi, ax
or edi, r14d
test eax, eax
cmovle edi, eax
test edi, edi
js 0x14000327c
lea rax, [rsi + 0x14c]
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], rax
mov r9d, r12d
xor r8d, r8d
lea rdx, str.DefaultDrive
mov rcx, qword [rbp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
movzx edi, ax
or edi, r14d
test eax, eax
cmovle edi, eax
test edi, edi
js 0x14000327c
lea rax, [rsi + 0x150]
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], rax
mov r9d, r12d
xor r8d, r8d
lea rdx, str.Priority
mov rcx, qword [rbp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
movzx edi, ax
or edi, r14d
test eax, eax
cmovle edi, eax
test edi, edi
js 0x14000327c
lea rax, [rbp + 0x40]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x20]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x2001f
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor r8d, r8d
lea rdx, str.Properties
mov rcx, qword [rbp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
movzx edi, ax
or edi, r14d
test eax, eax
cmovle edi, eax
test edi, edi
js 0x14000327c
cmp dword [rbp + 0x40], 2
jne 0x1400031d7
mov rcx, qword [rbp - 0x20]
call fcn.140014c20
mov rcx, qword [rsi + 0x178]
mov rax, qword [rcx]
mov rax, qword [rax + 0x38]
call qword [0x14002a548]
jmp 0x140003255
mov rcx, qword [rbp + 0x50]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [rax*2 + 2]
mov dword [rsp + 0x28], eax
mov rax, qword [rbp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, 1
xor r8d, r8d
mov rdx, qword [rbp - 0x30]
mov rcx, qword [rbp - 0x20]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
movzx edi, ax
or edi, r14d
test eax, eax
cmovle edi, eax
test edi, edi
js 0x14000327c
mov rcx, qword [rbp - 0x30]
test rcx, rcx
je 0x140003243
call fcn.14001519c
mov qword [rbp - 0x30], r15
mov rcx, qword [rbp + 0x50]
test rcx, rcx
je 0x140003255
call fcn.14001519c
mov qword [rbp + 0x50], r15
mov rcx, qword [rsi + 0x178]
mov rax, qword [rcx]
lea r8, [rbp + 0x50]
lea rdx, [rbp - 0x30]
mov rax, qword [rax + 0x40]
call qword [0x14002a548]
test eax, eax
je 0x1400031ed
mov edi, r15d
mov rcx, qword [rbp + 0x50]
test rcx, rcx
je 0x14000328a
call fcn.14001519c
mov rcx, qword [rbp - 0x30]
test rcx, rcx
je 0x140003298
call fcn.14001519c
mov rcx, qword [rbp - 0x20]
test rcx, rcx
je 0x1400032a7
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rbp + 0x58]
test rcx, rcx
je 0x1400032b7
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
add rsp, 0x80
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret