Function at 0x140006ac0
Capabilities:
Get common file path

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
sub rsp, 0x1d0
mov qword [rsp + 0x58], 0xfffffffffffffffe
mov rax, qword [0x14001e658]
xor rax, rsp
mov qword [rsp + 0x1c0], rax
mov r12, r8
mov rbx, rdx
mov rsi, rcx
test rdx, rdx
je 0x140006e48
mov rcx, rdx
call qword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x140006e48
mov qword [rsp + 0x80], 0xf
xor r13d, r13d
mov qword [rsp + 0x78], r13
mov byte [rsp + 0x68], r13b
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rbx
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, rbx
lea rcx, [rsp + 0x60]
call fcn.140005a80
nop
mov qword [rsp + 0xa8], 0xf
mov qword [rsp + 0xa0], r13
mov byte [rsp + 0x90], r13b
lea rcx, [0x140017798]
call qword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x140006bd8
mov qword [rsp + 0x50], 0xf
mov qword [rsp + 0x48], r13
mov byte [rsp + 0x38], r13b
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [0x140017798]
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
lea rdx, [0x140017798]
lea rcx, [rsp + 0x30]
call fcn.140005a80
nop
lea r8, [rsp + 0x88]
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x60]
call fcn.140005fd0
nop
cmp qword [rsp + 0x50], 0x10
jb 0x140006bd8
mov rcx, qword [rsp + 0x38]
call fcn.140009b34
mov rdi, qword [rsp + 0xa0]
test rdi, rdi
je 0x140006d8a
lea rcx, [rsp + 0x90]
mov rsi, qword [rsp + 0x90]
cmp qword [rsp + 0xa8], 0x10
cmovae rcx, rsi
mov ebx, 6
mov r8, rbx
cmp rdi, rbx
cmovb r8, rdi
lea rdx, str.CurDir
call fcn.140009b50
movsxd rcx, eax
test eax, eax
jne 0x140006c3c
cmp rdi, rbx
jb 0x140006cbf
mov eax, r13d
cmp rdi, rbx
setne al
mov ecx, eax
test ecx, ecx
jne 0x140006cbf
xor edx, edx
lea rcx, [rsp + 0x30]
call fcn.140006120
mov rsi, rax
mov rbx, qword [rsp + 0xa0]
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [0x140017798]
repne scasb al, byte [rdi]
not rcx
lea r9, [rcx - 1]
xor r8d, r8d
lea rdx, [0x140017798]
lea rcx, [rsp + 0x60]
call fcn.1400042e0
lea r8, [rbx + 2]
mov qword [rsp + 0x28], 0xffffffffffffffff
mov qword [rsp + 0x20], r13
mov r9, rsi
mov rdx, rax
lea rcx, [rsp + 0x60]
call fcn.140005440
nop
cmp qword [rsp + 0x50], 0x10
jb 0x140006de3
mov rcx, qword [rsp + 0x38]
call fcn.140009b34
jmp 0x140006de3
lea rcx, [rsp + 0x90]
cmp qword [rsp + 0xa8], 0x10
cmovae rcx, rsi
cmp rdi, rbx
cmovb rbx, rdi
mov r8, rbx
lea rdx, str.WinDir
call fcn.140009b50
movsxd rcx, eax
test eax, eax
jne 0x140006d07
cmp rdi, 6
jb 0x140006de3
mov eax, r13d
cmp rdi, 6
setne al
mov ecx, eax
test ecx, ecx
jne 0x140006de3
mov edx, 0x104
lea rcx, [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov rbx, qword [rsp + 0xa0]
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [0x140017798]
repne scasb al, byte [rdi]
not rcx
lea r9, [rcx - 1]
xor r8d, r8d
lea rdx, [0x140017798]
lea rcx, [rsp + 0x60]
call fcn.1400042e0
mov rdx, rax
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0xb0]
repne scasb al, byte [rdi]
not rcx
dec rcx
lea r8, [rbx + 2]
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0xb0]
lea rcx, [rsp + 0x60]
call fcn.140005850
jmp 0x140006de3
lea rcx, [rsp + 0x68]
cmp qword [rsp + 0x80], 0x10
cmovae rcx, qword [rsp + 0x68]
call qword [sym.imp.SHLWAPI.dll_PathGetDriveNumberA]
cmp eax, 0xffffffff
jne 0x140006de3
lea r8, [rsp + 0x60]
mov rdx, rsi
lea rcx, [rsp + 0x30]
call fcn.140005f20
nop
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rax
lea rcx, [rsp + 0x60]
call fcn.140005320
nop
cmp qword [rsp + 0x50], 0x10
jb 0x140006de3
mov rcx, qword [rsp + 0x38]
call fcn.140009b34
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rsp + 0x60]
mov rcx, r12
call fcn.140005320
nop
cmp qword [rsp + 0xa8], 0x10
jb 0x140006e10
mov rcx, qword [rsp + 0x90]
call fcn.140009b34
mov qword [rsp + 0xa8], 0xf
mov qword [rsp + 0xa0], r13
mov byte [rsp + 0x90], 0
cmp qword [rsp + 0x80], 0x10
jb 0x140006e41
mov rcx, qword [rsp + 0x68]
call fcn.140009b34
mov eax, 1
jmp 0x140006e4a
xor eax, eax
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.14000a3b0
add rsp, 0x1d0
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret