Function at 0x1016dd4
Capabilities:
Get common file path

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x40
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov ebx, edx
mov rdi, rcx
lea rcx, [0x01009db0]
call fcn.01012d38
cmp ebx, 1
jne 0x1016e25
lea rcx, [0x01009e00]
call fcn.01012d38
mov dword [0x01047b80], 9
mov dword [0x01047b84], ebx
and dword [0x01047db4], 0
xor eax, eax
jmp 0x1017110
lea rdx, [rdi + 0x30]
lea rcx, [rdi + 0x108]
call fcn.01010aec
mov r11, qword [rdi + 0x108]
cmp qword [r11 - 0x10], 0
jne 0x1016e71
lea rcx, [0x01009e60]
call fcn.01012d38
mov dword [0x01047b80], 5
mov dword [0x01047b84], 2
and dword [0x01047db4], 0
xor eax, eax
jmp 0x1017110
lea rdx, [0x01006540]
lea rcx, [rsp + 0x28]
call fcn.010109f8
nop
lea rdx, [rdi + 0x108]
lea rcx, [rsp + 0x78]
call fcn.0101074c
mov r8, rax
lea rdx, [rsp + 0x70]
mov rcx, rdi
call fcn.0101ac48
mov rdx, rax
lea rcx, [rsp + 0x28]
call fcn.01010aec
lea rcx, [rsp + 0x70]
call fcn.01010940
lea rdx, [rdi + 0x108]
lea rcx, [rsp + 0x70]
call fcn.0101074c
mov rdx, rax
mov rcx, rdi
call fcn.0101827c
lea rdx, [0x010063c0]
lea rcx, [rsp + 0x20]
call fcn.01010990
nop
mov edx, 0x104
lea rcx, [rsp + 0x20]
call fcn.01010e90
mov rdx, rax
xor r9d, r9d
xor ecx, ecx
lea r8d, [r9 + 0x23]
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov ebx, eax
or edx, 0xffffffff
lea rcx, [rsp + 0x20]
call fcn.01010f00
test ebx, ebx
jne 0x1016f29
lea rcx, [0x01009ed0]
call fcn.01012d38
lea r8, [0x01009f30]
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x30]
call fcn.01010cd0
lea r8, [rdi + 0x108]
mov rdx, rax
lea rcx, [rsp + 0x78]
call fcn.01010c90
lea r8, [0x01009f28]
mov rdx, rax
lea rcx, [rsp + 0x70]
call fcn.01010cd0
mov rdx, rax
lea rcx, [rsp + 0x20]
call fcn.01010aec
lea rcx, [rsp + 0x70]
call fcn.01010940
lea rcx, [rsp + 0x78]
call fcn.01010940
lea rcx, [rsp + 0x30]
call fcn.01010940
xor edx, edx
lea rcx, [rsp + 0x20]
call fcn.01010e90
mov rdx, rax
lea rcx, [0x01009f40]
call fcn.01012d38
lea rdx, [0x01009f30]
mov rcx, qword [rsp + 0x20]
call fcn.0102a7a4
test rax, rax
je 0x1016ff8
sub rax, qword [rsp + 0x20]
sar rax, 1
cmp eax, 0xffffffff
je 0x1016ff8
xor edx, edx
lea rcx, [rsp + 0x20]
call fcn.01010e90
mov rdx, rax
mov rcx, rdi
call fcn.0101a9bc
cmp eax, 0xffffff9d
jne 0x1016ff8
lea rcx, [0x01009f90]
call fcn.01012d38
mov eax, dword [rdi + 0xf4]
cmp eax, 2
je 0x1017008
cmp eax, 3
jne 0x101705b
lea r9, [rdi + 0x144]
lea r8, [rdi + 0x150]
lea rdx, [0x01009fe0]
mov rcx, rdi
call fcn.0101b2a8
lea r9, [rdi + 0x15c]
lea r8, [rdi + 0x168]
lea rdx, [0x01009ff8]
mov rcx, rdi
call fcn.0101b2a8
mov rcx, rdi
call fcn.0101ba08
cmp dword [rdi + 0x158], 1
jne 0x101705b
mov rcx, rdi
call fcn.0101bad0
lea r8, [rsp + 0x78]
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x68]
call fcn.01020fc4
cmp dword [rsp + 0x68], 2
jne 0x101708c
cmp dword [rsp + 0x70], 5
jl 0x101708c
cmp dword [rsp + 0x78], 0
jl 0x101708c
mov rcx, rdi
call fcn.01019174
mov rcx, rdi
call fcn.0101bb9c
mov rcx, rdi
call fcn.0101bc6c
mov rcx, rdi
call fcn.0101bd28
mov ebx, eax
cmp dword [rdi + 0x158], 1
jne 0x10170c1
mov rcx, rdi
call fcn.0101bfb8
test ebx, ebx
je 0x10170bf
test eax, eax
jne 0x10170c5
xor ebx, ebx
test ebx, ebx
je 0x10170cf
mov rcx, rdi
call fcn.01018a18
jmp 0x10170e9
lea rdx, [rsp + 0x28]
lea rcx, [rsp + 0x70]
call fcn.0101074c
mov rdx, rax
mov rcx, rdi
call fcn.01018fc8
lea rcx, [0x0100a020]
call fcn.01012d38
nop
lea rcx, [rsp + 0x20]
call fcn.01010940
nop
lea rcx, [rsp + 0x28]
call fcn.01010940
mov eax, 1
add rsp, 0x40
pop rdi
pop rsi
pop rbx
ret