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

Disassembly:
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
sub rsp, 0x48
mov dword [rsp + 0x24], 0
mov rcx, qword [rsp + 0x58]
call fcn.180002190
mov dword [rsp + 0x28], eax
cmp dword [rsp + 0x50], 0
je 0x180001f45
cmp dword [rsp + 0x50], 1
jne 0x18000201f
mov rcx, qword [rsp + 0x58]
call fcn.180001ae0
mov r8d, dword [rsp + 0x28]
mov rdx, rax
lea rcx, [0x1800091f0]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [rsp + 0x24], eax
cmp dword [rsp + 0x24], 0
je 0x18000201a
mov edx, dword [rsp + 0x24]
mov rcx, qword [rsp + 0x58]
call fcn.180002500
mov rcx, qword [rsp + 0x58]
call fcn.1800012e0
dec eax
mov edx, eax
mov rcx, qword [rsp + 0x58]
call fcn.180001e60
mov word [rsp + 0x20], ax
movzx eax, word [rsp + 0x20]
cmp eax, 0x5c
je 0x180001fb2
movzx eax, word [rsp + 0x20]
cmp eax, 0x2f
jne 0x180001fcb
mov edx, 0xffffffff
mov rcx, qword [rsp + 0x58]
call fcn.180002500
mov eax, dword [rsp + 0x24]
dec eax
mov dword [rsp + 0x24], eax
cmp dword [rsp + 0x50], 0
jne 0x180001ff7
mov r8d, 8
lea rdx, str.Desktop
mov rcx, qword [rsp + 0x58]
call fcn.1800026b0
mov ecx, dword [rsp + 0x24]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x24], eax
jmp 0x18000201a
mov r8d, 0xa
lea rdx, str.Documents
mov rcx, qword [rsp + 0x58]
call fcn.1800026b0
mov ecx, dword [rsp + 0x24]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x24], eax
jmp 0x180002162
cmp dword [rsp + 0x50], 2
jne 0x18000205d
mov rcx, qword [rsp + 0x58]
call fcn.180001ae0
mov r8d, dword [rsp + 0x28]
mov rdx, rax
lea rcx, str.appdata
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [rsp + 0x24], eax
mov edx, dword [rsp + 0x24]
mov rcx, qword [rsp + 0x58]
call fcn.180002500
nop
jmp 0x180002162
cmp dword [rsp + 0x50], 3
jne 0x1800020d4
mov rcx, qword [rsp + 0x58]
call fcn.180001ae0
mov rdx, rax
mov ecx, dword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
mov dword [rsp + 0x24], eax
cmp dword [rsp + 0x24], 0
je 0x1800020cf
mov edx, dword [rsp + 0x24]
mov rcx, qword [rsp + 0x58]
call fcn.180002500
nop
mov rcx, qword [rsp + 0x58]
call fcn.1800012e0
dec eax
mov edx, eax
mov rcx, qword [rsp + 0x58]
call fcn.180001e60
movzx eax, ax
cmp eax, 0x5c
jne 0x1800020cf
mov eax, dword [rsp + 0x24]
dec eax
mov dword [rsp + 0x24], eax
mov edx, 0xffffffff
mov rcx, qword [rsp + 0x58]
call fcn.180002500
nop
jmp 0x180002162
cmp dword [rsp + 0x50], 4
jne 0x180002162
mov rcx, qword [rsp + 0x58]
call fcn.180001ea0
mov dword [rsp + 0x24], eax
cmp dword [rsp + 0x24], 0
je 0x180002162
mov eax, dword [rsp + 0x24]
dec eax
mov dword [rsp + 0x30], eax
mov rcx, qword [rsp + 0x58]
call fcn.180001ae0
movsxd rcx, dword [rsp + 0x24]
shl rcx, 1
sub rax, rcx
mov ecx, dword [rsp + 0x30]
mov r8d, ecx
lea rdx, [0x1800091ec]
mov rcx, rax
call fcn.180002f60
mov dword [rsp + 0x2c], eax
cmp dword [rsp + 0x2c], 0xffffffff
je 0x180002162
mov eax, dword [rsp + 0x24]
mov ecx, dword [rsp + 0x2c]
sub ecx, eax
mov eax, ecx
mov edx, eax
mov rcx, qword [rsp + 0x58]
call fcn.180002500
mov rcx, qword [rsp + 0x58]
call fcn.180002190
mov ecx, dword [rsp + 0x28]
sub ecx, eax
mov eax, ecx
mov dword [rsp + 0x24], eax
mov rcx, qword [rsp + 0x58]
call fcn.180002190
mov ecx, dword [rsp + 0x28]
sub ecx, eax
mov eax, ecx
test eax, eax
jle 0x180002185
xor edx, edx
mov rcx, qword [rsp + 0x58]
call fcn.180002660
nop
mov eax, dword [rsp + 0x24]
add rsp, 0x48
ret