Function at 0x461390
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.004cb9b0
cmp dword [0x4f99e4], 4
mov eax, ecx
mov ecx, dword [0x4fb218]
push ebx
push esi
push edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
jl 0x4613d8
push 0x4cdc40
push 0
push str.The_maximum_number_of_File_Dialogs_has_been_reached.
mov ecx, eax
call fcn.0044d800
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov edx, dword [ebp + 0xc]
xor eax, eax
mov edi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
mov word [esp + 0x1a78], ax
test edx, edx
je 0x46151a
cmp word [edx], ax
je 0x46151a
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x461401
sub ecx, esi
lea eax, [esp + 0x70]
sar ecx, 1
cmp ecx, 0x104
jb 0x46142b
push 0x104
push eax
push edx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
jmp 0x461441
push 0x103
push edx
push eax
call edi
add esp, 0xc
xor eax, eax
mov word [esp + 0x276], ax
push 3
lea eax, [esp + 0x74]
push 0x4eceac
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncmp]
add esp, 0xc
test eax, eax
sete bl
test eax, eax
lea eax, [esp + 0x70]
jne 0x4614a9
push 0x7d
push eax
call dword [sym.imp.VCRUNTIME140.dll_wcschr]
add esp, 8
test eax, eax
je 0x461521
cmp word [eax + 2], 0
je 0x461521
lea ecx, [esp + 0x70]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x461490
sub ecx, edx
sar ecx, 1
cmp word [esp + ecx*2 + 0x6e], 0x5c
je 0x461521
jmp 0x4614b9
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4614b9
test al, 0x10
jne 0x461521
lea eax, [esp + 0x70]
push 0x5c
push eax
mov eax, dword [sym.imp.VCRUNTIME140.dll_wcsrchr]
call eax
mov esi, eax
add esp, 8
test esi, esi
je 0x4614f5
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 0x461521
test bl, bl
jne 0x461521
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 0x46154d
cmp word [eax], 0
je 0x46154d
push 0x3ff
push eax
lea eax, [esp + 0xa80]
push eax
call edi
add esp, 0xc
xor eax, eax
mov word [esp + 0x1276], ax
jmp 0x46156d
push dword [0x4fc660]
lea eax, [esp + 0xa7c]
push str.Select_File____s
push 0x400
push eax
call fcn.004af890
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 0x461653
push 0x28
push esi
call dword [sym.imp.VCRUNTIME140.dll_wcschr]
add esp, 8
push 0x3ff
test eax, eax
je 0x4615e5
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 0x4615d9
xor ecx, ecx
mov word [eax], cx
jmp 0x4615fd
xor eax, eax
mov word [esp + 0x278], ax
jmp 0x461653
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 0x461653
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push 1
push 0x4cdc40
mov edx, 0x4eb10c
lea ecx, [esp + 0x290]
call fcn.004b0090
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.004af890
add esp, 0x3c
push 0x58
lea eax, [esp + 0x1c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov edi, dword [0x4f70f4]
add esp, 0xc
mov dword [esp + 0x18], 0x58
mov esi, dword [edi + 0x4c]
test esi, esi
je 0x4616b4
cmp dword [esi + 4], 0
jne 0x461759
mov ecx, dword [esi]
cmp word [ecx], 0
jne 0x461720
add dword [esi + 0x20], 0xffffffff
jne 0x4616ad
push ecx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
push 0xd8
push esi
call fcn.004ca9d4
add esp, 8
mov dword [edi + 0x4c], 0
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 0x461768
xor eax, eax
jmp 0x461774
call fcn.00487040
mov esi, eax
test esi, esi
je 0x4616b4
inc dword [esi + 0x20]
mov ebx, dword [edi + 0x4c]
add dword [ebx + 0x20], 0xffffffff
jne 0x461750
push dword [ebx]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
push 0xd8
push ebx
call fcn.004ca9d4
add esp, 8
mov dword [edi + 0x4c], esi
mov edi, dword [0x4f70f4]
mov eax, dword [edi + 0x4c]
mov eax, dword [eax + 4]
mov dword [esp + 0x1c], eax
jmp 0x4616bc
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 0x46178f
cmp ecx, 0x53
jne 0x461794
mov byte [esp + 0xf], 1
jmp 0x461791
mov bh, 1
add esi, 2
mov ecx, esi
call fcn.00419330
test al, 0x20
mov ecx, 0x80004
mov edx, 0x180004
cmovne ecx, edx
mov dword [esp + 0x4c], ecx
test al, 0x10
je 0x4617b9
or ecx, 2
mov dword [esp + 0x4c], ecx
test al, 8
je 0x4617c7
or ecx, 0x2000
mov dword [esp + 0x4c], ecx
test bh, bh
jne 0x4617cf
test al, 4
je 0x4617d9
or ecx, 0x200
mov dword [esp + 0x4c], ecx
test al, 2
je 0x4617e7
or ecx, 0x800
mov dword [esp + 0x4c], ecx
test al, 1
je 0x4617f5
or ecx, 0x1000
mov dword [esp + 0x4c], ecx
call fcn.004b6da0
push 0
push 0x403
push 0x44
push dword [0x4f99e8]
mov bl, al
call dword [sym.imp.USER32.dll_PostMessageW]
inc dword [0x4f99e4]
cmp byte [esp + 0xf], 0
jne 0x46183a
mov eax, dword [esp + 0x4c]
test al, 2
je 0x46182d
test eax, 0x2000
je 0x46183a
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameW]
jmp 0x461845
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.COMDLG32.dll_GetSaveFileNameW]
dec dword [0x4f99e4]
mov esi, eax
mov ecx, dword [0x4f70f4]
test bl, bl
sete al
mov byte [ecx + 0xee], bl
mov byte [ecx + 0xec], al
mov eax, dword [0x4f8b50]
test eax, eax
je 0x461886
mov eax, dword [eax]
mov ecx, 0x4cdc40
test eax, eax
cmovne ecx, eax
cmp word [ecx], 0
je 0x461886
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 1
push 0
push 0xffffffffffffffff
test esi, esi
jne 0x4618ff
mov ecx, dword [esp + 0x1c]
push esi
call fcn.004b3f70
cmp eax, 1
je 0x4618aa
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 0x4618e0
mov eax, dword [0x4f70f4]
test byte [eax + 0x100], 1
je 0x4618e0
mov ecx, dword [esp + 0x14]
push 0x4cdc40
push 0
push 0x4e413c
call fcn.0044d370
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [0x4f99cc]
push 1
push 0
push 0xffffffffffffffff
push 0x4e413c
call fcn.004b3f70
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [0x4f99cc]
push 0x4cdd08
call fcn.004b3f70
test dword [esp + 0x4c], 0x200
je 0x461a1c
test bh, bh
je 0x4619ee
lea ecx, [esp + 0x1a78]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x461930
sub ecx, edx
lea eax, [esp + 0x1a78]
sar ecx, 1
cmp word [esp + ecx*2 + 0x1a7a], 0
jne 0x4619c5
push 0x5c
push eax
mov eax, dword [sym.imp.VCRUNTIME140.dll_wcsrchr]
call eax
mov esi, eax
add esp, 8
test esi, esi
je 0x461a1c
mov eax, 0xa
mov ecx, esi
mov word [esi], ax
lea eax, [esp + 0x1a78]
sub ecx, eax
and ecx, 0xfffffffe
cmp ecx, 4
jne 0x461a1c
cmp word [esi - 2], 0x3a
jne 0x461a1c
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x461997
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 0x461a1c
movzx ecx, word [esp + 0x1a78]
mov edx, 0xa
test cx, cx
je 0x4619e0
add eax, 2
cmp word [eax], 0
jne 0x4619d7
cmp word [eax + 2], 0
je 0x461a1c
mov word [eax], dx
mov ecx, edx
jmp 0x4619d2
movzx ecx, word [esp + 0x1a78]
lea eax, [esp + 0x1a78]
mov edx, 0xa
test cx, cx
je 0x461a10
add eax, 2
cmp word [eax], 0
jne 0x461a07
mov word [eax], dx
mov ecx, edx
cmp word [eax + 2], 0
jne 0x461a02
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x1a78]
push 1
push 0
push 0xffffffffffffffff
push eax
call fcn.004b3f70
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10