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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x28
mov esi, dword [0x424498]
push 2
call fcn.004064e1
add esp, 0xc
test eax, eax
je 0x405fc0
call eax
push ebx
movzx eax, ax
push ebx
push eax
mov eax, dword [0x40a474]
add eax, 0x6000
push eax
call fcn.0040645c
jmp 0x40602c
mov ebx, dword [0x40a474]
sub esp, 0xc
add ebx, 0x6000
mov byte [ebx], 0x30
mov byte [ebx + 1], 0x78
mov byte [ebx + 2], 0
push 0
push 0x4219d8
push 0
push str.Control_PanelDesktopResourceLocale
push 0x80000001
call fcn.00406778
add esp, 0xc
cmp byte [0x4219d8], 0
jne 0x40601f
sub esp, 0xc
push 0
push 0x4219d8
push 0x40a432
push str..DEFAULTControl_PanelInternational
push 0x80000003
call fcn.00406778
add esp, 0xc
push ecx
push ecx
push 0x4219d8
push ebx
call fcn.004066da
pop eax
pop edx
call fcn.00405ea4
sub esp, 0xc
mov eax, dword [0x4244f8]
mov edi, dword [0x40a474]
and eax, 0x20
add edi, 0x5400
mov dword [0x424438], eax
mov dword [0x424454], 0x10000
push edi
call fcn.00406c14
add esp, 0xc
test eax, eax
jne 0x40612a
mov ecx, dword [esi + 0x48]
test ecx, ecx
je 0x40612a
sub esp, 0xc
mov edx, dword [0x4244c0]
mov eax, edx
add edx, ecx
push 0
push 0x424df8
add eax, dword [esi + 0x4c]
push eax
push edx
push dword [esi + 0x44]
call fcn.00406778
add esp, 0xc
cmp byte [0x424df8], 0
je 0x40612a
mov ebx, 0x424df8
cmp byte [0x424df8], 0x22
jne 0x4060cc
push eax
push eax
push 0x22
push 0x424df9
call fcn.00406586
mov ebx, 0x424df9
mov byte [eax], 0
pop ecx
pop eax
sub esp, 0xc
push ebx
call fcn.004066e3
add esp, 0xc
lea eax, [ebx + eax - 4]
cmp eax, ebx
jbe 0x406114
push edx
push edx
push str..exe
push eax
call sub.KERNEL32.dll_lstrcmpiA
pop edx
test eax, eax
pop ecx
jne 0x406114
sub esp, 0xc
push ebx
call sub.KERNEL32.dll_GetFileAttributesA
add esp, 0xc
cmp eax, 0xffffffff
je 0x406108
test al, 0x10
jne 0x406114
sub esp, 0xc
push ebx
call fcn.004066ec
add esp, 0xc
sub esp, 0xc
push ebx
call fcn.00406721
sub esp, 0xc
push eax
push edi
call fcn.0040675e
add esp, 0x18
sub esp, 0xc
push edi
call fcn.00406c14
add esp, 0xc
test eax, eax
jne 0x40614a
push ecx
push ecx
push dword [esi + 0x118]
push edi
call fcn.004067f8
pop eax
pop edx
push eax
push eax
push 0x8040
push 0
push 0
push 1
push 0x67
push dword [0x424548]
call sub.USER32.dll_LoadImageA
mov dword [0x424d98], eax
mov edx, eax
pop edi
pop eax
cmp dword [esi + 0x50], 0xffffffff
je 0x406200
sub esp, 0xc
mov eax, dword [0x424548]
mov dword [0x4219ac], 0x401000
mov dword [0x4219b8], eax
mov dword [0x4219bc], edx
mov dword [0x4219cc], 0x40a3a1
push 0x4219a8
call sub.USER32.dll_RegisterClassA
xor ebx, ebx
add esp, 0xc
test ax, ax
je 0x406310
lea eax, [ebp - 0x1c]
push 0
push eax
push 0
push 0x30
call sub.USER32.dll_SystemParametersInfoA
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x10]
push 0
sub eax, edx
push dword [0x424548]
mov ecx, dword [ebp - 0x1c]
push 0
push 0
push eax
mov eax, dword [ebp - 0x14]
sub eax, ecx
push eax
push edx
push ecx
push 0x80000000
push 0
push 0x40a3a1
push pe_nt_image_headers32
call sub.USER32.dll_CreateWindowExA
mov dword [0x422a08], eax
sub esp, 0xc
push 0
call fcn.0040319a
add esp, 0xc
test eax, eax
jne 0x40630b
call fcn.00405ea4
cmp dword [0x424458], 0
jne 0x4062cf
push esi
push esi
push 5
push dword [0x422a08]
call sub.USER32.dll_ShowWindow
push ebx
push str.RichEd20
call fcn.00406479
add esp, 0xc
test eax, eax
jne 0x406258
sub esp, 0xc
push str.RichEd32
call fcn.00406479
add esp, 0xc
push ecx
push 0x4219a8
push str.RichEdit20A
push 0
call sub.USER32.dll_GetClassInfoA
pop edx
test eax, eax
jne 0x40629a
push eax
push 0x4219a8
push str.RichEdit
push 0
call sub.USER32.dll_GetClassInfoA
mov dword [0x4219cc], 0x40a3c8
push eax
push eax
push 0x4219a8
call sub.USER32.dll_RegisterClassA
add esp, 0xc
mov eax, dword [0x424dc8]
sub esp, 0xc
add eax, 0x69
movzx eax, ax
push 0
push 0x40590f
push 0
push eax
push dword [0x424548]
call sub.USER32.dll_DialogBoxParamA
mov ebx, eax
push 5
call fcn.0040319a
push 1
call fcn.00403f90
jmp 0x4062f8
sub esp, 0xc
push 0
call fcn.0040438e
add esp, 0xc
test eax, eax
je 0x4062fd
cmp dword [0x424d58], 0
jne 0x40630b
sub esp, 0xc
mov ebx, 2
push 2
call fcn.0040319a
add esp, 0xc
jmp 0x406310
sub esp, 0xc
xor ebx, ebx
push 1
call fcn.0040319a
jmp 0x4062f8
mov ebx, 2
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret