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

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r12
push r13
push r14
mov eax, 0x4110
call fcn.1400d8110
sub rsp, rax
mov rax, qword [0x1401006f0]
xor rax, rsp
mov qword [rsp + 0x4100], rax
xor r14d, r14d
mov rbx, rdx
mov rbp, rcx
cmp byte [0x140148965], r14b
jne 0x1400512c2
cmp word [rdx], 0x2e
jne 0x1400512c2
movzx ecx, word [rbx + 2]
call fcn.140061180
cmp al, r14b
je 0x1400512b1
add rbx, 4
cmp word [rbx], 0x2e
je 0x140051299
cmp word [rbx], 0x2e
jne 0x1400512c2
cmp word [rbx + 2], r14w
je 0x1400516ee
mov r13d, r14d
mov rdi, rbx
cmp word [rbx], r14w
je 0x14005130b
cmp word [rdi], 0x2e
jne 0x14005130b
cmp word [rdi + 2], 0x2e
jne 0x14005130b
movzx ecx, word [rdi + 4]
call fcn.140061180
cmp al, r14b
jne 0x1400512f0
cmp word [rdi + 4], r14w
jne 0x14005130b
movzx eax, word [rdi + 4]
neg ax
sbb rcx, rcx
inc r13d
neg rcx
lea rdi, [rdi + rcx*2 + 4]
cmp word [rdi], r14w
jne 0x1400512ce
lea rdi, [0x1400e0398]
mov rsi, rbx
mov ecx, 2
repe cmpsw word [rsi], word [rdi]
sete sil
cmp byte [0x140148965], r14b
je 0x14005133f
mov rcx, rbx
call fcn.140061f20
cmp al, r14b
je 0x14005133f
mov rcx, rbp
call fcn.14004f320
cmp byte [rbp + 0x102a], r14b
je 0x140051374
mov eax, dword [rbp + 0x2230]
cmp r13d, eax
mov edx, eax
cmovl edx, r13d
cmp sil, r14b
cmovne edx, eax
cmp edx, r14d
je 0x140051374
xor r8d, r8d
mov rcx, rbp
call fcn.14004c8dc
xor edx, edx
jmp 0x1400516e6
mov byte [rbp + 0x102a], r14b
cmp byte [0x140148965], r14b
je 0x14005146d
lea rdx, str.FlatView
lea rcx, str.FileList
xor r8d, r8d
call fcn.14006d3c4
cmp eax, r14d
je 0x1400513ac
cmp r13d, r14d
je 0x1400516ee
mov r12d, 0x800
lea rdx, [rsp + 0x1030]
lea rcx, [0x1401575c0]
mov r8, r12
call fcn.140014e74
lea rdi, [0x1400e0398]
mov rsi, rbx
mov ecx, 2
repe cmpsw word [rsi], word [rdi]
je 0x14005140d
lea rcx, [0x1401575c0]
mov rdx, rbx
call fcn.140014d48
cmp al, r14b
je 0x14005140d
cmp r13d, r14d
lea rdx, [rsp + 0x1030]
mov rcx, rbp
cmovle rdx, r14
call fcn.140050428
jmp 0x1400516ee
lea rdx, [rsp + 0x2030]
lea rcx, [0x1401575c0]
mov r8, r12
call fcn.140014e94
lea rdx, [rsp + 0x2030]
lea rcx, [rbp + 0x102c]
mov r8, r12
call fcn.1400805a0
lea rcx, [rbp + 0x102c]
call fcn.1400618f4
mov rcx, rbp
call fcn.14004f320
cmp al, r14b
je 0x1400516ee
lea rcx, [rsp + 0x2030]
call fcn.1400615e8
mov rdx, rax
jmp 0x1400516e6
mov r12d, 0x800
lea rdx, [rbp + 0x102c]
lea rcx, [rsp + 0x1030]
mov r8, r12
call fcn.1400805a0
mov word [rsp + 0x2030], r14w
jmp 0x14005156c
cmp byte [rbp + 0x102a], r14b
jne 0x140051575
lea rcx, [rbp + 0x102c]
call fcn.1400614f4
cmp al, r14b
je 0x140051521
movzx ecx, word [rbp + 0x1030]
call fcn.140061180
cmp al, r14b
je 0x140051521
cmp word [rbp + 0x1032], r14w
jne 0x140051521
cmp dword [rbp + 0x2230], r14d
jle 0x1400514e3
mov byte [rbp + 0x102a], 1
jmp 0x14005154c
mov rcx, qword [rbp]
lea r8, [rsp + 0x20]
mov edx, 0x11
mov qword [rsp + 0x20], r14
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
mov rdx, qword [rsp + 0x20]
lea rcx, [0x140155380]
call fcn.140051808
mov rcx, qword [0x140188d30]
mov rdx, qword [rsp + 0x20]
mov rax, qword [rcx]
call qword [rax + 0x28]
jmp 0x14005154c
lea rcx, [rbp + 0x102c]
call fcn.1400615e8
lea rcx, [rsp + 0x2030]
mov r8, r12
mov rdx, rax
call fcn.1400805a0
lea rcx, [rbp + 0x102c]
call fcn.1400618f4
dec r13d
jmp 0x140051555
add rbx, 2
cmp word [rbx], 0x2e
je 0x140051551
movzx ecx, word [rbx]
call fcn.140061180
cmp al, r14b
je 0x14005156c
add rbx, 2
cmp r13d, r14d
jg 0x140051498
cmp sil, r14b
je 0x140051595
lea rdx, [rsp + 0x30]
lea rcx, [rbp + 0x102c]
mov r8, r12
call fcn.140061f68
lea rdx, [rsp + 0x30]
jmp 0x1400515a5
mov rcx, rbx
call fcn.140061f20
cmp al, r14b
je 0x1400515b6
mov rdx, rbx
lea rcx, [rbp + 0x102c]
mov r8, r12
call fcn.1400805a0
jmp 0x1400515dd
cmp word [rbx], r14w
je 0x1400515dd
lea rcx, [rbp + 0x102c]
mov rdx, r12
call fcn.14006119c
lea rcx, [rbp + 0x102c]
mov r8, r12
mov rdx, rbx
call fcn.1400805dc
lea rcx, [rbp + 0x102c]
call fcn.140061864
mov esi, eax
cmp eax, 0xffffffff
je 0x140051616
call fcn.1400a1e60
bt eax, esi
jb 0x140051616
lea rdx, [rsp + 0x1030]
lea rcx, [rbp + 0x102c]
mov r8, r12
call fcn.1400805a0
jmp 0x1400516ee
cmp byte [rbp + 0x102a], r14b
jne 0x1400516cd
lea rcx, [rbp + 0x102c]
call fcn.14003c3d4
cmp al, r14b
jne 0x1400516cd
lea rdx, [rsp + 0x30]
lea rcx, [rbp + 0x102c]
mov r8d, r12d
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp eax, r14d
je 0x140051668
lea rcx, [rsp + 0x30]
call fcn.14003c3d4
cmp al, r14b
je 0x140051668
lea rdx, [rsp + 0x30]
jmp 0x1400516be
mov ecx, 0x6c
call fcn.140076080
lea r9, [rbp + 0x102c]
lea rcx, [rsp + 0x3030]
mov r8, rax
mov edx, 0x864
call fcn.140022b7c
mov ecx, 0x66
call fcn.140076080
mov rcx, qword [0x14014aae0]
lea rdx, [rsp + 0x3030]
mov r8, rax
mov r9d, 0x10
call qword [sym.imp.USER32.dll_MessageBoxW]
lea rdx, [rsp + 0x1030]
lea rcx, [rbp + 0x102c]
mov r8, r12
call fcn.1400805a0
movzx eax, word [rsp + 0x2030]
neg ax
lea rax, [rsp + 0x2030]
sbb rdx, rdx
and rdx, rax
mov rcx, rbp
call fcn.14004fa64
mov rcx, qword [rsp + 0x4100]
xor rcx, rsp
call fcn.1400c6350
lea r11, [rsp + 0x4110]
mov rbx, qword [r11 + 0x40]
mov rbp, qword [r11 + 0x48]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret