Function at 0x4042ed
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x799e4c]
push ebx
push esi
push edi
mov edi, dword [0x799e44]
and eax, 0x20
push 0x79f400
mov dword [0x799ea0], eax
call fcn.00406440
xor ebx, ebx
test eax, eax
jne 0x4043b1
mov ecx, dword [edi + 0x40]
cmp ecx, ebx
je 0x4043b1
mov edx, dword [edi + 0x44]
mov eax, dword [0x799e78]
mov esi, 0x798e00
add edx, eax
push esi
add ecx, eax
push edx
push ecx
push dword [edi + 0x3c]
call fcn.00406750
mov al, byte [0x798e00]
test al, al
je 0x4043b1
cmp al, 0x22
mov ebx, esi
jne 0x404371
push esi
mov esi, dword [sym.imp.USER32.dll_CharNextA]
call esi
mov ebx, eax
jmp 0x404368
cmp cl, 0x22
je 0x40436e
push eax
call esi
mov cl, byte [eax]
test cl, cl
jne 0x404360
and byte [eax], 0
push ebx
call sub.KERNEL32.dll_lstrlenA
lea eax, [eax + ebx - 4]
cmp eax, ebx
jbe 0x4043a4
cmp dword [eax], 0x6578652e
jne 0x4043a4
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x404397
test al, 0x10
jne 0x4043a4
push ebx
call fcn.004063d9
cmp eax, ebx
jb 0x4043a4
and byte [eax], 0
push ebx
push 0x79f400
call sub.KERNEL32.dll_lstrcpyA
xor ebx, ebx
mov esi, 0x79f400
push esi
call fcn.00406440
test eax, eax
jne 0x4043cc
push dword [edi + 0x10c]
push esi
call fcn.0040686a
call fcn.00404575
push 0x8040
push ebx
push ebx
push 1
push 0x67
push dword [0x798de8]
call dword [sym.imp.USER32.dll_LoadImageA]
mov dword [0x79961c], eax
cmp dword [edi + 0x48], 0xffffffff
mov esi, 0x797070
je 0x404476
mov ecx, dword [0x798de8]
mov ebx, 0x409264
push esi
mov dword [0x797074], 0x401c2e
mov dword [0x797080], ecx
mov dword [0x797084], eax
mov dword [0x797094], ebx
call dword [sym.imp.USER32.dll_RegisterClassA]
test ax, ax
je 0x40456e
lea eax, [ebp - 0x10]
push 0
push eax
push 0
push 0x30
call dword [sym.imp.USER32.dll_SystemParametersInfoA]
mov ecx, dword [ebp - 4]
xor eax, eax
sub ecx, dword [ebp - 0xc]
push eax
push dword [0x798de8]
push eax
push eax
push ecx
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp - 0x10]
push ecx
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push 0x80000000
push eax
push ebx
push 0x80
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [0x797058], eax
xor ebx, ebx
mov eax, dword [0x797058]
push ebx
mov dword [0x799e40], eax
push dword [edi + 0x64]
call fcn.00401e3d
test eax, eax
je 0x404495
xor eax, eax
inc eax
jmp 0x404570
call fcn.00404575
cmp dword [0x799ebc], ebx
mov dword [0x799e40], ebx
jne 0x404541
push 5
push dword [0x797058]
call dword [sym.imp.USER32.dll_ShowWindow]
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.RichEd20.dll
call ebx
test eax, eax
jne 0x4044db
push str.RichEd20.dll
mov word [0x409232], 0x3233
call ebx
mov ebx, str.RichEdit20A
push esi
push ebx
push 0
call dword [sym.imp.USER32.dll_GetClassInfoA]
test eax, eax
jne 0x404511
and byte [0x409244], al
push esi
push ebx
push eax
call dword [sym.imp.USER32.dll_GetClassInfoA]
push esi
mov dword [0x797094], ebx
mov byte [0x409244], 0x32
call dword [sym.imp.USER32.dll_RegisterClassA]
mov eax, dword [0x799614]
xor esi, esi
add eax, 0x69
push esi
movzx eax, ax
push 0x404627
push esi
push eax
push dword [0x798de8]
call dword [sym.imp.USER32.dll_DialogBoxParamA]
push esi
mov ebx, eax
push dword [edi + 0x78]
call fcn.00401e3d
mov eax, ebx
jmp 0x404570
push ebx
call fcn.00405e6e
test eax, eax
je 0x404565
cmp dword [0x799604], ebx
jne 0x40448d
push ebx
push dword [edi + 0x6c]
call fcn.00401e3d
jmp 0x40448d
push ebx
push dword [edi + 0x68]
call fcn.00401e3d
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret