Function at 0x140002eb0
Capabilities:
Set registry value

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov rsi, rcx
lea rbx, [rcx + 0x18]
mov qword [rbp - 8], rbx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor r15d, r15d
cmp dword [rsi + 0x14], r15d
je 0x140002eea
nop
mov edi, 0x80004004
jmp 0x1400031cd
mov qword [rbp - 0x18], r15
mov qword [rbp + 0x58], r15
mov qword [rbp - 0x10], r15
mov qword [rbp - 0x20], r15
mov qword [rbp + 0x50], r15
mov rcx, qword [rsi + 0x160]
mov rax, qword [rcx]
lea r8, [rbp - 0x18]
xor edx, edx
mov rax, qword [rax + 0x20]
call qword [0x14002f570]
mov edi, eax
test eax, eax
js 0x140003192
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 - 0x18]
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp eax, 0x3fa
jne 0x140002fc0
mov rcx, qword [rsi + 0x160]
mov rax, qword [rcx]
lea r8, [rbp - 0x18]
mov edx, 1
mov rax, qword [rax + 0x20]
call qword [0x14002f570]
mov edi, eax
test eax, eax
js 0x140003192
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 - 0x18]
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 0x140003192
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 0x140003192
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 0x140003192
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 0x140003192
lea rax, [rbp + 0x40]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x10]
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 0x140003192
cmp dword [rbp + 0x40], 2
jne 0x1400030ed
mov rcx, qword [rbp - 0x10]
call fcn.140014dc0
mov rcx, qword [rsi + 0x178]
mov rax, qword [rcx]
mov rax, qword [rax + 0x38]
call qword [0x14002f570]
jmp 0x14000316b
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 - 0x20]
mov rcx, qword [rbp - 0x10]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
movzx edi, ax
or edi, r14d
test eax, eax
cmovle edi, eax
test edi, edi
js 0x140003192
mov rcx, qword [rbp - 0x20]
test rcx, rcx
je 0x140003159
call fcn.1400152f4
mov qword [rbp - 0x20], r15
mov rcx, qword [rbp + 0x50]
test rcx, rcx
je 0x14000316b
call fcn.1400152f4
mov qword [rbp + 0x50], r15
mov rcx, qword [rsi + 0x178]
mov rax, qword [rcx]
lea r8, [rbp + 0x50]
lea rdx, [rbp - 0x20]
mov rax, qword [rax + 0x40]
call qword [0x14002f570]
test eax, eax
je 0x140003103
mov edi, r15d
mov rcx, qword [rbp + 0x50]
test rcx, rcx
je 0x1400031a0
call fcn.1400152f4
mov rcx, qword [rbp - 0x20]
test rcx, rcx
je 0x1400031ae
call fcn.1400152f4
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x1400031bd
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rbp + 0x58]
test rcx, rcx
je 0x1400031cd
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
add rsp, 0x70
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret