Function at 0x140004e54
Capabilities:
Check if file exists
Delete registry value
Get file attributes
Query or enumerate registry value
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x180]
sub rsp, 0x280
mov rax, qword [0x140017018]
xor rax, rsp
mov qword [rbp + 0x170], rax
mov r12, qword [rbp + 0x1d0]
lea rax, [rsp + 0x50]
mov rbx, rdx
mov qword [rsp + 0x20], rax
mov rsi, r9
lea rdx, str.Files
mov r15d, r8d
xor edi, edi
and qword [rsp + 0x50], rdi
mov rcx, rbx
and qword [rsp + 0x58], rdi
mov r9d, 0x2001f
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
nop dword [rax + rax]
test eax, eax
je 0x140004ef7
test r15d, r15d
je 0x140004ef7
lea r8, [rsp + 0x50]
mov rcx, rbx
lea rdx, str.Files
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
nop dword [rax + rax]
test eax, eax
jne 0x1400050fc
lea rax, [rsp + 0x58]
mov r9d, 0xf003f
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.FilesFlags
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
nop dword [rax + rax]
test eax, eax
je 0x140004f4c
test r15d, r15d
je 0x140004f4c
lea r8, [rsp + 0x58]
mov rcx, rbx
lea rdx, str.FilesFlags
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
nop dword [rax + rax]
test eax, eax
jne 0x1400050fc
mov rbx, qword [rsp + 0x50]
test rbx, rbx
je 0x140004ffe
xor edx, edx
mov dword [rsp + 0x40], 1
mov r8d, 0x208
mov dword [rsp + 0x48], 0x104
lea rcx, [rsp + 0x60]
call sub.msvcrt.dll_memset
xor edx, edx
mov rcx, rbx
mov r14d, 1
jmp 0x140004fcb
lea rcx, [rsp + 0x60]
mov dword [rsp + 0x48], 0x104
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
nop dword [rax + rax]
cmp eax, 0xffffffff
jne 0x140004fc0
mov rcx, qword [rsp + 0x50]
lea rdx, [rsp + 0x60]
xor r14d, r14d
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x50]
mov edx, r14d
inc r14d
and qword [rsp + 0x38], rdi
lea rax, [rsp + 0x40]
and qword [rsp + 0x30], rdi
lea r9, [rsp + 0x48]
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x60]
and qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_RegEnumValueW]
nop dword [rax + rax]
test eax, eax
je 0x140004f89
xor ebx, ebx
test r15d, r15d
je 0x14000510b
mov r14, r12
mov rdx, qword [rsi]
test rdx, rdx
je 0x1400050e8
mov rcx, qword [rsp + 0x50]
lea rax, [0x140013cb0]
mov dword [rsp + 0x28], 1
mov r9d, 1
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
nop dword [rax + rax]
test eax, eax
jne 0x1400050fc
test r12, r12
je 0x1400050e8
mov rcx, qword [rsi]
lea edx, [rax + 0x5c]
call qword [sym.imp.msvcrt.dll_wcsrchr]
nop dword [rax + rax]
test rax, rax
je 0x140005074
add rax, 2
jmp 0x140005077
mov rax, qword [rsi]
mov rcx, qword [rsp + 0x58]
lea r8, [rsp + 0x48]
and qword [rsp + 0x48], rdi
mov rdx, rax
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
nop dword [rax + rax]
test eax, eax
jne 0x1400050fc
mov eax, dword [r14]
lea rdx, str.RedirectToHKCU
mov rcx, qword [rsp + 0x48]
mov r9d, 4
mov dword [rsp + 0x40], eax
xor r8d, r8d
lea rax, [rsp + 0x40]
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
nop dword [rax + rax]
test eax, eax
jne 0x1400050fc
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop dword [rax + rax]
inc ebx
add rsi, 8
add r14, 4
cmp ebx, r15d
jae 0x14000510b
jmp 0x14000500c
jg 0x140005102
mov edi, eax
jmp 0x14000510b
movzx edi, ax
or edi, 0x80070000
mov rbx, qword [rsp + 0x50]
test rbx, rbx
je 0x140005124
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x14000513a
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop dword [rax + rax]
mov eax, edi
mov rcx, qword [rbp + 0x170]
xor rcx, rsp
call fcn.140001560
lea r11, [rsp + 0x280]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret