Function at 0x140086390
Capabilities:
Get common file path
Set current directory

Disassembly:
mov qword [rsp + 0x20], rbx
push rsi
push rdi
push r15
mov eax, 0x8090
call fcn.1400fc7a0
sub rsp, rax
mov rax, qword [0x140153558]
xor rax, rsp
mov qword [rsp + 0x8080], rax
mov rbx, qword [rcx + 0x38]
mov rdi, rcx
test rbx, rbx
jne 0x1400863c9
xor sil, sil
jmp 0x1400863f4
mov edx, 0x5c
mov rcx, rbx
call sub.VCRUNTIME140.dll_strchr
test rax, rax
je 0x1400863e0
xor sil, sil
jmp 0x1400863f4
mov edx, 0x2f
mov rcx, rbx
call sub.VCRUNTIME140.dll_strchr
test rax, rax
setne sil
mov rbx, qword [rdi + 0x60]
test rbx, rbx
jne 0x140086402
xor r15b, r15b
jmp 0x14008642d
mov edx, 0x5c
mov rcx, rbx
call sub.VCRUNTIME140.dll_strchr
test rax, rax
je 0x140086419
xor r15b, r15b
jmp 0x14008642d
mov edx, 0x2f
mov rcx, rbx
call sub.VCRUNTIME140.dll_strchr
test rax, rax
setne r15b
mov qword [rsp + 0x80b8], rbp
mov rcx, rdi
mov qword [rsp + 0x80c0], r14
or r15b, sil
call fcn.140085330
mov rcx, rdi
call fcn.140085780
mov rax, qword [rdi + 0x10]
or dword [rax + 0x60], 0x100
mov rax, qword [rdi + 0x10]
or dword [rax + 0x60], 4
mov rax, qword [rdi + 0x10]
or dword [rax + 0x60], 0x80000
mov rax, qword [rdi + 0x10]
or dword [rax + 0x60], 0x800000
mov rax, qword [rdi + 0x10]
or dword [rax + 0x60], 8
mov ecx, dword [rdi + 8]
sub ecx, 1
je case.0x140086867.1
sub ecx, 1
je 0x1400864c9
sub ecx, 1
je case.0x140086867.1
sub ecx, 1
je 0x1400864a4
cmp ecx, 1
jne 0x1400864d4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_abort]
int3
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
test al, 1
je 0x1400864d4
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 8]
cmp eax, 4
jne 0x1400864d4
mov rax, qword [rdi + 0x10]
or dword [rax + 0x60], 2
jmp 0x1400864d4
mov rax, qword [rdi + 0x10]
or dword [rax + 0x60], 0x200
mov ecx, 0x10000
call fcn.1400fbf44
mov rcx, qword [rdi + 0x10]
xor ebp, ebp
mov qword [rcx + 0x30], rax
mov rax, qword [rdi + 0x10]
mov dword [rax + 0x38], 0x7fff
mov rax, qword [rdi + 0x10]
mov rcx, qword [rax + 0x30]
mov word [rcx], bp
mov rax, qword [rdi + 0x10]
mov rcx, qword [rax + 0x30]
mov word [rcx + 2], bp
call qword [sym.imp.USER32.dll_GetForegroundWindow]
mov rcx, qword [rdi + 0x10]
mov qword [rcx + 8], rax
mov rcx, qword [rdi + 0x40]
test rcx, rcx
je 0x140086550
call fcn.140086a80
lea rbx, [0x140168830]
mov rdx, rax
mov rcx, rbx
mov r8d, 0xc8
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
mov word [0x1401689be], bp
mov rax, qword [rdi + 0x10]
mov qword [rax + 0x58], rbx
jmp 0x140086558
mov rax, qword [rdi + 0x10]
mov qword [rax + 0x58], rbp
mov rcx, qword [rdi + 0x50]
test rcx, rcx
je 0x14008662e
cmp qword [rdi + 0x20], rbp
jne 0x14008657d
mov ecx, 0x10000
call fcn.1400fbf44
mov rcx, qword [rdi + 0x50]
mov qword [rdi + 0x20], rax
mov edx, ecx
mov r8, rcx
mov rax, 0xffffffffffffffff
nop dword [rax]
cmp byte [rcx + rax + 1], bpl
lea rax, [rax + 1]
jne 0x140086590
cmp byte [rax + rcx + 1], bpl
je 0x1400865e9
nop dword [rax]
nop word [rax + rax]
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rcx + rax], bpl
jne 0x1400865b7
inc rax
add rcx, rax
mov rax, 0xffffffffffffffff
nop dword [rax]
cmp byte [rcx + rax + 1], bpl
lea rax, [rax + 1]
jne 0x1400865d0
cmp byte [rax + rcx + 1], bpl
jne 0x1400865b0
mov edx, dword [rdi + 0x50]
mov r8, qword [rdi + 0x50]
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rcx + rax], bpl
jne 0x1400865f0
sub ecx, edx
mov dword [rsp + 0x28], 0x8000
xor edx, edx
lea r9d, [rcx + 2]
mov ecx, 0xfde9
add r9d, eax
mov rax, qword [rdi + 0x20]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov rcx, qword [rdi + 0x10]
mov rax, qword [rdi + 0x20]
mov qword [rcx + 0x18], rax
jmp 0x140086636
mov rax, qword [rdi + 0x10]
mov qword [rax + 0x18], rbp
mov rcx, qword [rdi + 0x60]
test rcx, rcx
je 0x140086747
call fcn.14004deb0
mov rbx, rax
test r15b, r15b
je 0x14008665b
mov rdx, rax
mov rcx, rdi
call fcn.140085480
mov rdx, 0xffffffffffffffff
inc rdx
cmp byte [rbx + rdx], bpl
jne 0x140086662
mov rax, qword [rdi + 0x10]
mov ecx, dword [rax + 0x38]
cmp rdx, rcx
jb 0x1400866e5
mov r8d, edx
lea rcx, [rsp + 0x30]
lea rdx, str.preset_file___filename_is_too_long:__ld_is___ld
mov r9d, 0x8000
call fcn.14000a080
mov rcx, qword [rdi + 0x68]
call fcn.140086c90
lea rcx, [rsp + 0x30]
mov qword [rdi + 0x68], rax
call fcn.140086cb0
mov qword [rdi + 0x68], rax
mov eax, 0xffffffff
mov r14, qword [rsp + 0x80c0]
mov rbp, qword [rsp + 0x80b8]
mov rcx, qword [rsp + 0x8080]
xor rcx, rsp
call fcn.1400fbfe0
mov rbx, qword [rsp + 0x80c8]
add rsp, 0x8090
pop r15
pop rdi
pop rsi
ret
mov rcx, rbx
call fcn.140086a80
mov rcx, qword [rdi + 0x10]
mov rdx, qword [rcx + 0x30]
nop word [rax + rax]
movzx ecx, word [rax]
lea rax, [rax + 2]
mov word [rdx], cx
lea rdx, [rdx + 2]
test cx, cx
jne 0x140086700
mov rax, qword [rdi + 0x10]
mov rdx, 0xffffffffffffffff
mov rcx, qword [rax + 0x30]
cmp word [rcx + rdx*2 + 2], bp
lea rdx, [rdx + 1]
jne 0x140086722
mov word [rcx + rdx*2], bp
mov rax, qword [rdi + 0x10]
mov rcx, qword [rax + 0x30]
mov word [rcx + rdx*2 + 2], bp
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rdi + 0x38]
test rcx, rcx
je 0x1400867ac
call fcn.14004deb0
mov rbx, rax
test r15b, r15b
je 0x140086768
mov rdx, rax
mov rcx, rdi
call fcn.140085480
mov ecx, 0x10000
call fcn.1400fbf44
mov rcx, qword [rdi + 0x10]
mov qword [rcx + 0x50], rax
mov rcx, rbx
call fcn.140086a80
mov rcx, qword [rdi + 0x10]
mov rdx, qword [rcx + 0x50]
nop word [rax + rax]
movzx ecx, word [rax]
lea rax, [rax + 2]
mov word [rdx], cx
lea rdx, [rdx + 2]
test cx, cx
jne 0x140086790
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor edx, edx
xor ecx, ecx
mov rbx, rbp
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov esi, eax
test eax, eax
je 0x1400867e5
mov ecx, esi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdx, rax
mov ecx, esi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
jne 0x1400867e5
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, rbp
cmp dword [rdi + 8], 4
mov rcx, qword [rdi + 0x10]
jne 0x1400867f7
call qword [sym.imp.COMDLG32.dll_GetSaveFileNameW]
jmp 0x1400867fd
call qword [sym.imp.COMDLG32.dll_GetOpenFileNameW]
mov esi, eax
call qword [sym.imp.COMDLG32.dll_CommDlgExtendedError]
mov r14d, eax
test rbx, rbx
je 0x14008681f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test esi, esi
jne 0x140086849
test r14d, r14d
jne 0x140086830
lea eax, [rsi + 1]
jmp 0x1400866b1
xor r8d, r8d
lea rdx, str.CommDlgExtendedError___code_d
lea rcx, [rsp + 0x30]
call fcn.14000a080
jmp 0x140086691
movsxd rax, dword [rdi + 8]
cmp eax, 5
ja case.default.0x140086867
lea rdx, [0x140000000]
mov ecx, dword [rdx + rax*4 + 0x869f8]
add rcx, rdx
jmp rcx
mov rcx, qword [rdi + 0x10]
mov rcx, qword [rcx + 0x30]
call fcn.140086b20
mov rcx, rdi
mov rbx, rax
call fcn.140085780
mov ecx, 8
call fcn.1400fbf44
mov rcx, rbx
mov qword [rdi + 0x28], rax
call fcn.140086cb0
mov rdx, qword [rdi + 0x28]
mov qword [rdx], rax
mov dword [rdi + 0x30], 1
test r15b, r15b
je case.default.0x140086867
mov rdx, qword [rdi + 0x28]
mov rcx, rdi
mov rdx, qword [rdx]
call fcn.1400854c0
xor eax, eax
jmp 0x1400866b1
mov rax, qword [rdi + 0x10]
mov rsi, qword [rax + 0x30]
mov rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x1400868d3
test rax, rax
je 0x14008698c
lea rbx, [rsi + 2]
cmp word [rbx + rax*2], bp
lea rbx, [rbx + rax*2]
je 0x14008698c
mov rcx, rsi
call fcn.140086b20
mov rdx, rax
lea rcx, [rsp + 0x80]
mov r8d, 0x8000
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
mov r8d, 0x8000
lea rdx, [0x140119f10]
lea rcx, [rsp + 0x80]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncat]
mov rcx, rbx
call fcn.140086b20
mov rdx, rax
lea rcx, [rsp + 0x80]
mov r8d, 0x8000
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncat]
lea rdx, [rsp + 0x80]
mov byte [rsp + 0x807f], bpl
mov rcx, rdi
call fcn.1400856c0
mov rax, 0xffffffffffffffff
nop
cmp word [rbx + rax*2 + 2], bp
lea rax, [rax + 1]
jne 0x140086970
lea rbx, [rbx + rax*2]
add rbx, 2
cmp word [rbx], bp
jne 0x1400868f7
cmp dword [rdi + 0x30], ebp
jne 0x1400869a4
mov rcx, rsi
call fcn.140086b20
mov rdx, rax
mov rcx, rdi
call fcn.1400856c0
test r15b, r15b
je case.default.0x140086867
cmp dword [rdi + 0x30], ebp
jle case.default.0x140086867
mov rbx, rbp
mov rax, qword [rdi + 0x28]
mov edx, 0x5c
mov rcx, qword [rbx + rax]
call sub.VCRUNTIME140.dll_strchr
test rax, rax
je 0x1400869e5
nop dword [rax + rax]
mov edx, 0x5c
mov byte [rax], 0x2f
mov rcx, rax
call sub.VCRUNTIME140.dll_strchr
test rax, rax
jne 0x1400869d0
inc ebp
add rbx, 8
cmp ebp, dword [rdi + 0x30]
jl 0x1400869b1
xor eax, eax
jmp 0x1400866b1