Function at 0x140115010
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.1401e4f40
sub rsp, rax
mov rax, qword [0x1402ea100]
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.14026c460
lea rcx, [rbp - 0x30]
call fcn.1400dde00
nop
mov rdx, rsi
lea rcx, [rsp + 0x68]
call fcn.1400d3970
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.14010bb00
mov rdi, rax
cmp rsi, rax
je 0x1401150d8
mov rcx, rsi
call fcn.1400d4220
mov rcx, rdi
call fcn.1400d4220
mov rbx, rax
mov rcx, rsi
call fcn.1400d4240
mov rcx, rbx
call fcn.1400d5410
mov rdx, rdi
mov rcx, rsi
call fcn.1400d42f0
lea rcx, [rsp + 0x40]
call fcn.1400d3900
mov rdx, rsi
lea rcx, [rbp - 8]
call fcn.14010b390
nop
cmp dword [0x140380abc], 9
ja 0x1401151e2
lea rcx, [0x1402acfc0]
call fcn.1400ce070
mov rdi, rax
mov rbx, qword [rbp + 8]
lea rcx, [rbp - 8]
call fcn.1400d44b0
mov r13, rax
cmp rdi, rbx
ja 0x1401151de
sub rbx, rdi
test rdi, rdi
je 0x140115198
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 0x14011516e
cmp word [rbx], 0x65
je 0x14011516b
cmp rax, 1
je 0x14011516e
dec rax
add rbx, 2
cmp word [rbx], 0x65
jne 0x140115158
mov rcx, rbx
mov rbx, rcx
test rcx, rcx
je 0x1401151de
mov r8, rdi
lea rdx, [0x1402acfc0]
call fcn.1400d4550
test eax, eax
je 0x14011518f
add rbx, 2
jmp 0x140115140
sub rbx, r13
cmp rbx, 2
jae 0x1401151de
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.1400ae310
mov rbx, qword [rax]
mov rdi, qword [rbp + 8]
lea rcx, [rbp - 8]
call fcn.1400da280
sub rdi, rbx
lea r8, [rdi + 1]
lea rdx, [rax + rbx*2]
mov rcx, rax
call fcn.1400ed9a0
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 0x14011526f
lea rcx, [rbx + 0x10]
call fcn.1400d3890
mov rdx, rax
lea rcx, [rbp - 8]
call fcn.140116780
mov rbx, qword [rbp - 0x10]
cmp rax, 0xffffffffffffffff
jne 0x14011526f
mov rbx, qword [rbx]
mov qword [rbp - 0x10], rbx
cmp rbx, qword [rbp - 0x38]
jne 0x140115243
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 0x1401153b3
mov rcx, qword [rbx + 0x30]
cmp rcx, qword [rbx + 0x38]
je 0x1401152b3
mov rdx, r15
call fcn.1400d4b70
test al, al
jne 0x1401152ab
mov r15, qword [rbx + 0x30]
jmp 0x1401152b3
mov r15, qword [rbx + 0x38]
sub r15, 0x20
mov rcx, rsi
mov rdx, r15
call fcn.1400ecf20
mov r9, r13
mov r8, qword [rbp - 0x50]
mov rdx, rsi
call fcn.140115c40
mov edx, 0x80000000
lea ecx, [rax + rdx]
test edx, ecx
jne 0x140115bd0
cmp eax, 0xc015001d
je 0x140115bd0
test byte [rbp + 0x26b0], 2
je 0x140115bd3
xor edx, edx
mov r8d, 0x1fe
lea rcx, [rbp + 0x30]
call fcn.14026c460
mov edx, 0xff
lea rcx, [rbp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea rdx, [rbp + 0x30]
lea rcx, [rbp - 0x70]
call fcn.1400d39f0
mov rbx, rax
lea rcx, [0x1402acfbc]
call fcn.1400ce070
mov rcx, rax
call fcn.1400cf110
mov r8, rax
lea rdx, [0x1402acfbc]
mov rcx, rbx
call fcn.140118640
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.1400d3970
nop
mov rbx, qword [rsi + 0x10]
mov rcx, rsi
call fcn.1400d44b0
mov r8, rbx
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.140118640
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.1400d3970
lea rdx, [rsp + 0x40]
mov rcx, rsi
call fcn.1400ecf80
lea rcx, [rsp + 0x40]
call fcn.1400d3900
nop
lea rcx, [rsp + 0x68]
call fcn.1400d3900
nop
lea rcx, [rbp - 0x70]
call fcn.1400d3900
jmp 0x140115bd3
mov r15d, dword [rbp + 0x26b0]
test r15b, 1
jne 0x1401153f3
mov r9, r13
mov r13, qword [rbp - 0x50]
mov r8, r13
mov rdx, rsi
call fcn.140115c40
mov edx, 0x80000000
lea ecx, [rax + rdx]
test edx, ecx
jne 0x140115bd0
cmp eax, 0xc015001d
je 0x140115bd0
test r15b, 4
je 0x1401153fe
mov r14d, 0xc0000225
jmp 0x140115bd3
mov rcx, rsi
call fcn.1400d3890
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140115bd3
mov qword [rbp + 0x20], r14
lea r8, [rbp + 0x20]
lea rdx, str.SYSTEMCurrentControlSetControlSession_ManagerKnownDLLs
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
movsxd rdi, eax
test eax, eax
jne 0x140115523
mov ebx, r14d
test rdi, rdi
jne 0x140115523
xor edx, edx
mov r8d, 0x1fe
lea rcx, [rbp + 0x430]
call fcn.14026c460
xor edx, edx
mov r8d, 0x1fe
lea rcx, [rbp + 0x230]
call fcn.14026c460
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.1400d3890
mov rdx, rax
lea rcx, [rbp + 0x230]
call fcn.14023cf80
test eax, eax
jne 0x140115515
xor edx, edx
mov r8d, 0x1fe
lea rcx, [rbp + 0x30]
call fcn.14026c460
mov dword [rbp - 0x38], 0xff
mov edx, 0xff
lea rcx, [rbp + 0x30]
test r15b, 8
je 0x140115506
call qword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
jmp 0x14011550c
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test rdi, rdi
je 0x1401156d2
inc ebx
cmp ebx, 0x1000
jl 0x140115442
mov rax, qword [rbp - 0x48]
cmp qword [rax + 0x10], 0
je 0x1401155d4
lea r8, [0x1402acfbc]
mov rdx, rax
lea rcx, [rbp - 0x70]
call fcn.140117910
mov rdi, rax
mov rbx, qword [rbp + 8]
lea rcx, [rbp - 8]
call fcn.1400d44b0
mov r8, rbx
mov rdx, rax
mov rcx, rdi
call fcn.140118640
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.1400d3970
lea rcx, [rbp - 0x30]
call fcn.1400d4220
lea rcx, [rsp + 0x40]
call fcn.1400d4220
mov rbx, rax
lea rcx, [rbp - 0x30]
call fcn.1400d4240
mov rcx, rbx
call fcn.1400d5410
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x30]
call fcn.1400d42f0
lea rcx, [rsp + 0x40]
call fcn.1400d3900
nop
lea rcx, [rbp - 0x70]
call fcn.1400d3900
lea rcx, [rbp - 0x30]
call fcn.1400d3890
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140115a42
mov r8d, dword [r13 + 8]
lea rdx, [rbp - 0x70]
call fcn.1401161a0
mov rbx, rax
lea rcx, [0x1402acfbc]
call fcn.1400ce070
mov rcx, rax
call fcn.1400cf110
mov r8, rax
lea rdx, [0x1402acfbc]
mov rcx, rbx
call fcn.140118640
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.1400d3970
nop
mov rbx, qword [rbp + 8]
lea rcx, [rbp - 8]
call fcn.1400d44b0
mov r8, rbx
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.140118640
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.1400d3970
lea rcx, [rbp - 0x30]
call fcn.1400d4220
lea rcx, [rsp + 0x40]
call fcn.1400d4220
mov rbx, rax
lea rcx, [rbp - 0x30]
call fcn.1400d4240
mov rcx, rbx
call fcn.1400d5410
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x30]
call fcn.1400d42f0
lea rcx, [rsp + 0x40]
call fcn.1400d3900
nop
lea rcx, [rsp + 0x68]
call fcn.1400d3900
nop
lea rcx, [rbp - 0x70]
call fcn.1400d3900
lea rcx, [rbp - 0x30]
call fcn.1400d3890
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140115a42
mov edx, 0x1000
lea rcx, [rbp + 0x630]
test r15b, 8
je 0x14011577c
call qword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
jmp 0x140115782
lea rdx, [rbp + 0x30]
lea rcx, [rbp - 0x70]
call fcn.1400d39f0
mov rbx, rax
lea rcx, [0x1402acfbc]
call fcn.1400ce070
mov rcx, rax
call fcn.1400cf110
mov r8, rax
lea rdx, [0x1402acfbc]
mov rcx, rbx
call fcn.140118640
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.1400d3970
nop
lea rcx, [rbp + 0x230]
call fcn.1400ce070
mov rcx, rax
call fcn.1400cf110
mov r8, rax
lea rdx, [rbp + 0x230]
lea rcx, [rsp + 0x40]
call fcn.140118640
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.1400d3970
lea rdx, [rsp + 0x68]
mov rcx, rsi
call fcn.1400ecf80
lea rcx, [rsp + 0x68]
call fcn.1400d3900
nop
lea rcx, [rsp + 0x40]
call fcn.1400d3900
nop
lea rcx, [rbp - 0x70]
call fcn.1400d3900
jmp 0x140115bbf
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea rdx, [rbp + 0x630]
lea rcx, [rbp - 0x70]
call fcn.1400d39f0
mov rbx, rax
lea rcx, [0x1402acfbc]
call fcn.1400ce070
mov rcx, rax
call fcn.1400cf110
mov r8, rax
lea rdx, [0x1402acfbc]
mov rcx, rbx
call fcn.140118640
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.1400d3970
nop
mov rbx, qword [rbp + 8]
lea rcx, [rbp - 8]
call fcn.1400d44b0
mov r8, rbx
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.140118640
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.1400d3970
lea rcx, [rbp - 0x30]
call fcn.1400d4220
lea rcx, [rsp + 0x40]
call fcn.1400d4220
mov rbx, rax
lea rcx, [rbp - 0x30]
call fcn.1400d4240
mov rcx, rbx
call fcn.1400d5410
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x30]
call fcn.1400d42f0
lea rcx, [rsp + 0x40]
call fcn.1400d3900
nop
lea rcx, [rsp + 0x68]
call fcn.1400d3900
nop
lea rcx, [rbp - 0x70]
call fcn.1400d3900
lea rcx, [rbp - 0x30]
call fcn.1400d3890
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140115a42
mov edx, 0x1000
lea rcx, [rbp + 0x630]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea rdx, [rbp + 0x630]
lea rcx, [rbp - 0x70]
call fcn.1400d39f0
mov rbx, rax
lea rcx, [0x1402acfbc]
call fcn.1400ce070
mov rcx, rax
call fcn.1400cf110
mov r8, rax
lea rdx, [0x1402acfbc]
mov rcx, rbx
call fcn.140118640
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.1400d3970
nop
mov rbx, qword [rbp + 8]
lea rcx, [rbp - 8]
call fcn.1400d44b0
mov r8, rbx
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.140118640
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.1400d3970
lea rcx, [rbp - 0x30]
call fcn.1400d4220
lea rcx, [rsp + 0x40]
call fcn.1400d4220
mov rbx, rax
lea rcx, [rbp - 0x30]
call fcn.1400d4240
mov rcx, rbx
call fcn.1400d5410
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x30]
call fcn.1400d42f0
lea rcx, [rsp + 0x40]
call fcn.1400d3900
nop
lea rcx, [rsp + 0x68]
call fcn.1400d3900
nop
lea rcx, [rbp - 0x70]
call fcn.1400d3900
lea rcx, [rbp - 0x30]
call fcn.1400d3890
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140115a42
lea rdx, [rbp + 0x630]
mov ecx, 0x1000
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea rdx, [rbp + 0x630]
lea rcx, [rbp - 0x70]
call fcn.1400d39f0
mov rbx, rax
lea rcx, [0x1402acfbc]
call fcn.1400ce070
mov rcx, rax
call fcn.1400cf110
mov r8, rax
lea rdx, [0x1402acfbc]
mov rcx, rbx
call fcn.140118640
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.1400d3970
nop
mov rbx, qword [rbp + 8]
lea rcx, [rbp - 8]
call fcn.1400d44b0
mov r8, rbx
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.140118640
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.1400d3970
lea rcx, [rbp - 0x30]
call fcn.1400d4220
lea rcx, [rsp + 0x40]
call fcn.1400d4220
mov rbx, rax
lea rcx, [rbp - 0x30]
call fcn.1400d4240
mov rcx, rbx
call fcn.1400d5410
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x30]
call fcn.1400d42f0
lea rcx, [rsp + 0x40]
call fcn.1400d3900
nop
lea rcx, [rsp + 0x68]
call fcn.1400d3900
nop
lea rcx, [rbp - 0x70]
call fcn.1400d3900
lea rcx, [rbp - 0x30]
call fcn.1400d3890
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140115a80
lea rax, [rbp - 0x30]
cmp rsi, rax
je 0x140115bbf
mov rcx, rsi
call fcn.1400d4220
lea rcx, [rbp - 0x30]
call fcn.1400d4200
mov rbx, qword [rbp - 0x20]
lea rcx, [rbp - 0x30]
call fcn.1400d44b0
mov r8, rbx
mov rdx, rax
mov rcx, rsi
call fcn.1400ed690
jmp 0x140115bbf
mov r8d, 0x1000
lea rdx, [rbp + 0x630]
lea rcx, str.PATH
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea r8, [rbp - 0x40]
lea rdx, [0x1402ad070]
lea rcx, [rbp + 0x630]
call fcn.14023d29c
test rax, rax
je 0x140115bb9
nop word [rax + rax]
mov rdx, rax
lea rcx, [rbp - 0x70]
call fcn.1400d39f0
mov rbx, rax
lea rcx, [0x1402acfbc]
call fcn.1400ce070
mov rcx, rax
call fcn.1400cf110
mov r8, rax
lea rdx, [0x1402acfbc]
mov rcx, rbx
call fcn.140118640
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.1400d3970
nop
mov rbx, qword [rbp + 8]
lea rcx, [rbp - 8]
call fcn.1400d44b0
mov r8, rbx
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.140118640
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.1400d3970
lea rcx, [rbp - 0x30]
call fcn.1400d4220
lea rcx, [rsp + 0x40]
call fcn.1400d4220
mov rbx, rax
lea rcx, [rbp - 0x30]
call fcn.1400d4240
mov rcx, rbx
call fcn.1400d5410
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x30]
call fcn.1400d42f0
lea rcx, [rsp + 0x40]
call fcn.1400d3900
nop
lea rcx, [rsp + 0x68]
call fcn.1400d3900
nop
lea rcx, [rbp - 0x70]
call fcn.1400d3900
lea rcx, [rbp - 0x30]
call fcn.1400d3890
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140115a42
lea r8, [rbp - 0x40]
lea rdx, [0x1402ad070]
mov rcx, qword [rbp - 0x40]
call fcn.14023d29c
test rax, rax
jne 0x140115ac0
mov r14d, 0xc0000225
mov rcx, qword [rbp + 0x20]
test rcx, rcx
jle 0x140115bd3
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140115bd3
mov r14d, eax
lea rcx, [rbp - 8]
call fcn.1400d3900
nop
lea rcx, [rbp - 0x30]
call fcn.1400d3900
mov eax, r14d
mov rcx, qword [rbp + 0x2630]
xor rcx, rsp
call fcn.1401e4050
add rsp, 0x2748
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret