Function at 0x14004e990
Capabilities:
Check if file exists
Get file attributes
Set current directory

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
push r12
push r13
push r15
lea rbp, [rsp - 0x21a30]
mov eax, 0x21b30
call fcn.1400bf950
sub rsp, rax
cmp dword [0x140104d68], 4
mov rdi, r9
mov r13, qword [0x1401070a0]
mov r10, r8
mov qword [rsp + 0x58], r13
mov r15, rdx
mov r12, rcx
jl 0x14004e9fe
lea r9, [0x1400cef3c]
xor r8d, r8d
lea rdx, str.The_maximum_number_of_File_Dialogs_has_been_reached.
call fcn.140039270
add rsp, 0x21b30
pop r15
pop r13
pop r12
pop rdi
pop rbp
ret
mov qword [rsp + 0x21b70], rbx
mov qword [rsp + 0x21b28], rsi
mov qword [rsp + 0x21b20], r14
xor r14d, r14d
mov word [rbp + 0x1a20], r14w
lea ebx, [r14 + 0x5c]
test r10, r10
je 0x14004eb4e
cmp word [r8], r14w
je 0x14004eb4e
or rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp word [r8 + rax*2], r14w
jne 0x14004ea40
cmp rax, 0x104
jb 0x14004ea67
mov r8d, 0x104
lea rdx, [rbp + 0x10]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_GetShortPathNameW]
jmp 0x14004ea81
mov r8d, 0x103
lea rcx, [rbp + 0x10]
mov rdx, r10
call fcn.1400b3ca4
mov word [rbp + 0x216], r14w
mov r8d, 3
lea rdx, [0x1400ea750]
lea rcx, [rbp + 0x10]
call fcn.1400b2ee0
test eax, eax
lea rcx, [rbp + 0x10]
sete sil
test sil, sil
je 0x14004eae5
mov edx, 0x7d
call fcn.1400a9d38
test rax, rax
je 0x14004eb53
cmp word [rax + 2], r14w
je 0x14004eb53
lea rcx, [rbp + 0x10]
or rax, 0xffffffffffffffff
nop dword [rax]
cmp word [rcx + rax*2 + 2], r14w
lea rax, [rax + 1]
jne 0x14004ead0
cmp word [rbp + rax*2 + 0xe], bx
jne 0x14004eaf4
jmp 0x14004eb53
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14004eaf4
test al, 0x10
jne 0x14004eb53
mov edx, ebx
lea rcx, [rbp + 0x10]
call fcn.1400a9fcc
mov rbx, rax
test rax, rax
je 0x14004eb2b
lea rdx, [rax + 2]
mov r8d, 0xfffe
lea rcx, [rbp + 0x1a20]
call fcn.1400b3ca4
mov word [rbp + 0x21a1c], r14w
mov word [rbx], r14w
jmp 0x14004eb53
test sil, sil
jne 0x14004eb53
mov r8d, 0xfffe
lea rdx, [rbp + 0x10]
lea rcx, [rbp + 0x1a20]
call fcn.1400b3ca4
mov word [rbp + 0x21a1c], r14w
mov word [rbp + 0x10], r14w
test rdi, rdi
je 0x14004eb7d
cmp word [rdi], r14w
je 0x14004eb7d
mov r8d, 0x3ff
lea rcx, [rbp + 0x1220]
mov rdx, rdi
call fcn.1400b3ca4
mov word [rbp + 0x1a1e], r14w
jmp 0x14004eb9c
mov r9, qword [0x140107e40]
lea r8, str.Select_File____s
mov edx, 0x400
lea rcx, [rbp + 0x1220]
call fcn.14008b8a0
mov rbx, qword [rbp + 0x21a80]
mov word [rbp + 0xa20], r14w
mov word [rbp + 0x220], r14w
cmp word [rbx], r14w
je 0x14004ec19
mov edx, 0x28
mov rcx, rbx
call fcn.1400a9d38
lea rcx, [rbp + 0x220]
mov r8d, 0x3ff
test rax, rax
je 0x14004ec65
lea rdx, [rax + 2]
call fcn.1400b3ca4
mov edx, 0x29
mov word [rbp + 0xa1e], r14w
lea rcx, [rbp + 0x220]
call fcn.1400a9fcc
test rax, rax
je 0x14004ec09
mov word [rax], r14w
jmp 0x14004ec75
mov word [rbp + 0x220], r14w
mov word [rbp + 0xa20], r14w
xor edx, edx
lea rcx, [rsp + 0x78]
mov r8d, SysStringByteLen
call fcn.1400aa320
mov rcx, qword [0x140100a58]
add rcx, 0x68
mov dword [rsp + 0x70], 0x98
call fcn.14006de70
test rax, rax
je 0x14004eeaa
mov rax, qword [0x140100a58]
mov rcx, qword [rax + 0x68]
mov rax, qword [rcx + 8]
mov qword [rsp + 0x78], rax
jmp 0x14004eeaf
mov rdx, rbx
call fcn.1400b3ca4
mov word [rbp + 0xa1e], r14w
cmp word [rbp + 0x220], r14w
je 0x14004ec11
or esi, 0xffffffff
lea rax, [rbp + 0x220]
or rbx, 0xffffffffffffffff
nop dword [rax]
inc rbx
cmp word [rax + rbx*2], r14w
jne 0x14004ec90
xor eax, eax
mov qword [rsp + 0x60], rax
mov r12d, eax
cmp rbx, 0x1388
jb 0x14004ee4b
mov edi, eax
lea r15, [rbp + 0x220]
nop word [rax + rax]
lea rdx, [0x1400e82b4]
mov rcx, r15
call fcn.1400a9dcc
mov r13, rax
test rax, rax
je 0x14004ed6e
inc edi
dec esi
mov dword [rsp + 0x50], edi
mov rdi, rax
sub rdi, r15
sar rdi, 1
lea rcx, [rdi + r12]
mov qword [rsp + 0x68], rcx
cmp rcx, qword [rsp + 0x60]
jb 0x14004ed44
lea rdx, [rbp + 0x220]
movsxd rcx, ecx
sub rax, rdx
movsxd r9, ebx
mov edx, dword [rsp + 0x50]
mov r8d, esi
sar rax, 1
cdqe
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
or rcx, 0xffffffffffffffff
call fcn.14008c590
mov rcx, r14
mov qword [rsp + 0x60], rax
lea rdx, [rax + rax]
call fcn.1400aeb74
test rax, rax
je 0x14004edab
mov r14, rax
test rdi, rdi
je 0x14004ed5e
lea r8, [rdi + rdi]
mov rdx, r15
lea rcx, [r14 + r12*2]
call fcn.1400a9900
mov r12, qword [rsp + 0x68]
mov edi, dword [rsp + 0x50]
lea r15, [r13 + 2]
test esi, esi
jne 0x14004ecc0
test edi, edi
je 0x14004edb8
lea rcx, [rbp + 0x220]
mov rax, r15
sub rax, rcx
sar rax, 1
sub rbx, rax
je 0x14004ee28
lea rdi, [rbx + r12]
cmp rdi, qword [rsp + 0x60]
jb 0x14004ee15
lea rdx, [rdi*2 + 2]
mov rcx, r14
call fcn.1400aeb74
test rax, rax
jne 0x14004ee12
test r14, r14
je 0x14004edb8
mov rcx, r14
call fcn.1400ad430
mov r13, qword [rsp + 0x58]
mov r15, qword [rbp + 0x21a68]
mov r9, qword [rbp + 0x21a80]
lea rax, [rbp + 0x220]
xor r14d, r14d
lea r8, str._s_c_s_cAll_Files__.__c._c
mov qword [rsp + 0x40], r14
lea rcx, [rbp + 0xa20]
mov qword [rsp + 0x38], r14
mov edx, 0x400
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r14
call fcn.14008b8a0
mov r12, qword [rbp + 0x21a60]
jmp 0x14004ec19
mov r14, rax
lea r8, [rbx + rbx]
mov rdx, r15
lea rcx, [r14 + r12*2]
call fcn.1400a9900
mov r12, rdi
xor eax, eax
lea r8, [r12*2 + 2]
mov rdx, r14
mov word [r14 + r12*2], ax
lea rcx, [rbp + 0x220]
call fcn.1400a9900
jmp 0x14004edb0
lea rdi, [rbp + 0x220]
nop dword [rax]
nop word [rax + rax]
lea rdx, [0x1400e82b4]
mov rcx, rdi
call fcn.1400a9dcc
mov rdi, rax
test rax, rax
je 0x14004edc4
lea rcx, [rbp + 0x220]
mov r8, rbx
sub rax, rcx
lea rdx, [rdi + 2]
sar rax, 1
mov rcx, rdi
sub r8, rax
add r8, r8
call fcn.1400a9900
dec rbx
add esi, 0xffffffff
jne 0x14004ee60
jmp 0x14004edc4
mov qword [rsp + 0x78], r14
cmp word [rbp + 0xa20], 0
lea rax, [rbp + 0x1220]
movzx ebx, word [r15]
lea rcx, str.All_Files__._
mov qword [rbp - 0x38], rax
lea rax, [rbp + 0xa20]
cmove rax, rcx
mov dword [rbp - 0x58], 0xfffe
cmp word [rbp + 0x10], 0
mov qword [rbp - 0x78], rax
lea rax, [rbp + 0x1a20]
mov qword [rbp - 0x60], rax
lea rax, [rbp + 0x10]
cmove rax, r14
xor r14b, r14b
xor dil, dil
mov qword [rbp - 0x40], rax
test ebx, 0xffffff80
jne 0x14004ef20
mov edx, 2
mov ecx, ebx
call fcn.1400ad844
test eax, eax
je 0x14004ef20
and ebx, 0xffffffdf
movzx eax, bx
cmp eax, 0x4d
je 0x14004ef32
cmp eax, 0x53
jne 0x14004ef39
mov r14b, 1
jmp 0x14004ef35
mov dil, 1
add r15, 2
mov rcx, r15
call fcn.140010be0
mov rcx, r15
test al, al
je 0x14004ef55
xor edx, edx
lea r8d, [rdx + 0x10]
call fcn.1400aed64
jmp 0x14004ef5a
call fcn.1400ae868
mov ecx, eax
mov edx, 0x180004
test cl, 0x20
mov eax, 0x80004
cmovne eax, edx
mov dword [rbp - 0x30], eax
test cl, 0x10
je 0x14004ef7a
or eax, 2
mov dword [rbp - 0x30], eax
test cl, 8
je 0x14004ef86
bts eax, 0xd
mov dword [rbp - 0x30], eax
test dil, dil
jne 0x14004ef90
test cl, 4
je 0x14004ef97
bts eax, 9
mov dword [rbp - 0x30], eax
test cl, 2
je 0x14004efa3
bts eax, 0xb
mov dword [rbp - 0x30], eax
test cl, 1
je 0x14004efaf
bts eax, 0xc
mov dword [rbp - 0x30], eax
call fcn.140092260
mov rcx, qword [0x140104d70]
xor r9d, r9d
mov r8d, 0x403
movzx esi, al
lea edx, [r9 + 0x44]
call qword [sym.imp.USER32.dll_PostMessageW]
inc dword [0x140104d68]
test r14b, r14b
mov r14, qword [rsp + 0x21b20]
jne 0x14004efff
mov ecx, dword [rbp - 0x30]
test cl, 2
je 0x14004eff2
bt ecx, 0xd
jae 0x14004efff
lea rcx, [rsp + 0x70]
call qword [sym.imp.COMDLG32.dll_GetOpenFileNameW]
jmp 0x14004f00a
lea rcx, [rsp + 0x70]
call qword [sym.imp.COMDLG32.dll_GetSaveFileNameW]
dec dword [0x140104d68]
mov ebx, eax
mov rcx, qword [0x140100a58]
test sil, sil
sete al
mov byte [rcx + 0x12e], sil
mov rsi, qword [rsp + 0x21b28]
mov byte [rcx + 0x12c], al
mov rdx, qword [0x140102ef0]
test rdx, rdx
je 0x14004f067
mov rdx, qword [rdx]
lea rcx, [0x1400cef3c]
test rdx, rdx
mov rax, rcx
cmovne rax, rdx
cmp word [rax], 0
je 0x14004f067
test rdx, rdx
cmovne rcx, rdx
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
xor r9d, r9d
mov byte [rsp + 0x20], 1
or r8, 0xffffffffffffffff
test ebx, ebx
jne 0x14004f0b7
xor edx, edx
mov rcx, r13
call fcn.14008f020
cmp eax, 1
je 0x14004f08d
xor eax, eax
jmp 0x14004f1ff
call qword [sym.imp.COMDLG32.dll_CommDlgExtendedError]
test eax, eax
je 0x14004f0a4
mov rcx, r12
call fcn.14003c580
jmp 0x14004f1ff
mov rcx, qword [0x140104d40]
lea rdx, [0x1400e25dc]
jmp 0x14004f1ee
mov rcx, qword [0x140104d40]
lea rdx, [0x1400cefdc]
call fcn.14008f020
test dword [rbp - 0x30], 0x200
je 0x14004f1e4
test dil, dil
je 0x14004f1b6
lea rcx, [rbp + 0x1a20]
or rax, 0xffffffffffffffff
nop dword [rax + rax]
cmp word [rcx + rax*2 + 2], 0
lea rax, [rax + 1]
jne 0x14004f0f0
cmp word [rbp + rax*2 + 0x1a22], 0
jne 0x14004f186
mov edi, 0x5c
lea rcx, [rbp + 0x1a20]
mov edx, edi
call fcn.1400a9fcc
mov rbx, rax
test rax, rax
je 0x14004f1e4
mov ecx, 0xa
mov word [rax], cx
lea rax, [rbp + 0x1a20]
mov rcx, rbx
sub rcx, rax
and rcx, 0xfffffffffffffffe
cmp rcx, 4
jne 0x14004f1e4
cmp word [rbx - 2], 0x3a
jne 0x14004f1e4
or r8, 0xffffffffffffffff
nop dword [rax + rax]
cmp word [rbx + r8*2 + 2], 0
lea r8, [r8 + 1]
jne 0x14004f160
lea r8, [r8*2 + 2]
mov rdx, rbx
lea rcx, [rbx + 2]
call fcn.1400a9900
mov word [rbx], di
jmp 0x14004f1e4
lea rax, [rbp + 0x1a20]
mov ecx, 0xa
cmp word [rax], 0
je 0x14004f1aa
nop dword [rax + rax]
add rax, 2
cmp word [rax], 0
jne 0x14004f1a0
cmp word [rax + 2], 0
je 0x14004f1e4
mov word [rax], cx
jmp 0x14004f192
lea rax, [rbp + 0x1a20]
mov ecx, 0xa
cmp word [rax], 0
je 0x14004f1da
nop dword [rax + rax]
add rax, 2
cmp word [rax], 0
jne 0x14004f1d0
mov word [rax], cx
cmp word [rax + 2], 0
jne 0x14004f1c2
lea rdx, [rbp + 0x1a20]
mov rcx, r13
xor r9d, r9d
mov byte [rsp + 0x20], 1
or r8, 0xffffffffffffffff
call fcn.14008f020
mov rbx, qword [rsp + 0x21b70]
add rsp, 0x21b30
pop r15
pop r13
pop r12
pop rdi
pop rbp
ret