Function at 0x14002c340
Capabilities:
Get common file path
Get program files directory
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x1f50]
mov eax, 0x2050
call fcn.140216080
sub rsp, rax
mov rax, qword [0x14033e810]
xor rax, rsp
mov qword [rbp + 0x1f40], rax
mov rbx, rcx
test rcx, rcx
je 0x14002c6b3
mov rdi, 0xffffffffffffffff
mov rax, rdi
nop
inc rax
cmp word [rcx + rax*2], 0
jne 0x14002c390
test rax, rax
je 0x14002c6b3
call fcn.1400a2364
mov rcx, rax
test rax, rax
je 0x14002c6eb
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x30], rax
cmp rbx, 0x10000
jae 0x14002c3db
movzx edx, bx
lea rcx, [rsp + 0x30]
call fcn.14000d610
jmp 0x14002c3fb
mov rax, rdi
nop
inc rax
cmp word [rbx + rax*2], 0
jne 0x14002c3e0
mov r8d, eax
mov rdx, rbx
lea rcx, [rsp + 0x30]
call fcn.14000df90
nop
mov rbx, qword [rsp + 0x30]
cmp dword [rbx - 8], 1
jle 0x14002c418
mov edx, dword [rbx - 0x10]
lea rcx, [rsp + 0x30]
call fcn.14000dd30
mov rbx, qword [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesW]
xor r14d, r14d
test rbx, rbx
jne 0x14002c42e
mov eax, r14d
jmp 0x14002c442
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
call fcn.14024bd08
test eax, eax
js 0x14002c6e0
cmp eax, dword [rbx - 0xc]
jg 0x14002c6e0
mov dword [rbx - 0x10], eax
mov eax, eax
mov word [rbx + rax*2], r14w
mov edx, dword [rbx - 0x10]
test edx, edx
je 0x14002c696
cmp edx, 1
jl 0x14002c6e0
cmp word [rbx + 2], 0x3a
jne 0x14002c696
cmp dword [rbx - 8], 1
jle 0x14002c489
lea rcx, [rsp + 0x30]
call fcn.14000dd30
mov rbx, qword [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
test rbx, rbx
jne 0x14002c49c
mov eax, r14d
jmp 0x14002c4b0
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
call fcn.14024bd08
test eax, eax
js 0x14002c6e0
cmp eax, dword [rbx - 0xc]
jg 0x14002c6e0
mov dword [rbx - 0x10], eax
mov eax, eax
mov word [rbx + rax*2], r14w
mov eax, dword [rbx - 0x10]
lea r15d, [rax + rax]
movsxd r12, r15d
mov eax, 2
mul r12
cmovo rax, rdi
mov rcx, rax
call fcn.1400164e0
mov rsi, rax
mov word [rax], r14w
mov r8d, r15d
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov rcx, rdi
nop word [rax + rax]
inc rcx
cmp word [rsi + rcx*2], r14w
jne 0x14002c500
mov r8d, ecx
mov rdx, rsi
lea rcx, [rsp + 0x30]
call fcn.14000df90
mov rcx, rsi
call fcn.140095d64
mov rbx, qword [rsp + 0x30]
lea rcx, [rbx - 0x18]
call fcn.14000de80
add rax, 0x18
mov qword [rsp + 0x38], rax
lea rcx, [rsp + 0x38]
call fcn.140032ea0
test eax, eax
je 0x14002c59b
mov eax, 2
mul r12
cmovo rax, rdi
mov rcx, rax
call fcn.1400164e0
mov rsi, rax
mov word [rax], r14w
mov r8d, r15d
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetLongPathNameW]
mov rcx, rdi
inc rcx
cmp word [rsi + rcx*2], r14w
jne 0x14002c574
mov r8d, ecx
mov rdx, rsi
lea rcx, [rsp + 0x30]
call fcn.14000df90
mov rcx, rsi
call fcn.140095d64
mov rbx, qword [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathIsRootW]
test eax, eax
jne 0x14002c696
xor edx, edx
mov r8d, 0x1000
lea rcx, [rbp + 0xf40]
call fcn.140241ba0
xor edx, edx
mov r8d, 0x1000
lea rcx, [rsp + 0x40]
call fcn.140241ba0
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0x26]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x14002c608
lea rdx, [rsp + 0x40]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
je 0x14002c696
xor edx, edx
mov r8d, 0x1000
lea rcx, [rsp + 0x40]
call fcn.140241ba0
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0x2a]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x14002c64c
lea rdx, [rsp + 0x40]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
je 0x14002c696
xor edx, edx
mov r8d, 0x1000
lea rcx, [rsp + 0x40]
call fcn.140241ba0
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0x24]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x14002c690
lea rdx, [rsp + 0x40]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
je 0x14002c696
mov r14d, 1
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], edi
sub edi, 1
jg 0x14002c6ae
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
mov eax, r14d
jmp 0x14002c6b5
xor eax, eax
mov rcx, qword [rbp + 0x1f40]
xor rcx, rsp
call fcn.1402155d0
lea r11, [rsp + 0x2050]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
mov ecx, 0x80070057
call fcn.1400080b0
nop
mov ecx, 0x80004005
call fcn.1400080b0
int3