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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x21a8c
call fcn.004cd440
cmp dword [0x4fb9fc], 4
mov eax, ecx
mov ecx, dword [0x4fd228]
push ebx
push esi
push edi
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
jl 0x461238
push 0x4cfc30
push 0
push str.The_maximum_number_of_File_Dialogs_has_been_reached.
mov ecx, eax
call fcn.0044e550
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov edx, dword [ebp + 0xc]
xor eax, eax
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
mov word [esp + 0x1a98], ax
test edx, edx
je 0x46138c
cmp word [edx], ax
je 0x46138c
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x461261
sub ecx, edi
lea eax, [esp + 0x90]
sar ecx, 1
cmp ecx, 0x104
jb 0x46128e
push 0x104
push eax
push edx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
jmp 0x4612a4
push 0x103
push edx
push eax
call esi
add esp, 0xc
xor eax, eax
mov word [esp + 0x296], ax
push 3
lea eax, [esp + 0x94]
push 0x4eee64
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncmp]
mov ebx, eax
add esp, 0xc
lea eax, [esp + 0x90]
test ebx, ebx
jne 0x461311
push 0x7d
push eax
call dword [sym.imp.VCRUNTIME140.dll_wcschr]
add esp, 8
test eax, eax
je 0x461396
cmp word [eax + 2], bx
je 0x461396
lea ecx, [esp + 0x90]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4612f1
sub ecx, edx
sar ecx, 1
cmp word [esp + ecx*2 + 0x8e], 0x5c
je 0x461396
jmp 0x461325
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x461325
test al, 0x10
jne 0x461396
lea eax, [esp + 0x90]
push 0x5c
push eax
mov eax, dword [sym.imp.VCRUNTIME140.dll_wcsrchr]
call eax
mov edi, eax
add esp, 8
test edi, edi
je 0x461364
push 0xfffe
lea ecx, [edi + 2]
push ecx
lea eax, [esp + 0x1aa0]
push eax
call esi
add esp, 0xc
xor eax, eax
mov word [esp + 0x21a94], ax
mov word [edi], ax
jmp 0x461396
test ebx, ebx
je 0x461396
push 0xfffe
lea eax, [esp + 0x94]
push eax
lea eax, [esp + 0x1aa0]
push eax
call esi
add esp, 0xc
xor eax, eax
mov word [esp + 0x21a94], ax
xor eax, eax
mov word [esp + 0x90], ax
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4613c2
cmp word [eax], 0
je 0x4613c2
push 0x3ff
push eax
lea eax, [esp + 0xaa0]
push eax
call esi
add esp, 0xc
xor eax, eax
mov word [esp + 0x1296], ax
jmp 0x4613e2
push dword [0x4fe678]
lea eax, [esp + 0xa9c]
push str.Select_File____s
push 0x400
push eax
call fcn.004b0fe0
add esp, 0x10
mov ebx, dword [ebp + 0x14]
xor eax, eax
mov word [esp + 0x1298], ax
mov word [esp + 0x298], ax
cmp word [ebx], ax
je 0x46145b
push 0x28
push ebx
call dword [sym.imp.VCRUNTIME140.dll_wcschr]
add esp, 8
push 0x3ff
test eax, eax
je 0x461537
add eax, 2
push eax
lea eax, [esp + 0x2a0]
push eax
call esi
add esp, 0xc
xor eax, eax
mov word [esp + 0xa96], ax
lea eax, [esp + 0x298]
push 0x29
push eax
call dword [sym.imp.VCRUNTIME140.dll_wcsrchr]
add esp, 8
test eax, eax
je 0x461451
xor ecx, ecx
mov word [eax], cx
jmp 0x46154f
xor eax, eax
mov word [esp + 0x298], ax
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push 0x58
lea eax, [esp + 0x3c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov esi, dword [0x4f90f4]
add esp, 0xc
mov dword [esp + 0x38], 0x58
mov edi, dword [esi + 0x4c]
test edi, edi
je 0x4614be
cmp dword [edi + 4], 0
jne 0x4617e1
mov ecx, dword [edi]
cmp word [ecx], 0
jne 0x4617a4
add dword [edi + 0x20], 0xffffffff
jne 0x4614b7
push ecx
call ebx
add esp, 4
push 0xd8
push edi
call fcn.004cc464
add esp, 8
mov dword [esi + 0x4c], 0
mov dword [esp + 0x3c], 0
cmp word [esp + 0x1298], 0
lea eax, [esp + 0xa98]
mov esi, dword [ebp + 8]
mov ecx, str.All_Files__._
mov dword [esp + 0x68], eax
lea eax, [esp + 0x1298]
cmove eax, ecx
mov dword [esp + 0x58], 0xfffe
mov dword [esp + 0x44], eax
xor ecx, ecx
cmp word [esp + 0x90], cx
lea eax, [esp + 0x1a98]
movzx edi, word [esi]
mov dword [esp + 0x54], eax
lea eax, [esp + 0x90]
cmove eax, ecx
mov byte [esp + 0x13], cl
xor bh, bh
mov dword [esp + 0x64], eax
test edi, 0xffffff80
je 0x4617f0
xor eax, eax
jmp 0x4617fc
lea eax, [esp + 0x29c]
push ebx
push eax
call esi
add esp, 0xc
xor eax, eax
mov word [esp + 0xa96], ax
cmp word [esp + 0x298], 0
je 0x46145b
lea esi, [esp + 0x298]
or ebx, 0xffffffff
lea ecx, [esi + 2]
nop dword [eax + eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x461570
sub esi, ecx
mov dword [esp + 0x14], 0
xor edi, edi
sar esi, 1
mov dword [esp + 0x18], edi
mov dword [esp + 0x24], edi
cmp esi, 0x1388
jb 0x46171f
lea eax, [esp + 0x298]
mov dword [esp + 0x20], edi
mov dword [esp + 0x1c], eax
nop dword [eax]
push 0x4ed0b4
push eax
call dword [sym.imp.VCRUNTIME140.dll_wcsstr]
add esp, 8
mov dword [esp + 0x34], eax
test eax, eax
je 0x46166e
mov edx, dword [esp + 0x1c]
mov edi, eax
mov ecx, dword [esp + 0x18]
sub edi, edx
inc dword [esp + 0x20]
dec ebx
sar edi, 1
add ecx, edi
mov dword [esp + 0x30], ecx
cmp ecx, dword [esp + 0x24]
jb 0x46162e
lea edx, [esp + 0x298]
sub eax, edx
mov edx, dword [esp + 0x20]
sar eax, 1
push eax
push ecx
push esi
push ebx
or ecx, 0xffffffff
call fcn.004b1bc0
mov dword [esp + 0x34], eax
lea ecx, [eax + eax]
push ecx
push dword [esp + 0x28]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
add esp, 0x18
test eax, eax
je 0x4616cd
mov edx, dword [esp + 0x1c]
mov ecx, eax
mov dword [esp + 0x14], ecx
jmp 0x461632
mov ecx, dword [esp + 0x14]
test edi, edi
je 0x461655
lea eax, [edi + edi]
push eax
mov eax, dword [esp + 0x1c]
push edx
lea eax, [ecx + eax*2]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov edi, dword [esp + 0x3c]
add esp, 0xc
mov dword [esp + 0x18], edi
jmp 0x461659
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x34]
add eax, 2
mov dword [esp + 0x1c], eax
test ebx, ebx
jne 0x4615b0
jmp 0x461672
mov eax, dword [esp + 0x1c]
cmp dword [esp + 0x20], 0
je 0x46176c
lea ecx, [esp + 0x298]
sub eax, ecx
sar eax, 1
sub esi, eax
je 0x4616ea
lea ebx, [esi + edi]
mov edi, dword [esp + 0x14]
cmp ebx, dword [esp + 0x24]
jb 0x4616b1
lea eax, [ebx*2 + 2]
push eax
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
add esp, 8
test eax, eax
je 0x4616d1
mov edi, eax
lea eax, [esi + esi]
push eax
mov eax, dword [esp + 0x1c]
push dword [esp + 0x20]
lea eax, [edi + eax*2]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, ebx
jmp 0x4616f2
mov edi, dword [esp + 0x14]
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test edi, edi
je 0x461772
push edi
call ebx
add esp, 4
jmp 0x461772
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
xor ecx, ecx
mov word [edi + eax*2], cx
lea eax, [eax*2 + 2]
push eax
lea eax, [esp + 0x29c]
push edi
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 0xc
push edi
call ebx
add esp, 4
jmp 0x461772
lea edi, [esp + 0x298]
nop word [eax + eax]
push 0x4ed0b4
push edi
call dword [sym.imp.VCRUNTIME140.dll_wcsstr]
mov edi, eax
add esp, 8
test edi, edi
je 0x46176c
lea eax, [esp + 0x298]
mov ecx, edi
sub ecx, eax
mov eax, esi
sar ecx, 1
sub eax, ecx
add eax, eax
push eax
lea eax, [edi + 2]
push eax
push edi
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
dec esi
sub ebx, 1
jne 0x461730
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push 0
push 0
push 0
lea eax, [esp + 0x2a4]
push eax
push 0
push dword [ebp + 0x14]
lea eax, [esp + 0x12b0]
push str._s_c_s_cAll_Files__.__c._c
push 0x400
push eax
call fcn.004b0fe0
add esp, 0x24
jmp 0x461461
call fcn.004874f0
mov edi, eax
test edi, edi
je 0x4614be
inc dword [edi + 0x20]
mov ebx, dword [esi + 0x4c]
add dword [ebx + 0x20], 0xffffffff
jne 0x4617d8
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.004cc464
add esp, 8
mov dword [esi + 0x4c], edi
mov esi, dword [0x4f90f4]
mov eax, dword [esi + 0x4c]
mov eax, dword [eax + 4]
mov dword [esp + 0x3c], eax
jmp 0x4614c6
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 0x461817
cmp ecx, 0x53
jne 0x46181c
mov byte [esp + 0x13], 1
jmp 0x461819
mov bh, 1
add esi, 2
mov ecx, esi
call fcn.0041a370
test al, 0x20
mov ecx, 0x80004
mov edx, 0x180004
cmovne ecx, edx
mov dword [esp + 0x6c], ecx
test al, 0x10
je 0x461841
or ecx, 2
mov dword [esp + 0x6c], ecx
test al, 8
je 0x46184f
or ecx, 0x2000
mov dword [esp + 0x6c], ecx
test bh, bh
jne 0x461857
test al, 4
je 0x461861
or ecx, 0x200
mov dword [esp + 0x6c], ecx
test al, 2
je 0x46186f
or ecx, 0x800
mov dword [esp + 0x6c], ecx
test al, 1
je 0x46187d
or ecx, 0x1000
mov dword [esp + 0x6c], ecx
call fcn.004b8550
push 0
push 0x403
push 0x44
push dword [0x4fba00]
mov bl, al
call dword [sym.imp.USER32.dll_PostMessageW]
inc dword [0x4fb9fc]
cmp byte [esp + 0x13], 0
jne 0x4618c2
mov eax, dword [esp + 0x6c]
test al, 2
je 0x4618b5
test eax, 0x2000
je 0x4618c2
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameW]
jmp 0x4618cd
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.COMDLG32.dll_GetSaveFileNameW]
dec dword [0x4fb9fc]
mov esi, eax
mov eax, dword [0x4f90f4]
mov byte [eax + 0xee], bl
xor bl, 1
mov byte [eax + 0xec], bl
mov eax, dword [0x4fab58]
test eax, eax
je 0x46190b
mov eax, dword [eax]
mov ecx, 0x4cfc30
test eax, eax
cmovne ecx, eax
cmp word [ecx], 0
je 0x46190b
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 1
push 0
push 0xffffffffffffffff
test esi, esi
jne 0x461984
mov ecx, dword [esp + 0x38]
push esi
call fcn.004b55f0
cmp eax, 1
je 0x46192f
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 0x461965
mov eax, dword [0x4f90f4]
test byte [eax + 0x100], 1
je 0x461965
mov ecx, dword [esp + 0x28]
push 0x4cfc30
push 0
push 0x4e613c
call fcn.0044e0b0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [0x4fb9e4]
push 1
push 0
push 0xffffffffffffffff
push 0x4e613c
call fcn.004b55f0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [0x4fb9e4]
push 0x4cfcf8
call fcn.004b55f0
test dword [esp + 0x6c], 0x200
je 0x461aa3
lea ecx, [esp + 0x1a98]
test bh, bh
je 0x461a7c
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4619b4
sub ecx, edx
sar ecx, 1
cmp word [esp + ecx*2 + 0x1a9a], ax
jne 0x461a4e
lea eax, [esp + 0x1a98]
push 0x5c
push eax
mov eax, dword [sym.imp.VCRUNTIME140.dll_wcsrchr]
call eax
mov esi, eax
add esp, 8
test esi, esi
je 0x461aa3
mov eax, 0xa
mov ecx, esi
mov word [esi], ax
lea eax, [esp + 0x1a98]
sub ecx, eax
and ecx, 0xfffffffe
cmp ecx, 4
jne 0x461aa3
cmp word [esi - 2], 0x3a
jne 0x461aa3
mov ecx, esi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x461a20
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 0x461aa3
movzx eax, word [esp + 0x1a98]
lea ecx, [esp + 0x1a98]
mov edx, 0xa
test ax, ax
je 0x461a70
add ecx, 2
cmp word [ecx], 0
jne 0x461a67
cmp word [ecx + 2], 0
je 0x461aa3
mov word [ecx], dx
jmp 0x461a67
movzx eax, word [esp + 0x1a98]
mov edx, 0xa
test ax, ax
je 0x461a99
nop
add ecx, 2
cmp word [ecx], 0
jne 0x461a90
mov word [ecx], dx
cmp word [ecx + 2], 0
jne 0x461a90
mov ecx, dword [esp + 0x2c]
lea eax, [esp + 0x1a98]
push 1
push 0
push 0xffffffffffffffff
push eax
call fcn.004b55f0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10