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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x10d6c
call fcn.004db810
cmp dword [0x4fb964], 4
mov eax, ecx
mov ecx, dword [0x4fd110]
push ebx
push esi
push edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
jl 0x461ba8
push 0x4e3371
push 0
push str.The_maximum_number_of_File_Dialogs_has_been_reached.
mov ecx, eax
call fcn.0044d920
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov edx, dword [ebp + 0xc]
mov byte [esp + 0xd78], 0
test edx, edx
je 0x461cd2
cmp byte [edx], 0
je 0x461cd2
mov ecx, edx
lea esi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x461bd0
sub ecx, esi
lea eax, [esp + 0x70]
cmp ecx, 0x104
jb 0x461bf4
push 0x104
push eax
push edx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
jmp 0x461c0b
push 0x103
push edx
push eax
call fcn.004cc440
add esp, 0xc
mov byte [esp + 0x173], 0
push 3
lea eax, [esp + 0x74]
push 0x4eec44
push eax
call fcn.004cc747
add esp, 0xc
test eax, eax
sete bl
test eax, eax
lea eax, [esp + 0x70]
jne 0x461c62
push 0x7d
push eax
call fcn.004ca733
add esp, 8
test eax, eax
je 0x461cd7
cmp byte [eax + 1], 0
je 0x461cd7
lea ecx, [esp + 0x70]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x461c50
sub ecx, edx
cmp byte [esp + ecx + 0x6f], 0x5c
je 0x461cd7
jmp 0x461c72
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x461c72
test al, 0x10
jne 0x461cd7
lea eax, [esp + 0x70]
push 0x5c
push eax
call fcn.004c7059
mov esi, eax
add esp, 8
test esi, esi
je 0x461cad
push 0xfffe
lea ecx, [esi + 1]
push ecx
lea eax, [esp + 0xd80]
push eax
call fcn.004cc440
mov byte [esp + 0x10d82], 0
add esp, 0xc
mov byte [esi], 0
jmp 0x461cd7
test bl, bl
jne 0x461cd7
push 0xfffe
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0xd80]
push eax
call fcn.004cc440
add esp, 0xc
mov byte [esp + 0x10d76], bl
mov byte [esp + 0x70], 0
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x461d03
cmp byte [eax], 0
je 0x461d03
push 0x3ff
push eax
lea eax, [esp + 0x580]
push eax
call fcn.004cc440
add esp, 0xc
mov byte [esp + 0x977], 0
jmp 0x461d23
push dword [0x4fe0a8]
lea eax, [esp + 0x57c]
push str.Select_File____s
push 0x400
push eax
call fcn.004aba90
add esp, 0x10
mov esi, dword [ebp + 0x14]
mov byte [esp + 0x978], 0
mov byte [esp + 0x178], 0
cmp byte [esi], 0
je 0x461e00
push 0x28
push esi
call fcn.004ca733
add esp, 8
push 0x3ff
test eax, eax
je 0x461d92
inc eax
push eax
lea eax, [esp + 0x180]
push eax
call fcn.004cc440
add esp, 0xc
mov byte [esp + 0x577], 0
lea eax, [esp + 0x178]
push 0x29
push eax
call fcn.004c7059
add esp, 8
test eax, eax
je 0x461d88
mov byte [eax], 0
jmp 0x461dab
mov byte [esp + 0x178], 0
jmp 0x461e00
lea eax, [esp + 0x17c]
push esi
push eax
call fcn.004cc440
add esp, 0xc
mov byte [esp + 0x577], 0
cmp byte [esp + 0x178], 0
je 0x461e00
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push 1
push 0x4e3371
mov edx, 0x4edbd4
lea ecx, [esp + 0x190]
call fcn.004ac240
push 0
push 0
push 0
lea eax, [esp + 0x19c]
push eax
push 0
push esi
push str._s_c_s_cAll_Files__.__c._c
lea eax, [esp + 0x9ac]
push 0x400
push eax
call fcn.004aba90
add esp, 0x3c
push 0x58
lea eax, [esp + 0x1c]
push 0
push eax
call fcn.004c22a0
mov edi, dword [0x4f898c]
add esp, 0xc
mov dword [esp + 0x18], 0x58
mov esi, dword [edi + 0x4c]
test esi, esi
je 0x461e5f
cmp dword [esi + 4], 0
jne 0x461f25
mov ecx, dword [esi]
cmp byte [ecx], 0
jne 0x461ee9
add dword [esi + 0x20], 0xffffffff
jne 0x461e58
push ecx
call fcn.004c4247
add esp, 4
push 0xd8
push esi
call fcn.004c0915
add esp, 8
mov dword [edi + 0x4c], 0
mov dword [esp + 0x1c], 0
cmp byte [esp + 0x978], 0
lea eax, [esp + 0x578]
mov esi, dword [ebp + 8]
mov ecx, str.All_Files__._
mov dword [esp + 0x48], eax
lea eax, [esp + 0x978]
cmove eax, ecx
mov dword [esp + 0x38], 0xfffe
mov dword [esp + 0x24], eax
xor ecx, ecx
cmp byte [esp + 0x70], cl
lea eax, [esp + 0xd78]
mov bl, byte [esi]
mov dword [esp + 0x34], eax
lea eax, [esp + 0x70]
cmove eax, ecx
mov byte [esp + 0xf], cl
mov dword [esp + 0x44], eax
xor bh, bh
movzx eax, bl
test eax, 0xffffff80
jne 0x461ed8
push 2
push eax
call fcn.004c7451
add esp, 8
test eax, eax
je 0x461ed8
and bl, 0xdf
mov al, bl
cmp al, 0x4d
je 0x461f34
cmp al, 0x53
jne 0x461f37
mov byte [esp + 0xf], 1
jmp 0x461f36
call fcn.00483ec0
mov esi, eax
test esi, esi
je 0x461e5f
inc dword [esi + 0x20]
mov ebx, dword [edi + 0x4c]
add dword [ebx + 0x20], 0xffffffff
jne 0x461f1c
push dword [ebx]
call fcn.004c4247
add esp, 4
push 0xd8
push ebx
call fcn.004c0915
add esp, 8
mov dword [edi + 0x4c], esi
mov edi, dword [0x4f898c]
mov eax, dword [edi + 0x4c]
mov eax, dword [eax + 4]
mov dword [esp + 0x1c], eax
jmp 0x461e67
mov bh, 1
inc esi
mov ecx, esi
nop dword [eax]
mov al, byte [ecx]
cmp al, 0x20
je 0x461f4a
cmp al, 9
jne 0x461f4d
inc ecx
jmp 0x461f40
test al, al
je 0x461f8f
cmp al, 0x2d
je 0x461f59
cmp al, 0x2b
jne 0x461f60
lea eax, [ecx + 1]
mov ecx, eax
mov al, byte [eax]
cmp al, 0x30
jne 0x461f8f
mov al, byte [ecx + 1]
cmp al, 0x78
je 0x461f6f
cmp al, 0x58
jne 0x461f8f
movsx eax, byte [ecx + 2]
push eax
call fcn.004c4410
add esp, 4
test eax, eax
je 0x461f8f
push 0x10
push 0
push esi
call fcn.004c4d25
add esp, 0xc
jmp 0x461f98
push esi
call fcn.004c4df6
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 0x461fba
or eax, 2
mov dword [esp + 0x4c], eax
test cl, 8
je 0x461fc8
or eax, 0x2000
mov dword [esp + 0x4c], eax
test bh, bh
jne 0x461fd1
test cl, 4
je 0x461fda
or eax, 0x200
mov dword [esp + 0x4c], eax
test cl, 2
je 0x461fe8
or eax, 0x800
mov dword [esp + 0x4c], eax
test cl, 1
je 0x461ff6
or eax, 0x1000
mov dword [esp + 0x4c], eax
call fcn.004b2f20
push 0
push 0x403
push 0x44
push dword [0x4fb968]
mov bl, al
call dword [sym.imp.USER32.dll_PostMessageA]
inc dword [0x4fb964]
cmp byte [esp + 0xf], 0
jne 0x46203b
mov eax, dword [esp + 0x4c]
test al, 2
je 0x46202e
test eax, 0x2000
je 0x46203b
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameA]
jmp 0x462046
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.COMDLG32.dll_GetSaveFileNameA]
dec dword [0x4fb964]
mov esi, eax
mov ecx, dword [0x4f898c]
test bl, bl
sete al
mov byte [ecx + 0xce], bl
mov byte [ecx + 0xcc], al
mov eax, dword [0x4fa378]
test eax, eax
je 0x462086
mov eax, dword [eax]
mov ecx, 0x4e3371
test eax, eax
cmovne ecx, eax
cmp byte [ecx], 0
je 0x462086
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 1
push 0
push 0xffffffffffffffff
test esi, esi
jne 0x4620ff
mov ecx, dword [esp + 0x1c]
push esi
call fcn.004b01a0
cmp eax, 1
je 0x4620aa
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 0x4620e0
mov eax, dword [0x4f898c]
test byte [eax + 0xe0], 1
je 0x4620e0
mov ecx, dword [esp + 0x14]
push 0x4e3371
push 0
push 0x4e37f8
call fcn.0044d4a0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [0x4fb94c]
push 1
push 0
push 0xffffffffffffffff
push 0x4e37f8
call fcn.004b01a0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [0x4fb94c]
push 0x4e33f8
call fcn.004b01a0
test dword [esp + 0x4c], 0x200
je 0x4621e6
test bh, bh
je 0x4621c3
lea ecx, [esp + 0xd78]
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x462130
sub ecx, edx
lea eax, [esp + 0xd78]
cmp byte [esp + ecx + 0xd79], 0
jne 0x46219f
push 0x5c
push eax
call fcn.004c7059
mov esi, eax
add esp, 8
test esi, esi
je 0x4621e6
mov ecx, esi
mov byte [esi], 0xa
lea eax, [esp + 0xd78]
sub ecx, eax
cmp ecx, 2
jne 0x4621e6
cmp byte [esi - 1], 0x3a
jne 0x4621e6
mov ecx, esi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x462180
sub ecx, edx
lea eax, [ecx + 1]
push eax
lea eax, [esi + 1]
push esi
push eax
call fcn.004c2440
add esp, 0xc
mov byte [esi], 0x5c
jmp 0x4621e6
mov cl, byte [esp + 0xd78]
test cl, cl
je 0x4621b6
nop word [eax + eax]
inc eax
cmp byte [eax], 0
jne 0x4621b0
cmp byte [eax + 1], 0
je 0x4621e6
mov byte [eax], 0xa
mov cl, 0xa
jmp 0x4621a6
mov cl, byte [esp + 0xd78]
lea eax, [esp + 0xd78]
test cl, cl
je 0x4621db
inc eax
cmp byte [eax], 0
jne 0x4621d5
mov byte [eax], 0xa
mov cl, 0xa
cmp byte [eax + 1], 0
jne 0x4621d1
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0xd78]
push 1
push 0
push 0xffffffffffffffff
push eax
call fcn.004b01a0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10