Function at 0x140036a90
Capabilities:
Get common file path
Query environment variable

Disassembly:
mov qword [rsp + 8], rcx
push rbx
push rsi
push rdi
push r13
push r14
sub rsp, 0x40
mov rbx, rdx
mov r13, rcx
mov edx, 0x5c
mov rcx, r8
mov rdi, r9
mov r14, r8
call fcn.140249e3c
mov edx, 0x2e
mov rcx, r14
mov rsi, rax
call fcn.140249e3c
test rax, rax
je 0x140036ad8
test rsi, rsi
je 0x140036ae9
cmp rax, rsi
jae 0x140036ae9
mov edx, edi
lea r8, [0x14028c050]
mov rcx, r14
call fcn.140251e40
cmp word [r14], 0
mov qword [rsp + 0x78], rbp
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r15
je 0x140036b0b
cmp word [r14 + 2], 0x3a
je 0x140036be8
mov r8d, 2
lea rdx, [0x14028c05c]
mov rcx, r14
call fcn.140252028
test eax, eax
je 0x140036be8
mov r12, qword [rsp + 0xa8]
mov rbp, qword [rsp + 0xa0]
mov rsi, qword [rsp + 0x98]
mov r15, qword [rsp + 0x90]
test rbx, rbx
je 0x140036c66
cmp word [r14], 0x5c
jne 0x140036c29
mov r8d, 2
lea rdx, [0x14028c05c]
mov rcx, rbx
call fcn.140252028
test eax, eax
jne 0x140036bc1
lea edx, [rax + 0x5c]
lea rcx, [rbx + 4]
call fcn.140249da8
test rax, rax
je 0x140036be8
mov edx, 0x5c
mov rcx, rax
call fcn.140249da8
test rax, rax
je 0x140036ba5
sub rax, rbx
sar rax, 1
mov qword [rsp + 0x20], rax
jmp 0x140036bd7
mov rsi, 0xffffffffffffffff
nop dword [rax]
inc rsi
cmp word [rbx + rsi*2], 0
jne 0x140036bb0
mov qword [rsp + 0x20], rsi
jmp 0x140036bd7
cmp word [rbx], 0
je 0x140036be8
cmp word [rbx + 2], 0x3a
jne 0x140036be8
mov qword [rsp + 0x20], 2
mov r9, rbx
mov r8, rdi
mov rdx, r14
mov rcx, r13
call fcn.140031830
mov rcx, qword [r13 + 0x218]
mov rdx, r14
mov rax, qword [rcx]
call qword [rax + 0xa8]
cmp eax, 0xffffffff
je 0x140036c22
mov rdx, qword [rsp + 0x98]
mov r8, r14
mov rcx, qword [rsp + 0x90]
call fcn.140251ec0
mov eax, 1
jmp 0x140036e5d
xor eax, eax
jmp 0x140036e5d
mov r8, rbx
mov rdx, r12
mov rcx, rbp
call fcn.140251ec0
mov r8, r14
mov rdx, r12
mov rcx, rbp
call fcn.140251e40
mov r9, rsi
mov r8, r15
mov rdx, rbp
mov rcx, r13
call fcn.140030470
mov r13d, eax
test eax, eax
jne 0x140036e5a
mov r13, qword [rsp + 0x70]
mov edx, r12d
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov rcx, rbp
call qword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov r8, r14
mov rdx, r12
mov rcx, rbp
call fcn.140251e40
mov r9, rsi
mov r8, r15
mov rdx, rbp
mov rcx, r13
call fcn.140030470
mov r13d, eax
test eax, eax
jne 0x140036e5a
mov edx, r12d
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov rcx, rbp
call qword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea r8, [0x14028c068]
mov rdx, r12
mov rcx, rbp
call fcn.140251e40
mov r8, r14
mov rdx, r12
mov rcx, rbp
call fcn.140251e40
mov rbx, qword [rsp + 0x70]
mov r9, rsi
mov rcx, rbx
mov r8, r15
mov rdx, rbp
call fcn.140030470
mov r13d, eax
test eax, eax
jne 0x140036e5a
mov edx, r12d
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov rcx, rbp
call qword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov r8, r14
mov rdx, r12
mov rcx, rbp
call fcn.140251e40
mov r9, rsi
mov r8, r15
mov rdx, rbp
mov rcx, rbx
call fcn.140030470
mov r13d, eax
test eax, eax
jne 0x140036e5a
xor r8d, r8d
lea rcx, str.PATH
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ebx, eax
test eax, eax
je 0x140036e5a
mov eax, 2
mov rsi, 0xffffffffffffffff
mul rbx
cmovo rax, rsi
mov rcx, rax
call fcn.140247068
mov r8d, ebx
mov qword [rsp + 0x80], rax
mov rdx, rax
lea rcx, str.PATH
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov rbx, rdi
mov edx, 0x3b
mov rcx, rbx
call fcn.140249da8
mov rdi, rax
test rax, rax
jne 0x140036dc0
mov rax, rsi
nop word [rax + rax]
cmp word [rbx + rax*2 + 2], 0
lea rax, [rax + 1]
jne 0x140036db0
lea rdi, [rbx + rax*2]
mov r8, rbx
xor eax, eax
mov r9, rdi
mov word [r15], ax
sub r9, rbx
mov rcx, r15
mov rbx, qword [rsp + 0x98]
mov rdx, rbx
sar r9, 1
call fcn.140251f28
cmp word [r15], 0
je 0x140036e2d
mov r8d, r12d
mov rdx, rbp
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp eax, r12d
ja 0x140036e2d
mov rcx, rbp
call qword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov r8, r14
mov rdx, r12
mov rcx, rbp
call fcn.140251e40
mov rcx, qword [rsp + 0x70]
mov r9, rbx
mov r8, r15
mov rdx, rbp
call fcn.140030470
mov r13d, eax
cmp word [rdi], 0x3b
lea rbx, [rdi + 2]
cmovne rbx, rdi
test r13d, r13d
jne 0x140036e48
cmp word [rbx], r13w
jne 0x140036d92
mov rcx, qword [rsp + 0x80]
mov edx, 2
call fcn.140247060
mov eax, r13d
mov r15, qword [rsp + 0x30]
mov r12, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x78]
add rsp, 0x40
pop r14
pop r13
pop rdi
pop rsi
pop rbx
ret