Function at 0x140112ee0
Capabilities:
Check if file exists
Get common file path
Get file attributes
Query environment variable
Query or enumerate registry value

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x2648]
mov eax, 0x2748
call fcn.1401e2b90
sub rsp, rax
mov rax, qword [0x1402e8100]
xor rax, rsp
mov qword [rbp + 0x2630], rax
mov qword [rbp - 0x48], r9
mov r15, r8
mov rsi, rdx
mov qword [rbp - 0x78], rcx
mov rax, qword [rbp + 0x26b8]
mov qword [rbp - 0x50], rax
mov r13, qword [rbp + 0x26c0]
mov qword [rbp - 0x38], r13
xor r14d, r14d
xor edx, edx
mov r8d, 0x2000
lea rcx, [rbp + 0x630]
call fcn.14026a0b0
lea rcx, [rbp - 0x30]
call fcn.1400dc8b0
nop
mov rdx, rsi
lea rcx, [rsp + 0x68]
call fcn.1400d37f0
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.1401099d0
mov rdi, rax
cmp rsi, rax
je 0x140112fa8
mov rcx, rsi
call fcn.1400d40a0
mov rcx, rdi
call fcn.1400d40a0
mov rbx, rax
mov rcx, rsi
call fcn.1400d40c0
mov rcx, rbx
call fcn.1400d5290
mov rdx, rdi
mov rcx, rsi
call fcn.1400d4170
lea rcx, [rsp + 0x40]
call fcn.1400d3780
mov rdx, rsi
lea rcx, [rbp - 8]
call fcn.140109260
nop
cmp dword [0x1403b7f7c], 9
ja 0x1401130b2
lea rcx, str.ext_ms_
call fcn.1400ce290
mov rdi, rax
mov rbx, qword [rbp + 8]
lea rcx, [rbp - 8]
call fcn.1400d4330
mov r13, rax
cmp rdi, rbx
ja 0x1401130ae
sub rbx, rdi
test rdi, rdi
je 0x140113068
lea r12, [rbx*2]
mov rbx, rax
nop word [rax + rax]
lea rax, [r13 + 2]
add rax, r12
sub rax, rbx
sar rax, 1
mov rcx, r14
je 0x14011303e
cmp word [rbx], 0x65
je 0x14011303b
cmp rax, 1
je 0x14011303e
dec rax
add rbx, 2
cmp word [rbx], 0x65
jne 0x140113028
mov rcx, rbx
mov rbx, rcx
test rcx, rcx
je 0x1401130ae
mov r8, rdi
lea rdx, str.ext_ms_
call fcn.1400d43d0
test eax, eax
je 0x14011305f
add rbx, 2
jmp 0x140113010
sub rbx, r13
cmp rbx, 2
jae 0x1401130ae
mov qword [rbp + 0x18], 4
mov rax, qword [rbp + 8]
mov qword [rsp + 0x60], rax
lea rdx, [rsp + 0x60]
lea rcx, [rbp + 0x18]
call fcn.1400adfe0
mov rbx, qword [rax]
mov rdi, qword [rbp + 8]
lea rcx, [rbp - 8]
call fcn.1400da100
sub rdi, rbx
lea r8, [rdi + 1]
lea rdx, [rax + rbx*2]
mov rcx, rax
call fcn.1400eb840
mov qword [rbp + 8], rdi
mov r13, qword [rbp - 0x38]
mov rdi, qword [rbp - 0x78]
add rdi, 8
mov rax, qword [rdi]
mov qword [rbp - 0x78], rax
mov rdx, rdi
lea rcx, [rbp - 0x78]
call fcn.140072660
mov rbx, qword [rbp - 0x78]
mov rax, qword [rdi]
mov rcx, qword [rax]
mov qword [rbp + 0x18], rcx
mov rdx, rdi
lea rcx, [rbp + 0x18]
call fcn.140072660
mov rax, qword [rbp + 0x18]
mov qword [rbp - 0x10], rax
xor edx, edx
lea rcx, [rbp - 0x10]
call fcn.140072660
mov qword [rbp - 0x38], rbx
xor edx, edx
lea rcx, [rbp - 0x38]
call fcn.140072660
mov rbx, qword [rbp - 0x10]
cmp rbx, qword [rbp - 0x38]
je 0x14011313f
lea rcx, [rbx + 0x10]
call fcn.1400d3710
mov rdx, rax
lea rcx, [rbp - 8]
call fcn.140114650
mov rbx, qword [rbp - 0x10]
cmp rax, 0xffffffffffffffff
jne 0x14011313f
mov rbx, qword [rbx]
mov qword [rbp - 0x10], rbx
cmp rbx, qword [rbp - 0x38]
jne 0x140113113
mov rax, qword [rdi]
mov qword [rsp + 0x60], rax
mov rdx, rdi
lea rcx, [rsp + 0x60]
call fcn.140072660
cmp rbx, qword [rsp + 0x60]
je 0x140113283
mov rcx, qword [rbx + 0x30]
cmp rcx, qword [rbx + 0x38]
je 0x140113183
mov rdx, r15
call fcn.1400d49f0
test al, al
jne 0x14011317b
mov r15, qword [rbx + 0x30]
jmp 0x140113183
mov r15, qword [rbx + 0x38]
sub r15, 0x20
mov rcx, rsi
mov rdx, r15
call fcn.1400eadc0
mov r9, r13
mov r8, qword [rbp - 0x50]
mov rdx, rsi
call fcn.140113b10
mov edx, 0x80000000
lea ecx, [rax + rdx]
test edx, ecx
jne 0x140113aa0
cmp eax, 0xc015001d
je 0x140113aa0
test byte [rbp + 0x26b0], 2
je 0x140113aa3
xor edx, edx
mov r8d, 0x1fe
lea rcx, [rbp + 0x30]
call fcn.14026a0b0
mov edx, 0xff
lea rcx, [rbp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea rdx, [rbp + 0x30]
lea rcx, [rbp - 0x70]
call fcn.1400d3870
mov rbx, rax
lea rcx, [0x1402aaf5c]
call fcn.1400ce290
mov rcx, rax
call fcn.1400cf3e0
mov r8, rax
lea rdx, [0x1402aaf5c]
mov rcx, rbx
call fcn.140116510
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.1400d37f0
nop
mov rbx, qword [rsi + 0x10]
mov rcx, rsi
call fcn.1400d4330
mov r8, rbx
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.140116510
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.1400d37f0
lea rdx, [rsp + 0x40]
mov rcx, rsi
call fcn.1400eae20
lea rcx, [rsp + 0x40]
call fcn.1400d3780
nop
lea rcx, [rsp + 0x68]
call fcn.1400d3780
nop
lea rcx, [rbp - 0x70]
call fcn.1400d3780
jmp 0x140113aa3
mov r15d, dword [rbp + 0x26b0]
test r15b, 1
jne 0x1401132c3
mov r9, r13
mov r13, qword [rbp - 0x50]
mov r8, r13
mov rdx, rsi
call fcn.140113b10
mov edx, 0x80000000
lea ecx, [rax + rdx]
test edx, ecx
jne 0x140113aa0
cmp eax, 0xc015001d
je 0x140113aa0
test r15b, 4
je 0x1401132ce
mov r14d, 0xc0000225
jmp 0x140113aa3
mov rcx, rsi
call fcn.1400d3710
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140113aa3
mov qword [rbp + 0x20], r14
lea r8, [rbp + 0x20]
lea rdx, [0x1402aaf60]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
movsxd rdi, eax
test eax, eax
jne 0x1401133f3
mov ebx, r14d
test rdi, rdi
jne 0x1401133f3
xor edx, edx
mov r8d, 0x1fe
lea rcx, [rbp + 0x430]
call fcn.14026a0b0
xor edx, edx
mov r8d, 0x1fe
lea rcx, [rbp + 0x230]
call fcn.14026a0b0
mov dword [rbp - 0x38], 0xff
mov dword [rbp - 0x10], r14d
lea rax, [rbp - 0x38]
mov qword [rsp + 0x38], rax
lea rax, [rbp + 0x230]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x10]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r14
lea r9, [rbp - 0x38]
lea r8, [rbp + 0x430]
mov edx, ebx
mov rcx, qword [rbp + 0x20]
call qword [sym.imp.ADVAPI32.dll_RegEnumValueW]
movsxd rdi, eax
lea rcx, [rbp - 8]
call fcn.1400d3710
mov rdx, rax
lea rcx, [rbp + 0x230]
call fcn.14023abcc
test eax, eax
jne 0x1401133e5
xor edx, edx
mov r8d, 0x1fe
lea rcx, [rbp + 0x30]
call fcn.14026a0b0
mov dword [rbp - 0x38], 0xff
mov edx, 0xff
lea rcx, [rbp + 0x30]
test r15b, 8
je 0x1401133d6
call qword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
jmp 0x1401133dc
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test rdi, rdi
je 0x1401135a2
inc ebx
cmp ebx, 0x1000
jl 0x140113312
mov rax, qword [rbp - 0x48]
cmp qword [rax + 0x10], 0
je 0x1401134a4
lea r8, [0x1402aaf5c]
mov rdx, rax
lea rcx, [rbp - 0x70]
call fcn.1401157e0
mov rdi, rax
mov rbx, qword [rbp + 8]
lea rcx, [rbp - 8]
call fcn.1400d4330
mov r8, rbx
mov rdx, rax
mov rcx, rdi
call fcn.140116510
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.1400d37f0
lea rcx, [rbp - 0x30]
call fcn.1400d40a0
lea rcx, [rsp + 0x40]
call fcn.1400d40a0
mov rbx, rax
lea rcx, [rbp - 0x30]
call fcn.1400d40c0
mov rcx, rbx
call fcn.1400d5290
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x30]
call fcn.1400d4170
lea rcx, [rsp + 0x40]
call fcn.1400d3780
nop
lea rcx, [rbp - 0x70]
call fcn.1400d3780
lea rcx, [rbp - 0x30]
call fcn.1400d3710
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140113912
mov r8d, dword [r13 + 8]
lea rdx, [rbp - 0x70]
call fcn.140114070
mov rbx, rax
lea rcx, [0x1402aaf5c]
call fcn.1400ce290
mov rcx, rax
call fcn.1400cf3e0
mov r8, rax
lea rdx, [0x1402aaf5c]
mov rcx, rbx
call fcn.140116510
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.1400d37f0
nop
mov rbx, qword [rbp + 8]
lea rcx, [rbp - 8]
call fcn.1400d4330
mov r8, rbx
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.140116510
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.1400d37f0
lea rcx, [rbp - 0x30]
call fcn.1400d40a0
lea rcx, [rsp + 0x40]
call fcn.1400d40a0
mov rbx, rax
lea rcx, [rbp - 0x30]
call fcn.1400d40c0
mov rcx, rbx
call fcn.1400d5290
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x30]
call fcn.1400d4170
lea rcx, [rsp + 0x40]
call fcn.1400d3780
nop
lea rcx, [rsp + 0x68]
call fcn.1400d3780
nop
lea rcx, [rbp - 0x70]
call fcn.1400d3780
lea rcx, [rbp - 0x30]
call fcn.1400d3710
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140113912
mov edx, 0x1000
lea rcx, [rbp + 0x630]
test r15b, 8
je 0x14011364c
call qword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
jmp 0x140113652
lea rdx, [rbp + 0x30]
lea rcx, [rbp - 0x70]
call fcn.1400d3870
mov rbx, rax
lea rcx, [0x1402aaf5c]
call fcn.1400ce290
mov rcx, rax
call fcn.1400cf3e0
mov r8, rax
lea rdx, [0x1402aaf5c]
mov rcx, rbx
call fcn.140116510
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.1400d37f0
nop
lea rcx, [rbp + 0x230]
call fcn.1400ce290
mov rcx, rax
call fcn.1400cf3e0
mov r8, rax
lea rdx, [rbp + 0x230]
lea rcx, [rsp + 0x40]
call fcn.140116510
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.1400d37f0
lea rdx, [rsp + 0x68]
mov rcx, rsi
call fcn.1400eae20
lea rcx, [rsp + 0x68]
call fcn.1400d3780
nop
lea rcx, [rsp + 0x40]
call fcn.1400d3780
nop
lea rcx, [rbp - 0x70]
call fcn.1400d3780
jmp 0x140113a8f
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea rdx, [rbp + 0x630]
lea rcx, [rbp - 0x70]
call fcn.1400d3870
mov rbx, rax
lea rcx, [0x1402aaf5c]
call fcn.1400ce290
mov rcx, rax
call fcn.1400cf3e0
mov r8, rax
lea rdx, [0x1402aaf5c]
mov rcx, rbx
call fcn.140116510
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.1400d37f0
nop
mov rbx, qword [rbp + 8]
lea rcx, [rbp - 8]
call fcn.1400d4330
mov r8, rbx
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.140116510
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.1400d37f0
lea rcx, [rbp - 0x30]
call fcn.1400d40a0
lea rcx, [rsp + 0x40]
call fcn.1400d40a0
mov rbx, rax
lea rcx, [rbp - 0x30]
call fcn.1400d40c0
mov rcx, rbx
call fcn.1400d5290
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x30]
call fcn.1400d4170
lea rcx, [rsp + 0x40]
call fcn.1400d3780
nop
lea rcx, [rsp + 0x68]
call fcn.1400d3780
nop
lea rcx, [rbp - 0x70]
call fcn.1400d3780
lea rcx, [rbp - 0x30]
call fcn.1400d3710
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140113912
mov edx, 0x1000
lea rcx, [rbp + 0x630]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea rdx, [rbp + 0x630]
lea rcx, [rbp - 0x70]
call fcn.1400d3870
mov rbx, rax
lea rcx, [0x1402aaf5c]
call fcn.1400ce290
mov rcx, rax
call fcn.1400cf3e0
mov r8, rax
lea rdx, [0x1402aaf5c]
mov rcx, rbx
call fcn.140116510
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.1400d37f0
nop
mov rbx, qword [rbp + 8]
lea rcx, [rbp - 8]
call fcn.1400d4330
mov r8, rbx
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.140116510
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.1400d37f0
lea rcx, [rbp - 0x30]
call fcn.1400d40a0
lea rcx, [rsp + 0x40]
call fcn.1400d40a0
mov rbx, rax
lea rcx, [rbp - 0x30]
call fcn.1400d40c0
mov rcx, rbx
call fcn.1400d5290
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x30]
call fcn.1400d4170
lea rcx, [rsp + 0x40]
call fcn.1400d3780
nop
lea rcx, [rsp + 0x68]
call fcn.1400d3780
nop
lea rcx, [rbp - 0x70]
call fcn.1400d3780
lea rcx, [rbp - 0x30]
call fcn.1400d3710
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140113912
lea rdx, [rbp + 0x630]
mov ecx, 0x1000
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea rdx, [rbp + 0x630]
lea rcx, [rbp - 0x70]
call fcn.1400d3870
mov rbx, rax
lea rcx, [0x1402aaf5c]
call fcn.1400ce290
mov rcx, rax
call fcn.1400cf3e0
mov r8, rax
lea rdx, [0x1402aaf5c]
mov rcx, rbx
call fcn.140116510
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.1400d37f0
nop
mov rbx, qword [rbp + 8]
lea rcx, [rbp - 8]
call fcn.1400d4330
mov r8, rbx
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.140116510
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.1400d37f0
lea rcx, [rbp - 0x30]
call fcn.1400d40a0
lea rcx, [rsp + 0x40]
call fcn.1400d40a0
mov rbx, rax
lea rcx, [rbp - 0x30]
call fcn.1400d40c0
mov rcx, rbx
call fcn.1400d5290
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x30]
call fcn.1400d4170
lea rcx, [rsp + 0x40]
call fcn.1400d3780
nop
lea rcx, [rsp + 0x68]
call fcn.1400d3780
nop
lea rcx, [rbp - 0x70]
call fcn.1400d3780
lea rcx, [rbp - 0x30]
call fcn.1400d3710
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140113950
lea rax, [rbp - 0x30]
cmp rsi, rax
je 0x140113a8f
mov rcx, rsi
call fcn.1400d40a0
lea rcx, [rbp - 0x30]
call fcn.1400d4080
mov rbx, qword [rbp - 0x20]
lea rcx, [rbp - 0x30]
call fcn.1400d4330
mov r8, rbx
mov rdx, rax
mov rcx, rsi
call fcn.1400eb530
jmp 0x140113a8f
mov r8d, 0x1000
lea rdx, [rbp + 0x630]
lea rcx, str.PATH
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea r8, [rbp - 0x40]
lea rdx, [0x1402aafe8]
lea rcx, [rbp + 0x630]
call fcn.14023aee8
test rax, rax
je 0x140113a89
nop word [rax + rax]
mov rdx, rax
lea rcx, [rbp - 0x70]
call fcn.1400d3870
mov rbx, rax
lea rcx, [0x1402aaf5c]
call fcn.1400ce290
mov rcx, rax
call fcn.1400cf3e0
mov r8, rax
lea rdx, [0x1402aaf5c]
mov rcx, rbx
call fcn.140116510
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.1400d37f0
nop
mov rbx, qword [rbp + 8]
lea rcx, [rbp - 8]
call fcn.1400d4330
mov r8, rbx
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.140116510
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.1400d37f0
lea rcx, [rbp - 0x30]
call fcn.1400d40a0
lea rcx, [rsp + 0x40]
call fcn.1400d40a0
mov rbx, rax
lea rcx, [rbp - 0x30]
call fcn.1400d40c0
mov rcx, rbx
call fcn.1400d5290
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x30]
call fcn.1400d4170
lea rcx, [rsp + 0x40]
call fcn.1400d3780
nop
lea rcx, [rsp + 0x68]
call fcn.1400d3780
nop
lea rcx, [rbp - 0x70]
call fcn.1400d3780
lea rcx, [rbp - 0x30]
call fcn.1400d3710
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140113912
lea r8, [rbp - 0x40]
lea rdx, [0x1402aafe8]
mov rcx, qword [rbp - 0x40]
call fcn.14023aee8
test rax, rax
jne 0x140113990
mov r14d, 0xc0000225
mov rcx, qword [rbp + 0x20]
test rcx, rcx
jle 0x140113aa3
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140113aa3
mov r14d, eax
lea rcx, [rbp - 8]
call fcn.1400d3780
nop
lea rcx, [rbp - 0x30]
call fcn.1400d3780
mov eax, r14d
mov rcx, qword [rbp + 0x2630]
xor rcx, rsp
call fcn.1401e1ca0
add rsp, 0x2748
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret