Function at 0x4065d9
Capabilities:
Check if file exists
Get file attributes
Resolve function by parsing pe exports

Disassembly:
mov eax, dword [0x425ffc]
sub esp, 0x10
push ebx
push ebp
push esi
mov esi, dword [0x425fa8]
and eax, 0x20
push edi
mov dword [0x426020], eax
call fcn.00404943
mov ebp, 0x42c400
push ebp
call fcn.00406d91
xor ebx, ebx
test eax, eax
jne 0x406687
mov ecx, dword [esi + 0x40]
cmp ecx, ebx
je 0x406687
mov eax, dword [0x425fd8]
mov edx, dword [esi + 0x44]
mov edi, 0x424b40
push edi
add edx, eax
push edx
add ecx, eax
push ecx
push dword [esi + 0x3c]
call fcn.00406a89
mov al, byte [0x424b40]
cmp al, bl
je 0x406687
cmp al, 0x22
jne 0x40664c
push edi
call dword [sym.imp.USER32.dll_CharNextA]
mov edi, eax
push 0x22
push edi
call fcn.00406956
mov byte [eax], bl
push edi
call sub.KERNEL32.dll_lstrlenA
lea eax, [eax + edi - 4]
cmp eax, edi
jbe 0x406680
push str..exe
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x406680
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40667a
test al, 0x10
jne 0x406680
push edi
call fcn.00406d6b
push edi
push ebp
call sub.KERNEL32.dll_lstrcpyA
push ebp
call fcn.00406d91
test eax, eax
jne 0x40669d
push dword [esi + 0x10c]
push ebp
call fcn.00407017
test byte [0x425ffc], 0x10
je 0x4066bd
cmp dword [0x425ff8], ebx
jne 0x4066bd
call fcn.00404921
mov dword [0x423b20], 1
push 0x8040
push ebx
push ebx
push 1
push 0x67
push dword [0x425fa4]
call dword [sym.imp.USER32.dll_LoadImageA]
mov dword [0x425770], eax
cmp dword [esi + 0x48], 0xffffffff
mov edi, 0x425740
je 0x406763
mov ecx, dword [0x425fa4]
mov ebp, 0x408bbc
push edi
mov dword [0x425744], 0x401d87
mov dword [0x425750], ecx
mov dword [0x425754], eax
mov dword [0x425764], ebp
call dword [sym.imp.USER32.dll_RegisterClassA]
test ax, ax
je 0x406858
push ebx
lea eax, [esp + 0x14]
push eax
push ebx
push 0x30
call dword [sym.imp.USER32.dll_SystemParametersInfoA]
mov eax, dword [esp + 0x1c]
sub eax, dword [esp + 0x14]
push ebx
push dword [0x425fa4]
push ebx
push ebx
push eax
mov eax, dword [esp + 0x2c]
sub eax, dword [esp + 0x24]
push eax
push dword [esp + 0x2c]
push dword [esp + 0x2c]
push 0x80000000
push ebx
push ebp
push 0x80
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [0x42117c], eax
mov eax, dword [0x42117c]
push ebx
mov dword [0x425fa0], eax
push dword [esi + 0x64]
call fcn.00402008
test eax, eax
je 0x406782
xor eax, eax
inc eax
jmp 0x40685a
call fcn.00404943
cmp dword [0x42603c], ebx
mov dword [0x425fa0], ebx
jne 0x40682b
push 5
push dword [0x42117c]
call dword [sym.imp.USER32.dll_ShowWindow]
mov ebp, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.RichEd20.dll
call ebp
test eax, eax
jne 0x4067c8
push str.RichEd20.dll
mov word [0x40a04e], 0x3233
call ebp
push edi
mov ebp, 0x40a03c
push ebp
push ebx
call dword [sym.imp.USER32.dll_GetClassInfoA]
test eax, eax
jne 0x4067fd
push edi
push ebp
push ebx
mov byte [0x40a044], bl
call dword [sym.imp.USER32.dll_GetClassInfoA]
push edi
mov dword [0x425764], ebp
mov byte [0x40a044], 0x32
call dword [sym.imp.USER32.dll_RegisterClassA]
mov eax, dword [0x42577c]
push ebx
push 0x406123
add eax, 0x69
movzx eax, ax
push ebx
push eax
push dword [0x425fa4]
call dword [sym.imp.USER32.dll_DialogBoxParamA]
push ebx
push dword [esi + 0x78]
mov edi, eax
call fcn.00402008
mov eax, edi
jmp 0x40685a
push ebx
call fcn.00405cf2
test eax, eax
je 0x40684f
cmp dword [0x425774], ebx
jne 0x40677a
push ebx
push dword [esi + 0x6c]
call fcn.00402008
jmp 0x40677a
push ebx
push dword [esi + 0x68]
call fcn.00402008
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret