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

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov edi, dword [0x44800c]
push 2
call fcn.0040696f
xor ebx, ebx
test eax, eax
je 0x405ab5
call eax
movzx eax, ax
push eax
push 0x479000
call fcn.00406574
jmp 0x405b04
push ebx
mov esi, 0x42a1c0
push esi
push ebx
push str.Control_PanelDesktopResourceLocale
push 0x80000001
mov word [0x479000], 0x7830
mov byte [0x479002], bl
call fcn.00406a00
cmp byte [0x42a1c0], bl
jne 0x405af9
push ebx
push esi
push 0x408b62
push str..DEFAULTControl_PanelInternational
push 0x80000003
call fcn.00406a00
push esi
push 0x479000
call sub.KERNEL32.dll_lstrcatA
call fcn.004059b8
mov eax, dword [0x448008]
and eax, 0x20
mov ebp, 0x473000
push ebp
mov dword [0x4480c0], eax
mov dword [0x4480dc], 0x10000
call fcn.0040658d
test eax, eax
jne 0x405bb7
mov edx, dword [edi + 0x48]
test edx, edx
je 0x405bb7
mov ecx, dword [0x448038]
mov eax, dword [edi + 0x4c]
push ebx
mov esi, 0x43ffa0
push esi
add eax, ecx
push eax
lea eax, [edx + ecx]
push eax
push dword [edi + 0x44]
call fcn.00406a00
mov al, byte [0x43ffa0]
test al, al
je 0x405bb7
cmp al, 0x22
jne 0x405b75
push 0x22
mov esi, 0x43ffa1
push esi
call fcn.00406550
mov byte [eax], bl
push esi
call sub.KERNEL32.dll_lstrlenA
add eax, 0xfffffffc
add eax, esi
cmp eax, esi
jbe 0x405baa
push str..exe
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x405baa
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405ba4
test al, 0x10
jne 0x405baa
push esi
call fcn.00406ce3
push esi
call fcn.004064b2
push eax
push ebp
call fcn.00406b7d
push ebp
call fcn.0040658d
test eax, eax
jne 0x405bcd
push dword [edi + 0x118]
push ebp
call fcn.00405ef7
xor ebp, ebp
inc ebp
test byte [0x448008], 0x10
je 0x405bec
cmp dword [0x448000], ebx
jne 0x405bec
call fcn.0040585e
mov dword [0x43f780], ebp
push 0x8040
push ebx
push ebx
push ebp
push 0x67
push dword [0x443ff4]
call dword [sym.imp.USER32.dll_LoadImageA]
mov ecx, eax
mov dword [0x443fe4], ecx
cmp dword [edi + 0x50], 0xffffffff
mov edi, dword [sym.imp.USER32.dll_RegisterClassA]
mov esi, 0x443fa0
je 0x405c98
mov eax, dword [0x443ff4]
push esi
mov dword [0x443fa4], 0x401000
mov dword [0x443fb0], eax
mov dword [0x443fb4], ecx
mov dword [0x443fc4], 0x408b9c
call edi
test ax, ax
je 0x405d6c
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 [0x443ff4]
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 0x408b9c
push 0x80
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [0x4321c8], eax
push ebx
call fcn.0040142e
test eax, eax
je 0x405caa
push 2
pop eax
jmp 0x405d6e
call fcn.004059b8
cmp dword [0x4480e0], ebx
jne 0x405d44
push 5
push dword [0x4321c8]
call dword [sym.imp.USER32.dll_ShowWindow]
push str.RichEd20
call fcn.0040616a
test eax, eax
jne 0x405ce1
push str.RichEd32
call fcn.0040616a
push esi
mov esi, dword [sym.imp.USER32.dll_GetClassInfoA]
push str.RichEdit20A
push ebx
call esi
test eax, eax
jne 0x405d12
push 0x443fa0
push str.RichEdit
push ebx
call esi
push 0x443fa0
mov dword [0x443fc4], 0x408bb8
call edi
mov eax, dword [0x443fe0]
push ebx
push 0x40505a
add eax, 0x69
movzx eax, ax
push ebx
push eax
push dword [0x443ff4]
call dword [sym.imp.USER32.dll_DialogBoxParamA]
push 5
mov esi, eax
call fcn.0040142e
push ebp
call fcn.00403e2f
mov eax, esi
jmp 0x405d6e
push ebx
call fcn.0040587f
test eax, eax
je 0x405d66
cmp dword [0x443fd0], ebx
jne 0x405ca2
push 2
call fcn.0040142e
jmp 0x405ca2
push ebp
call fcn.0040142e
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret