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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x21864
call fcn.0049bf10
cmp dword [0x4cb700], 4
mov eax, dword [0x4cb498]
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 8], eax
jl 0x4427f6
mov ecx, dword [ebp + 8]
push 0x4a48a0
push 0
push 0x4aed38
call fcn.00430920
lea esp, [ebp - 0x21870]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
xor ecx, ecx
mov word [ebp - 0x21860], cx
mov dword [ebp - 4], ecx
test edi, edi
je 0x4428fc
cmp word [edi], cx
je 0x4428fc
mov eax, edi
lea edx, [eax + 2]
jmp 0x442820
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x442820
sub eax, edx
sar eax, 1
push 0x5c
push edi
mov ebx, eax
call fcn.00492a2e
mov esi, eax
add esp, 8
test esi, esi
je 0x442849
cmp word [esi + 2], 0
je 0x4428a1
push 3
push 0x4aeda4
push edi
call fcn.004929f5
add esp, 0xc
test eax, eax
jne 0x442891
cmp ebx, 0x28
jne 0x44286d
cmp word [edi + 0x4e], 0x7d
jne 0x44286d
test esi, esi
je 0x4428a1
push 0xfffe
lea edx, [ebp - 0x21860]
test esi, esi
jne 0x4428a5
push edi
push edx
call fcn.004937a4
add esp, 0xc
xor eax, eax
mov word [ebp - 0x1864], ax
jmp 0x4428fc
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x44286d
test al, 0x10
je 0x44286d
mov eax, ebx
jmp 0x4428c1
lea ecx, [esi + 2]
push ecx
push edx
call fcn.004937a4
xor eax, eax
sub esi, edi
add esp, 0xc
sar esi, 1
mov word [ebp - 0x1864], ax
mov eax, esi
lea esi, [eax + eax]
cmp word [esi + edi], 0
mov dword [ebp - 4], edi
je 0x4428fc
cmp eax, 0x8000
jae 0x4428f5
lea eax, [esi + 2]
call fcn.004979b0
mov ebx, esp
push esi
push edi
push ebx
call fcn.00498a60
add esp, 0xc
xor ecx, ecx
mov dword [ebp - 4], eax
mov word [esi + ebx], cx
jmp 0x4428fc
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x442929
cmp word [eax], 0
je 0x442929
push 0x3ff
push eax
lea edx, [ebp - 0x1860]
push edx
call fcn.004937a4
add esp, 0xc
xor eax, eax
mov word [ebp - 0x1062], ax
jmp 0x442948
mov ecx, dword [0x4ccfe8]
push ecx
push 0x4aedac
mov esi, 0x400
lea edi, [ebp - 0x1860]
call fcn.004772c0
add esp, 8
mov esi, dword [ebp + 0x14]
xor eax, eax
xor edx, edx
mov word [ebp - 0x1060], dx
mov word [ebp - 0x860], ax
cmp word [esi], ax
je 0x4429c1
push 0x28
push esi
call fcn.00491a11
add esp, 8
push 0x3ff
test eax, eax
je 0x4429fe
add eax, 2
push eax
lea ecx, [ebp - 0x860]
push ecx
call fcn.004937a4
add esp, 0xc
lea eax, [ebp - 0x860]
xor edx, edx
push 0x29
push eax
mov word [ebp - 0x62], dx
call fcn.00492a2e
add esp, 8
test eax, eax
je 0x4429af
xor ecx, ecx
mov word [eax], cx
jmp 0x442a14
xor edx, edx
mov word [ebp - 0x860], dx
xor ecx, ecx
mov word [ebp - 0x1060], cx
push 0x54
lea edx, [ebp - 0x5c]
push 0
push edx
call fcn.00499820
mov ebx, dword [0x4c7a54]
add esp, 0xc
add ebx, 0x4c
mov dword [ebp - 0x60], 0x58
call fcn.0045e5f0
test eax, eax
je 0x442a6e
mov eax, dword [0x4c7a54]
mov ecx, dword [eax + 0x4c]
mov edx, dword [ecx + 4]
mov dword [ebp - 0x5c], edx
jmp 0x442a75
lea eax, [ebp - 0x860]
push esi
push eax
call fcn.004937a4
add esp, 0xc
xor ecx, ecx
mov word [ebp - 0x62], cx
cmp word [ebp - 0x860], 0
je 0x4429b8
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push 1
push 0x4a48a0
lea edx, [ebp - 0x860]
push 0x4ac7a4
push edx
xor eax, eax
call fcn.00477a60
add esp, 0x1c
push 0
push 0
push 0
lea eax, [ebp - 0x860]
push eax
push 0
push esi
push 0x4aedd0
mov esi, 0x400
lea edi, [ebp - 0x1060]
call fcn.004772c0
add esp, 0x1c
jmp 0x4429c1
mov dword [ebp - 0x5c], 0
cmp word [ebp - 0x1060], 0
lea eax, [ebp - 0x1860]
mov dword [ebp - 0x30], eax
je 0x442a93
lea ecx, [ebp - 0x1060]
mov dword [ebp - 0x54], ecx
jmp 0x442a9a
mov dword [ebp - 0x54], 0x4aee10
mov edi, dword [ebp + 0xc]
movzx esi, word [edi]
mov eax, dword [ebp - 4]
lea edx, [ebp - 0x21860]
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x40], 0xfffe
mov dword [ebp - 0x34], eax
mov byte [ebp + 0x17], 0
mov byte [ebp + 0x13], 0
test esi, 0xffffff80
jne 0x442ad8
push 2
push esi
call fcn.00491e8e
add esp, 8
test eax, eax
je 0x442ad8
and esi, 0xffffffdf
movzx eax, si
cmp eax, 0x4d
je 0x442aeb
cmp eax, 0x53
jne 0x442af2
mov byte [ebp + 0x17], 1
jmp 0x442aef
mov byte [ebp + 0x13], 1
add edi, 2
mov eax, edi
call fcn.0040f220
test al, al
je 0x442b0c
push 0x10
push 0
push edi
call fcn.0049238f
add esp, 0xc
jmp 0x442b15
push edi
call fcn.00491ed6
add esp, 4
mov dword [ebp - 0x2c], 0x80004
test al, 0x20
je 0x442b27
mov dword [ebp - 0x2c], 0x180004
test al, 0x10
je 0x442b2f
or dword [ebp - 0x2c], 2
test al, 8
je 0x442b3a
or dword [ebp - 0x2c], 0x2000
cmp byte [ebp + 0x13], 0
mov edi, 0x200
jne 0x442b49
test al, 4
je 0x442b4c
or dword [ebp - 0x2c], edi
test al, 2
je 0x442b57
or dword [ebp - 0x2c], 0x800
test al, 1
je 0x442b62
or dword [ebp - 0x2c], 0x1000
call fcn.0047cfc0
mov ecx, dword [0x4cb558]
push 0
push 0x403
push 0x44
push ecx
mov bl, al
call dword [sym.imp.USER32.dll_PostMessageW]
inc dword [0x4cb700]
cmp byte [ebp + 0x17], 0
jne 0x442ba5
mov eax, dword [ebp - 0x2c]
test al, 2
je 0x442b99
test eax, 0x2000
je 0x442ba5
lea edx, [ebp - 0x60]
push edx
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameW]
jmp 0x442baf
lea eax, [ebp - 0x60]
push eax
call dword [sym.imp.COMDLG32.dll_GetSaveFileNameW]
dec dword [0x4cb700]
test bl, bl
mov esi, eax
mov eax, dword [0x4c7a54]
sete cl
mov byte [eax + 0xee], bl
mov byte [eax + 0xec], cl
mov eax, dword [0x4c8b88]
test eax, eax
je 0x442bf2
mov eax, dword [eax]
test eax, eax
je 0x442bf2
cmp word [eax], 0
je 0x442bf2
test eax, eax
jne 0x442beb
mov eax, 0x4a48a0
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test esi, esi
jne 0x442c5b
mov ecx, dword [ebp - 8]
call fcn.00415490
cmp eax, 1
je 0x442c14
xor eax, eax
lea esp, [ebp - 0x21870]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
call dword [sym.imp.COMDLG32.dll_CommDlgExtendedError]
test eax, eax
je 0x442c36
mov edx, dword [ebp + 8]
push edx
call fcn.00432f70
lea esp, [ebp - 0x21870]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [0x4cbd60]
push 1
push 0
push 0xffffffffffffffff
push 0x4a7324
push eax
call fcn.0047a5f0
lea esp, [ebp - 0x21870]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [0x4cbd60]
push 1
push 0
push 0xffffffffffffffff
push 0x4a4930
push ecx
call fcn.0047a5f0
test dword [ebp - 0x2c], edi
je 0x442d5f
cmp byte [ebp + 0x13], 0
lea eax, [ebp - 0x21860]
je 0x442d41
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x442c90
sub eax, edx
sar eax, 1
cmp word [ebp + eax*2 - 0x2185e], cx
jne 0x442d1b
lea edx, [ebp - 0x21860]
push 0x5c
push edx
call fcn.00492a2e
mov esi, eax
add esp, 8
test esi, esi
je 0x442d5f
mov ecx, esi
lea edx, [ebp - 0x21860]
sub ecx, edx
and ecx, 0xfffffffe
mov eax, 0xa
mov word [esi], ax
cmp ecx, 4
jne 0x442d5f
cmp word [esi - 2], 0x3a
jne 0x442d5f
mov eax, esi
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x442cf0
sub eax, edx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
lea ecx, [esi + 2]
push esi
push ecx
call fcn.004916b0
mov edx, 0x5c
add esp, 0xc
mov word [esi], dx
jmp 0x442d5f
lea eax, [ebp - 0x21860]
cmp word [eax], 0
je 0x442d30
add eax, 2
cmp word [eax], 0
jne 0x442d27
cmp word [eax + 2], 0
je 0x442d5f
mov ecx, 0xa
mov word [eax], cx
jmp 0x442d21
cmp word [eax], 0
je 0x442d50
add eax, 2
cmp word [eax], 0
jne 0x442d47
cmp word [eax + 2], 0
mov edx, 0xa
mov word [eax], dx
jne 0x442d41
mov ecx, dword [ebp - 8]
push 1
push 0
push 0xffffffffffffffff
lea eax, [ebp - 0x21860]
push eax
push ecx
call fcn.0047a5f0
lea esp, [ebp - 0x21870]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10