Function at 0x140005188
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
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x180]
sub rsp, 0x280
mov rax, qword [0x140011008]
xor rax, rsp
mov qword [rbp + 0x170], rax
mov r12, qword [rbp + 0x1e0]
mov rbx, rdx
xor r13d, r13d
lea rax, [rsp + 0x48]
mov r14, r9
mov r15d, r8d
lea rdx, [0x140003458]
mov rcx, rbx
mov r9d, 0x2001f
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edi, r13d
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x58], r13
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x140005221
test r15d, r15d
je 0x140005221
lea r8, [rsp + 0x48]
lea rdx, [0x140003458]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x1400053e7
lea rax, [rsp + 0x58]
lea rdx, [0x140003468]
mov r9d, 0xf003f
xor r8d, r8d
mov rcx, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x14000526a
test r15d, r15d
je 0x14000526a
lea r8, [rsp + 0x58]
lea rdx, [0x140003468]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x1400053e7
mov rbx, qword [rsp + 0x48]
test rbx, rbx
je 0x14000530b
lea rcx, [rsp + 0x62]
xor edx, edx
mov r8d, Ordinal_519
mov esi, r13d
mov dword [rsp + 0x40], 1
mov dword [rsp + 0x50], 0x104
mov word [rsp + 0x60], r13w
call sub.msvcrt.dll_memset
xor edx, edx
mov rcx, rbx
jmp 0x1400052de
lea rcx, [rsp + 0x60]
inc esi
mov dword [rsp + 0x50], 0x104
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1400052d7
mov rcx, qword [rsp + 0x48]
lea rdx, [rsp + 0x60]
mov esi, r13d
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov rcx, qword [rsp + 0x48]
mov edx, esi
mov qword [rsp + 0x38], r13
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x50]
lea r8, [rsp + 0x60]
mov qword [rsp + 0x20], r13
call qword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
je 0x1400052aa
mov ebx, r13d
test r15d, r15d
je 0x1400053f5
mov rsi, r12
mov rdx, qword [r14]
test rdx, rdx
je 0x1400053d3
mov rcx, qword [rsp + 0x48]
lea rax, [0x140001218]
mov r9d, 1
xor r8d, r8d
mov dword [rsp + 0x28], 1
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x1400053e7
test r12, r12
je 0x1400053d3
mov rcx, qword [r14]
lea edx, [rax + 0x5c]
call qword [sym.imp.msvcrt.dll_wcsrchr]
test rax, rax
je 0x140005372
add rax, 2
jmp 0x140005375
mov rax, qword [r14]
mov rcx, qword [rsp + 0x58]
lea r8, [rsp + 0x50]
mov rdx, rax
mov qword [rsp + 0x50], r13
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x1400053e7
mov eax, dword [rsi]
mov rcx, qword [rsp + 0x50]
lea rdx, [0x140003480]
mov dword [rsp + 0x40], eax
lea rax, [rsp + 0x40]
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x1400053e7
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc ebx
add r14, 8
add rsi, 4
cmp ebx, r15d
jae 0x1400053f5
jmp 0x14000531a
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
mov rbx, qword [rsp + 0x48]
test rbx, rbx
je 0x140005408
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x140005418
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
mov rcx, qword [rbp + 0x170]
xor rcx, rsp
call fcn.14000faa0
mov rbx, qword [rsp + 0x2c0]
add rsp, 0x280
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret