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

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov edi, dword [0x453d14]
push 2
call fcn.00406a89
xor ebx, ebx
test eax, eax
je 0x4059e5
call eax
movzx eax, ax
push eax
push 0x484000
call fcn.0040668a
jmp 0x405a34
push ebx
mov esi, 0x434d28
mov word [0x484000], 0x7830
push esi
push ebx
push str.Control_PanelDesktopResourceLocale
push 0x80000001
mov byte [0x484002], bl
call fcn.00406b1c
cmp byte [0x434d28], bl
jne 0x405a29
push ebx
push esi
push 0x409b92
push str..DEFAULTControl_PanelInternational
push 0x80000003
call fcn.00406b1c
push esi
push 0x484000
call sub.KERNEL32.dll_lstrcatA
call fcn.004058ef
mov eax, dword [0x453d10]
mov ebp, 0x47e000
and eax, 0x20
mov dword [0x453ddc], 0x10000
push ebp
mov dword [0x453dc0], eax
call fcn.004066a3
test eax, eax
jne 0x405ae7
mov edx, dword [edi + 0x48]
test edx, edx
je 0x405ae7
mov ecx, dword [0x453d38]
mov esi, 0x44bca0
mov eax, dword [edi + 0x4c]
push ebx
push esi
add eax, ecx
push eax
lea eax, [edx + ecx]
push eax
push dword [edi + 0x44]
call fcn.00406b1c
mov al, byte [0x44bca0]
test al, al
je 0x405ae7
cmp al, 0x22
jne 0x405aa5
push 0x22
mov esi, 0x44bca1
push esi
call fcn.00406666
mov byte [eax], bl
push esi
call sub.KERNEL32.dll_lstrlenA
add eax, 0xfffffffc
add eax, esi
cmp eax, esi
jbe 0x405ada
push str..exe
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x405ada
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405ad4
test al, 0x10
jne 0x405ada
push esi
call fcn.00406e18
push esi
call fcn.004065c8
push eax
push ebp
call fcn.00406cb4
push ebp
call fcn.004066a3
test eax, eax
jne 0x405afd
push dword [edi + 0x118]
push ebp
call fcn.00405e48
xor ebp, ebp
inc ebp
test byte [0x453d10], 0x10
je 0x405b1c
cmp dword [0x453d08], ebx
jne 0x405b1c
call fcn.00405795
mov dword [0x44b480], ebp
push 0x8040
push ebx
push ebx
push ebp
push 0x67
push dword [0x44fcf0]
call dword [sym.imp.USER32.dll_LoadImageA]
mov ecx, eax
mov esi, 0x44fca0
mov dword [0x44fcec], ecx
cmp dword [edi + 0x50], 0xffffffff
mov edi, dword [sym.imp.USER32.dll_RegisterClassA]
je 0x405bc8
mov eax, dword [0x44fcf0]
push esi
mov dword [0x44fca4], 0x401000
mov dword [0x44fcb0], eax
mov dword [0x44fcb4], ecx
mov dword [0x44fcc4], 0x409bfc
call edi
test ax, ax
je 0x405c9c
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 [0x44fcf0]
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 0x409bfc
push 0x80
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [0x43cd30], eax
push ebx
call fcn.004014e3
test eax, eax
je 0x405bda
push 2
pop eax
jmp 0x405c9e
call fcn.004058ef
cmp dword [0x453de0], ebx
jne 0x405c74
push 5
push dword [0x43cd30]
call dword [sym.imp.USER32.dll_ShowWindow]
push str.RichEd20
call fcn.0040612d
test eax, eax
jne 0x405c11
push str.RichEd32
call fcn.0040612d
push esi
mov esi, dword [sym.imp.USER32.dll_GetClassInfoA]
push str.RichEdit20A
push ebx
call esi
test eax, eax
jne 0x405c42
push 0x44fca0
push str.RichEdit
push ebx
call esi
push 0x44fca0
mov dword [0x44fcc4], 0x409bdc
call edi
mov eax, dword [0x44fce8]
push ebx
push 0x404f5b
add eax, 0x69
push ebx
movzx eax, ax
push eax
push dword [0x44fcf0]
call dword [sym.imp.USER32.dll_DialogBoxParamA]
push 5
mov esi, eax
call fcn.004014e3
push ebp
call fcn.00403cf3
mov eax, esi
jmp 0x405c9e
push ebx
call fcn.004057b6
test eax, eax
je 0x405c96
cmp dword [0x44fcd8], ebx
jne 0x405bd2
push 2
call fcn.004014e3
jmp 0x405bd2
push ebp
call fcn.004014e3
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret