Function at 0x43f620
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.004936b0
cmp dword [0x4c2040], 4
mov eax, dword [0x4c1e48]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x14]
mov esi, ecx
mov dword [esp + 0x14], eax
jl 0x43f667
mov ecx, dword [ebp + 8]
push 0x4a59a4
push 0
push str.The_maximum_number_of_File_Dialogs_has_been_reached.
call fcn.0042ed60
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
xor ecx, ecx
push 0x1fffc
push ecx
lea edx, [esp + 0x1a82]
push edx
mov word [esp + 0x1a84], cx
call fcn.00490d90
add esp, 0xc
test esi, esi
je 0x43f7a0
cmp word [esi], 0
je 0x43f7a0
push 0x103
lea eax, [esp + 0x74]
push esi
push eax
call fcn.0048ac34
add esp, 0xc
push 3
lea edx, [esp + 0x74]
xor ecx, ecx
push 0x4a4f0c
push edx
mov word [esp + 0x282], cx
call fcn.00489c92
add esp, 0xc
test eax, eax
sete bl
test bl, bl
je 0x43f71c
lea eax, [esp + 0x70]
push 0x7d
push eax
call fcn.00488f71
add esp, 8
test eax, eax
je 0x43f7a7
cmp word [eax + 2], 0
je 0x43f7a7
lea eax, [esp + 0x70]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x43f700
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x6e], 0x5c
jne 0x43f730
jmp 0x43f7a7
lea ecx, [esp + 0x70]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x43f730
test al, 0x10
jne 0x43f7a7
lea edx, [esp + 0x70]
push 0x5c
push edx
call fcn.00489c64
mov esi, eax
add esp, 8
test esi, esi
je 0x43f76f
push 0xfffe
lea eax, [esi + 2]
push eax
lea ecx, [esp + 0x1a80]
push ecx
call fcn.0048ac34
xor edx, edx
add esp, 0xc
xor eax, eax
mov word [esp + 0x21a74], dx
mov word [esi], ax
jmp 0x43f7a7
test bl, bl
jne 0x43f7a7
push 0xfffe
lea ecx, [esp + 0x74]
push ecx
lea edx, [esp + 0x1a80]
push edx
call fcn.0048ac34
xor eax, eax
add esp, 0xc
xor ecx, ecx
mov word [esp + 0x21a74], ax
mov word [esp + 0x70], cx
jmp 0x43f7a7
xor edx, edx
mov word [esp + 0x70], dx
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x43f7d6
cmp word [eax], 0
je 0x43f7d6
push 0x3ff
push eax
lea eax, [esp + 0x1280]
push eax
call fcn.0048ac34
add esp, 0xc
xor ecx, ecx
mov word [esp + 0x1a76], cx
jmp 0x43f7f9
mov edx, dword [0x4c4a8c]
push edx
push str.Select_File____s
mov esi, 0x400
lea edi, [esp + 0x1280]
call fcn.0046f100
mov edi, dword [ebp + 0x14]
add esp, 8
xor eax, eax
push 0x7fe
push eax
lea ecx, [esp + 0xa82]
push ecx
mov word [esp + 0xa84], ax
call fcn.00490d90
add esp, 0xc
xor edx, edx
push 0x7fe
push edx
lea eax, [esp + 0x282]
push eax
mov word [esp + 0x284], dx
call fcn.00490d90
add esp, 0xc
cmp word [edi], 0
je 0x43f8a6
push 0x28
push edi
call fcn.00488f71
add esp, 8
push 0x3ff
test eax, eax
je 0x43f8ea
add eax, 2
push eax
lea ecx, [esp + 0x280]
push ecx
call fcn.0048ac34
add esp, 0xc
lea eax, [esp + 0x278]
xor edx, edx
push 0x29
push eax
mov word [esp + 0xa7e], dx
call fcn.00489c64
add esp, 8
test eax, eax
je 0x43f892
xor ecx, ecx
mov word [eax], cx
jmp 0x43f905
xor edx, edx
mov word [esp + 0x278], dx
xor edx, edx
mov word [esp + 0xa78], dx
push 0x54
lea eax, [esp + 0x20]
push 0
push eax
call fcn.00490d90
mov ebx, dword [0x4be3fc]
add esp, 0xc
add ebx, 0x4c
mov dword [esp + 0x18], 0x58
call fcn.00459390
test eax, eax
je 0x43f966
mov ecx, dword [0x4be3fc]
mov edx, dword [ecx + 0x4c]
mov eax, dword [edx + 4]
mov dword [esp + 0x1c], eax
jmp 0x43f96e
lea eax, [esp + 0x27c]
push edi
push eax
call fcn.0048ac34
add esp, 0xc
xor ecx, ecx
mov word [esp + 0xa76], cx
cmp word [esp + 0x278], 0
je 0x43f89c
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push 1
push 0x4a59a4
lea edx, [esp + 0x28c]
push 0x4a2bb8
push edx
xor eax, eax
call fcn.0046f8a0
mov ecx, dword [ebp + 0x14]
add esp, 0x1c
push 0
push 0
push 0
lea eax, [esp + 0x284]
push eax
push 0
push ecx
push str._s_c_s_cAll_Files__.__c._c
mov esi, 0x400
lea edi, [esp + 0xa94]
call fcn.0046f100
add esp, 0x1c
jmp 0x43f8a6
mov dword [esp + 0x1c], 0
cmp word [esp + 0xa78], 0
lea ecx, [esp + 0x1278]
mov dword [esp + 0x48], ecx
je 0x43f991
lea edx, [esp + 0xa78]
mov dword [esp + 0x24], edx
jmp 0x43f999
mov dword [esp + 0x24], str.All_Files__._
movzx ecx, word [esp + 0x70]
mov edi, dword [ebp + 0xc]
movzx esi, word [edi]
neg ecx
sbb ecx, ecx
lea edx, [esp + 0x70]
and ecx, edx
lea eax, [esp + 0x1a78]
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], 0xfffe
mov dword [esp + 0x44], ecx
mov byte [esp + 0x13], 0
mov byte [esp + 0x12], 0
test esi, 0xffffff80
jne 0x43f9e9
push 2
push esi
call fcn.004893ee
add esp, 8
test eax, eax
je 0x43f9e9
and esi, 0xffffffdf
movzx eax, si
cmp eax, 0x4d
je 0x43f9fd
cmp eax, 0x53
jne 0x43fa05
mov byte [esp + 0x13], 1
jmp 0x43fa02
mov byte [esp + 0x12], 1
add edi, 2
mov eax, edi
call fcn.0040c8e0
test al, al
je 0x43fa1f
push 0x10
push 0
push edi
call fcn.004897cb
add esp, 0xc
jmp 0x43fa28
push edi
call fcn.00489436
add esp, 4
mov dword [esp + 0x4c], 0x80004
test al, 0x20
je 0x43fa3c
mov dword [esp + 0x4c], 0x180004
test al, 0x10
je 0x43fa45
or dword [esp + 0x4c], 2
test al, 8
je 0x43fa51
or dword [esp + 0x4c], 0x2000
cmp byte [esp + 0x12], 0
mov edi, 0x200
jne 0x43fa61
test al, 4
je 0x43fa65
or dword [esp + 0x4c], edi
test al, 2
je 0x43fa71
or dword [esp + 0x4c], 0x800
test al, 1
je 0x43fa7d
or dword [esp + 0x4c], 0x1000
call fcn.00474430
push 0
push 0x403
mov bl, al
mov eax, dword [0x4c1ea8]
push 0x44
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
inc dword [0x4c2040]
cmp byte [esp + 0x13], 0
jne 0x43fac2
mov eax, dword [esp + 0x4c]
test al, 2
je 0x43fab5
test eax, 0x2000
je 0x43fac2
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameW]
jmp 0x43facd
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.COMDLG32.dll_GetSaveFileNameW]
dec dword [0x4c2040]
test bl, bl
mov esi, eax
mov eax, dword [0x4be3fc]
sete cl
mov byte [eax + 0xe6], bl
mov byte [eax + 0xe4], cl
cmp word [0x4c26b0], 0
je 0x43fb00
push 0x4c26b0
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 1
push 0
push 0xffffffffffffffff
test esi, esi
jne 0x43fb5f
mov ecx, dword [esp + 0x20]
push esi
call fcn.00471c00
cmp eax, 1
je 0x43fb24
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 0x43fb40
mov edx, dword [ebp + 8]
push edx
call fcn.00430f50
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [0x4c26a8]
push 1
push 0
push 0xffffffffffffffff
push 0x49e334
call fcn.00471c00
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [0x4c26a8]
push 0x49b8c0
call fcn.00471c00
test dword [esp + 0x4c], edi
je 0x43fc5e
cmp byte [esp + 0x12], 0
lea eax, [esp + 0x1a78]
je 0x43fc40
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x43fb90
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x1a7a], cx
lea eax, [esp + 0x1a78]
jne 0x43fc20
push 0x5c
push eax
call fcn.00489c64
mov esi, eax
add esp, 8
test esi, esi
je 0x43fc5e
mov edx, esi
lea eax, [esp + 0x1a78]
sub edx, eax
and edx, 0xfffffffe
mov ecx, 0xa
mov word [esi], cx
cmp edx, 4
jne 0x43fc5e
cmp word [esi - 2], 0x3a
jne 0x43fc5e
mov eax, esi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x43fbf0
sub eax, edx
sar eax, 1
lea ecx, [eax + eax + 2]
push ecx
lea edx, [esi + 2]
push esi
push edx
call fcn.00488c10
mov eax, 0x5c
add esp, 0xc
mov word [esi], ax
jmp 0x43fc5e
cmp word [eax], 0
je 0x43fc2f
add eax, 2
cmp word [eax], 0
jne 0x43fc26
cmp word [eax + 2], 0
je 0x43fc5e
mov ecx, 0xa
mov word [eax], cx
jmp 0x43fc20
cmp word [eax], 0
je 0x43fc4f
add eax, 2
cmp word [eax], 0
jne 0x43fc46
cmp word [eax + 2], 0
mov edx, 0xa
mov word [eax], dx
jne 0x43fc40
mov ecx, dword [esp + 0x14]
push 1
push 0
push 0xffffffffffffffff
lea eax, [esp + 0x1a84]
push eax
call fcn.00471c00
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10