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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x21a6c
call fcn.004b7400
cmp dword [0x4e5ba4], 4
mov eax, ecx
mov ecx, dword [0x4e73b0]
push ebx
push esi
push edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
jl 0x45a088
push 0x4b9c10
push 0
push str.The_maximum_number_of_File_Dialogs_has_been_reached.
mov ecx, eax
call fcn.004478f0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ebx, dword [sym.imp.VCRUNTIME140.dll_wcschr]
xor eax, eax
mov edi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
mov word [esp + 0x1a78], ax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x45a19f
cmp word [eax], 0
je 0x45a19f
push 0x103
push eax
lea eax, [esp + 0x78]
push eax
call edi
add esp, 0xc
xor eax, eax
mov word [esp + 0x276], ax
lea eax, [esp + 0x70]
push 3
push 0x4d88bc
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncmp]
add esp, 0xc
test eax, eax
sete byte [esp + 0xf]
test eax, eax
lea eax, [esp + 0x70]
jne 0x45a12c
push 0x7d
push eax
call ebx
add esp, 8
test eax, eax
je 0x45a1a6
cmp word [eax + 2], 0
je 0x45a1a6
lea ecx, [esp + 0x70]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x45a113
sub ecx, edx
sar ecx, 1
cmp word [esp + ecx*2 + 0x6e], 0x5c
je 0x45a1a6
jmp 0x45a13c
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x45a13c
test al, 0x10
jne 0x45a1a6
lea eax, [esp + 0x70]
push 0x5c
push eax
call dword [sym.imp.VCRUNTIME140.dll_wcsrchr]
mov esi, eax
add esp, 8
test esi, esi
je 0x45a177
push 0xfffe
lea ecx, [esi + 2]
push ecx
lea eax, [esp + 0x1a80]
push eax
call edi
add esp, 0xc
xor eax, eax
mov word [esp + 0x21a74], ax
mov word [esi], ax
jmp 0x45a1a6
cmp byte [esp + 0xf], 0
jne 0x45a1a6
push 0xfffe
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0x1a80]
push eax
call edi
add esp, 0xc
xor eax, eax
mov word [esp + 0x21a74], ax
xor eax, eax
mov word [esp + 0x70], ax
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x45a1d2
cmp word [eax], 0
je 0x45a1d2
push 0x3ff
push eax
lea eax, [esp + 0xa80]
push eax
call edi
add esp, 0xc
xor eax, eax
mov word [esp + 0x1276], ax
jmp 0x45a1f2
push dword [0x4e8834]
lea eax, [esp + 0xa7c]
push str.Select_File____s
push 0x400
push eax
call fcn.0049c640
add esp, 0x10
mov esi, dword [ebp + 0x14]
xor eax, eax
mov word [esp + 0x1278], ax
mov word [esp + 0x278], ax
cmp word [esi], ax
je 0x45a2d4
push 0x28
push esi
call ebx
add esp, 8
push 0x3ff
test eax, eax
je 0x45a266
add eax, 2
push eax
lea eax, [esp + 0x280]
push eax
call edi
add esp, 0xc
xor eax, eax
mov word [esp + 0xa76], ax
lea eax, [esp + 0x278]
push 0x29
push eax
call dword [sym.imp.VCRUNTIME140.dll_wcsrchr]
add esp, 8
test eax, eax
je 0x45a25a
xor ecx, ecx
mov word [eax], cx
jmp 0x45a27e
xor eax, eax
mov word [esp + 0x278], ax
jmp 0x45a2d4
lea eax, [esp + 0x27c]
push esi
push eax
call edi
add esp, 0xc
xor eax, eax
mov word [esp + 0xa76], ax
cmp word [esp + 0x278], 0
je 0x45a2d4
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push 1
push 0x4b9c10
mov edx, 0x4d6afc
lea ecx, [esp + 0x290]
call fcn.0049ce20
push 0
push 0
push 0
lea eax, [esp + 0x29c]
push eax
push 0
push esi
push str._s_c_s_cAll_Files__.__c._c
lea eax, [esp + 0x12ac]
push 0x400
push eax
call fcn.0049c640
add esp, 0x3c
push 0x58
lea eax, [esp + 0x1c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov ecx, dword [0x4e30fc]
add esp, 0xc
mov dword [esp + 0x18], 0x58
lea ecx, [ecx + 0x4c]
call fcn.00479450
test eax, eax
je 0x45a310
mov eax, dword [0x4e30fc]
mov eax, dword [eax + 0x4c]
mov eax, dword [eax + 4]
mov dword [esp + 0x1c], eax
jmp 0x45a318
mov dword [esp + 0x1c], 0
cmp word [esp + 0x1278], 0
lea eax, [esp + 0xa78]
mov esi, dword [ebp + 8]
mov ecx, str.All_Files__._
mov dword [esp + 0x48], eax
lea eax, [esp + 0x1278]
cmove eax, ecx
mov dword [esp + 0x38], 0xfffe
mov dword [esp + 0x24], eax
xor ecx, ecx
cmp word [esp + 0x70], cx
lea eax, [esp + 0x1a78]
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
je 0x45a37c
xor eax, eax
jmp 0x45a388
push 2
push edi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__isctype]
add esp, 8
mov ecx, edi
and ecx, 0xffffffdf
test eax, eax
cmove ecx, edi
cmp ecx, 0x4d
je 0x45a3a3
cmp ecx, 0x53
jne 0x45a3a8
mov byte [esp + 0xf], 1
jmp 0x45a3a5
mov bh, 1
add esi, 2
mov ecx, esi
call fcn.00404af0
test al, al
je 0x45a3c3
push 0x10
push 0
push esi
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_wcstol]
add esp, 0xc
jmp 0x45a3cd
push esi
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtoi]
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 0x45a3ef
or eax, 2
mov dword [esp + 0x4c], eax
test cl, 8
je 0x45a3fd
or eax, 0x2000
mov dword [esp + 0x4c], eax
test bh, bh
jne 0x45a406
test cl, 4
je 0x45a40f
or eax, 0x200
mov dword [esp + 0x4c], eax
test cl, 2
je 0x45a41d
or eax, 0x800
mov dword [esp + 0x4c], eax
test cl, 1
je 0x45a42b
or eax, 0x1000
mov dword [esp + 0x4c], eax
call fcn.004a2ed0
push 0
push 0x403
push 0x44
push dword [0x4e5ba8]
mov bl, al
call dword [sym.imp.USER32.dll_PostMessageW]
inc dword [0x4e5ba4]
cmp byte [esp + 0xf], 0
jne 0x45a470
mov eax, dword [esp + 0x4c]
test al, 2
je 0x45a463
test eax, 0x2000
je 0x45a470
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameW]
jmp 0x45a47b
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.COMDLG32.dll_GetSaveFileNameW]
dec dword [0x4e5ba4]
mov esi, eax
mov ecx, dword [0x4e30fc]
test bl, bl
sete al
mov byte [ecx + 0xee], bl
mov byte [ecx + 0xec], al
cmp word [0x4e5980], 0
je 0x45a4af
push 0x4e5980
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 1
push 0
push 0xffffffffffffffff
test esi, esi
jne 0x45a528
mov ecx, dword [esp + 0x1c]
push esi
call fcn.004a05c0
cmp eax, 1
je 0x45a4d3
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 0x45a509
mov eax, dword [0x4e30fc]
test byte [eax + 0x100], 1
je 0x45a509
mov ecx, dword [esp + 0x14]
push 0x4b9c10
push 0
push 0x4cffc4
call fcn.00447640
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [0x4e5b90]
push 1
push 0
push 0xffffffffffffffff
push 0x4cffc4
call fcn.004a05c0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [0x4e5b90]
push 0x4b9cc4
call fcn.004a05c0
test dword [esp + 0x4c], 0x200
je 0x45a64b
test bh, bh
je 0x45a61d
lea ecx, [esp + 0x1a78]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x45a560
sub ecx, edx
lea eax, [esp + 0x1a78]
sar ecx, 1
cmp word [esp + ecx*2 + 0x1a7a], 0
jne 0x45a5f4
push 0x5c
push eax
call dword [sym.imp.VCRUNTIME140.dll_wcsrchr]
mov esi, eax
add esp, 8
test esi, esi
je 0x45a64b
mov eax, 0xa
mov ecx, esi
mov word [esi], ax
lea eax, [esp + 0x1a78]
sub ecx, eax
and ecx, 0xfffffffe
cmp ecx, 4
jne 0x45a64b
cmp word [esi - 2], 0x3a
jne 0x45a64b
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x45a5c6
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [esi + 2]
push esi
push eax
call sub.VCRUNTIME140.dll_memmove
mov eax, 0x5c
add esp, 0xc
mov word [esi], ax
jmp 0x45a64b
movzx ecx, word [esp + 0x1a78]
mov edx, 0xa
test cx, cx
je 0x45a60f
add eax, 2
cmp word [eax], 0
jne 0x45a606
cmp word [eax + 2], 0
je 0x45a64b
mov word [eax], dx
mov ecx, edx
jmp 0x45a601
movzx ecx, word [esp + 0x1a78]
lea eax, [esp + 0x1a78]
mov edx, 0xa
test cx, cx
je 0x45a63f
add eax, 2
cmp word [eax], 0
jne 0x45a636
mov word [eax], dx
mov ecx, edx
cmp word [eax + 2], 0
jne 0x45a631
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x1a78]
push 1
push 0
push 0xffffffffffffffff
push eax
call fcn.004a05c0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10