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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x21a84
call fcn.004ab360
cmp dword [0x4db77c], 4
mov eax, ecx
mov ecx, dword [0x4ddf18]
push ebx
push esi
push edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
jl 0x446358
push 0x4c602c
push 0
push str.The_maximum_number_of_File_Dialogs_has_been_reached.
mov ecx, eax
call fcn.004351a0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
xor eax, eax
mov word [esp + 0x1a90], ax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x44646e
cmp word [eax], 0
je 0x44646e
push 0x103
push eax
lea eax, [esp + 0x78]
push eax
call fcn.0049ef24
add esp, 0xc
xor eax, eax
mov word [esp + 0x276], ax
lea eax, [esp + 0x70]
push 3
push 0x4d0abc
push eax
call fcn.0049e48d
add esp, 0xc
test eax, eax
lea eax, [esp + 0x70]
sete bl
test bl, bl
je 0x4463f9
push 0x7d
push eax
call fcn.00492ca4
add esp, 8
test eax, eax
je 0x446475
cmp word [eax + 2], 0
je 0x446475
lea ecx, [esp + 0x70]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4463e0
sub ecx, edx
sar ecx, 1
cmp word [esp + ecx*2 + 0x6e], 0x5c
jne 0x446409
jmp 0x446475
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x446409
test al, 0x10
jne 0x446475
lea eax, [esp + 0x70]
push 0x5c
push eax
call fcn.00492647
mov esi, eax
add esp, 8
test esi, esi
je 0x446446
push 0xfffe
lea ecx, [esi + 2]
push ecx
lea eax, [esp + 0x1a98]
push eax
call fcn.0049ef24
add esp, 0xc
xor eax, eax
mov word [esp + 0x21a8c], ax
mov word [esi], ax
jmp 0x446475
test bl, bl
jne 0x446475
push 0xfffe
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0x1a98]
push eax
call fcn.0049ef24
add esp, 0xc
xor eax, eax
mov word [esp + 0x21a8c], ax
xor eax, eax
mov word [esp + 0x70], ax
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4464a4
cmp word [eax], 0
je 0x4464a4
push 0x3ff
push eax
lea eax, [esp + 0x1290]
push eax
call fcn.0049ef24
add esp, 0xc
xor eax, eax
mov word [esp + 0x1a86], ax
jmp 0x4464c4
push dword [0x4deb9c]
lea eax, [esp + 0x128c]
push str.Select_File____s
push 0x400
push eax
call fcn.004782d0
add esp, 0x10
mov esi, dword [ebp + 0x14]
xor eax, eax
mov word [esp + 0xa88], ax
mov word [esp + 0x280], ax
cmp word [esi], ax
je 0x446545
push 0x28
push esi
call fcn.00492ca4
add esp, 8
push 0x3ff
test eax, eax
je 0x446585
add eax, 2
push eax
lea eax, [esp + 0x288]
push eax
call fcn.0049ef24
add esp, 0xc
xor eax, eax
mov word [esp + 0xa7e], ax
lea eax, [esp + 0x280]
push 0x29
push eax
call fcn.00492647
add esp, 8
test eax, eax
je 0x446531
xor ecx, ecx
mov word [eax], cx
jmp 0x4465a0
xor eax, eax
mov word [esp + 0x280], ax
xor eax, eax
mov word [esp + 0xa88], ax
push 0x54
lea eax, [esp + 0x20]
push 0
push eax
call fcn.00493930
mov ecx, dword [0x4d89c0]
add esp, 0xc
mov dword [esp + 0x18], 0x58
lea ecx, [ecx + 0x4c]
call fcn.0045f910
test eax, eax
je 0x4465fb
mov eax, dword [0x4d89c0]
mov eax, dword [eax + 0x4c]
mov eax, dword [eax + 4]
mov dword [esp + 0x1c], eax
jmp 0x446603
lea eax, [esp + 0x284]
push esi
push eax
call fcn.0049ef24
add esp, 0xc
xor eax, eax
mov word [esp + 0xa7e], ax
cmp word [esp + 0x280], 0
je 0x44653b
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push 1
push 0x4c602c
mov edx, 0x4ce9c4
lea ecx, [esp + 0x298]
call fcn.00478ae0
push 0
push 0
push 0
lea eax, [esp + 0x2a4]
push eax
push 0
push esi
push str._s_c_s_cAll_Files__.__c._c
lea eax, [esp + 0xabc]
push 0x400
push eax
call fcn.004782d0
add esp, 0x3c
jmp 0x446545
mov dword [esp + 0x1c], 0
cmp word [esp + 0xa88], 0
lea eax, [esp + 0x1288]
mov esi, dword [ebp + 8]
mov ecx, str.All_Files__._
mov dword [esp + 0x48], eax
lea eax, [esp + 0xa88]
cmove eax, ecx
mov dword [esp + 0x38], 0xfffe
mov dword [esp + 0x24], eax
xor ecx, ecx
cmp word [esp + 0x70], cx
lea eax, [esp + 0x1a90]
movzx edi, word [esi]
mov dword [esp + 0x34], eax
lea eax, [esp + 0x70]
cmove eax, ecx
mov byte [esp + 0xf], cl
xor bh, bh
mov dword [esp + 0x44], eax
test edi, 0xffffff80
jne 0x446675
push 2
push edi
call fcn.00498ea3
add esp, 8
test eax, eax
je 0x446675
and edi, 0xffffffdf
movzx eax, di
cmp eax, 0x4d
je 0x446689
cmp eax, 0x53
jne 0x44668e
mov byte [esp + 0xf], 1
jmp 0x44668b
mov bh, 1
add esi, 2
mov ecx, esi
call fcn.00403e00
test al, al
je 0x4466a8
push 0x10
push 0
push esi
call fcn.00495c2d
add esp, 0xc
jmp 0x4466b1
push esi
call fcn.00495cca
add esp, 4
mov ecx, eax
mov edx, 0x180004
test cl, 0x20
mov eax, 0x80004
cmovne eax, edx
mov dword [esp + 0x4c], eax
test cl, 0x10
je 0x4466d3
or eax, 2
mov dword [esp + 0x4c], eax
test cl, 8
je 0x4466e1
or eax, 0x2000
mov dword [esp + 0x4c], eax
test bh, bh
jne 0x4466ea
test cl, 4
je 0x4466f3
or eax, 0x200
mov dword [esp + 0x4c], eax
test cl, 2
je 0x446701
or eax, 0x800
mov dword [esp + 0x4c], eax
test cl, 1
je 0x44670f
or eax, 0x1000
mov dword [esp + 0x4c], eax
call fcn.0047db60
push 0
push 0x403
push 0x44
push dword [0x4db780]
mov bl, al
call dword [sym.imp.USER32.dll_PostMessageW]
inc dword [0x4db77c]
cmp byte [esp + 0xf], 0
jne 0x446754
mov eax, dword [esp + 0x4c]
test al, 2
je 0x446747
test eax, 0x2000
je 0x446754
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameW]
jmp 0x44675f
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.COMDLG32.dll_GetSaveFileNameW]
dec dword [0x4db77c]
mov esi, eax
mov ecx, dword [0x4d89c0]
test bl, bl
sete al
mov byte [ecx + 0xee], bl
mov byte [ecx + 0xec], al
cmp word [0x4db558], 0
je 0x446793
push 0x4db558
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 1
push 0
push 0xffffffffffffffff
test esi, esi
jne 0x4467f2
mov ecx, dword [esp + 0x1c]
push esi
call fcn.0047b2f0
cmp eax, 1
je 0x4467b7
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
call dword [sym.imp.COMDLG32.dll_CommDlgExtendedError]
test eax, eax
je 0x4467d3
mov ecx, dword [esp + 0x14]
call fcn.00436ff0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [0x4db768]
push 1
push 0
push 0xffffffffffffffff
push 0x4c8740
call fcn.0047b2f0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [0x4db768]
push 0x4b41e8
call fcn.0047b2f0
test dword [esp + 0x4c], 0x200
je 0x446903
test bh, bh
je 0x4468db
lea ecx, [esp + 0x1a90]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x446822
sub ecx, edx
lea eax, [esp + 0x1a90]
sar ecx, 1
cmp word [esp + ecx*2 + 0x1a92], 0
jne 0x4468b5
push 0x5c
push eax
call fcn.00492647
mov esi, eax
add esp, 8
test esi, esi
je 0x446903
mov eax, 0xa
mov ecx, esi
mov word [esi], ax
lea eax, [esp + 0x1a90]
sub ecx, eax
and ecx, 0xfffffffe
cmp ecx, 4
jne 0x446903
cmp word [esi - 2], 0x3a
jne 0x446903
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x446887
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [esi + 2]
push esi
push eax
call fcn.00492730
mov eax, 0x5c
add esp, 0xc
mov word [esi], ax
jmp 0x446903
mov ecx, 0xa
nop word [eax + eax]
cmp word [eax], 0
je 0x4468cf
add eax, 2
cmp word [eax], 0
jne 0x4468c6
cmp word [eax + 2], 0
je 0x446903
mov word [eax], cx
jmp 0x4468c0
lea eax, [esp + 0x1a90]
mov ecx, 0xa
cmp word [eax], 0
je 0x4468f9
nop dword [eax]
add eax, 2
cmp word [eax], 0
jne 0x4468f0
mov word [eax], cx
cmp word [eax + 2], 0
jne 0x4468e7
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x1a90]
push 1
push 0
push 0xffffffffffffffff
push eax
call fcn.0047b2f0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10