Function at 0x40527a
Capabilities:
Check if file exists
Get file attributes
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
mov esi, dword [0x43528c]
push edi
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
movzx eax, ax
push eax
push 0x442000
call fcn.004057fe
call fcn.004038f4
mov eax, dword [0x4352e4]
and eax, 0x20
push 0x440800
mov dword [0x435300], eax
call fcn.00405e13
xor ebx, ebx
test eax, eax
jne 0x405355
mov ecx, dword [esi + 0x48]
cmp ecx, ebx
je 0x405355
mov eax, dword [0x4352b8]
mov edx, dword [esi + 0x4c]
push ebx
mov edi, 0x433220
push edi
lea edx, [eax + edx*2]
push edx
lea eax, [eax + ecx*2]
push eax
push dword [esi + 0x44]
call fcn.00405784
mov ax, word [0x433220]
cmp ax, bx
je 0x405355
cmp ax, 0x22
jne 0x405310
mov eax, 0x433222
push 0x22
push eax
mov edi, eax
call fcn.004055b8
mov word [eax], bx
push edi
call sub.KERNEL32.dll_lstrlenW
lea eax, [edi + eax*2 - 8]
cmp eax, edi
jbe 0x405344
push str..exe
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x405344
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40533e
test al, 0x10
jne 0x405344
push edi
call fcn.00405de7
push edi
call fcn.00405db8
push eax
push 0x440800
call fcn.004058b7
mov edi, 0x440800
push edi
call fcn.00405e13
test eax, eax
jne 0x405370
push dword [esi + 0x118]
push edi
call fcn.00405e9b
push 0x8040
push ebx
push ebx
push 1
push 0x67
push dword [0x435288]
call dword [sym.imp.USER32.dll_LoadImageW]
mov dword [0x434250], eax
cmp dword [esi + 0x50], 0xffffffff
mov edi, 0x434220
je 0x405425
mov ecx, dword [0x40873c]
mov dword [ebp - 8], ecx
mov ecx, dword [0x408740]
mov dword [ebp - 4], ecx
mov ecx, dword [0x435288]
mov dword [0x434234], eax
lea eax, [ebp - 8]
push edi
mov dword [0x434224], 0x401000
mov dword [0x434230], ecx
mov dword [0x434244], eax
call dword [sym.imp.USER32.dll_RegisterClassW]
test ax, ax
je 0x4054ec
push ebx
lea eax, [ebp - 0x18]
push eax
push ebx
push 0x30
call dword [sym.imp.USER32.dll_SystemParametersInfoW]
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 0x14]
push ebx
push dword [0x435288]
push ebx
push ebx
push eax
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x18]
push eax
push dword [ebp - 0x14]
lea eax, [ebp - 8]
push dword [ebp - 0x18]
push 0x80000000
push ebx
push eax
push 0x80
call dword [sym.imp.USER32.dll_CreateWindowExW]
mov dword [0x42b5b8], eax
push ebx
call fcn.00401411
test eax, eax
je 0x405437
push 2
pop eax
jmp 0x4054ee
call fcn.004038f4
cmp dword [0x435320], ebx
jne 0x4054c3
push 5
push dword [0x42b5b8]
call dword [sym.imp.USER32.dll_ShowWindow]
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push str.RichEd20
call esi
test eax, eax
jne 0x40546a
push str.RichEd32
call esi
mov esi, dword [sym.imp.USER32.dll_GetClassInfoW]
push edi
push str.RichEdit20A
push ebx
call esi
test eax, eax
jne 0x405497
push edi
push str.RichEdit
push ebx
call esi
push edi
mov dword [0x434244], 0x4086fc
call dword [sym.imp.USER32.dll_RegisterClassW]
mov eax, dword [0x43425c]
push ebx
push 0x404dc7
add eax, 0x69
movzx eax, ax
push ebx
push eax
push dword [0x435288]
call dword [sym.imp.USER32.dll_DialogBoxParamW]
push 5
mov esi, eax
call fcn.00401411
mov eax, esi
jmp 0x4054ee
push ebx
call fcn.004049cc
test eax, eax
je 0x4054e5
cmp dword [0x434254], ebx
jne 0x40542f
push 2
call fcn.00401411
jmp 0x40542f
push 1
call fcn.00401411
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret