Function at 0x140002fd0
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 0x140003013
mov edi, 0x80004004
jmp 0x140003335
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 [0x14002a558]
mov edi, eax
test eax, eax
js 0x1400032dc
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 0x1400030e9
mov rcx, qword [rsi + 0x160]
mov rax, qword [rcx]
lea r8, [rbp - 0x28]
mov edx, 1
mov rax, qword [rax + 0x20]
call qword [0x14002a558]
mov edi, eax
test eax, eax
js 0x1400032dc
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 0x1400032dc
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 0x1400032dc
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 0x1400032dc
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 0x1400032dc
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 0x1400032dc
cmp dword [rbp + 0x40], 2
jne 0x140003216
mov rcx, qword [rbp - 0x20]
call fcn.14001510c
mov rcx, qword [rsi + 0x178]
mov rax, qword [rcx]
mov rax, qword [rax + 0x38]
call qword [0x14002a558]
jmp 0x1400032b5
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 0x1400032dc
mov rdi, qword [rbp - 0x30]
test rdi, rdi
je 0x140003294
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [rbp - 0x30], r15
mov rdi, qword [rbp + 0x50]
test rdi, rdi
je 0x1400032b5
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
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 [0x14002a558]
test eax, eax
je 0x14000322f
mov edi, r15d
mov rsi, qword [rbp + 0x50]
test rsi, rsi
je 0x1400032f9
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8, rsi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rsi, qword [rbp - 0x30]
test rsi, rsi
je 0x140003316
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8, rsi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rbp - 0x20]
test rcx, rcx
je 0x140003325
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rbp + 0x58]
test rcx, rcx
je 0x140003335
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