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

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov edi, dword [0x7a7d90]
push 2
call fcn.00406892
push 0x30
xor ebx, ebx
pop ecx
test eax, eax
je 0x405a28
call eax
movzx eax, ax
push eax
push 0x7b4000
call fcn.004065cb
jmp 0x405a81
push 0x78
pop eax
push ebx
mov esi, 0x79f248
mov word [0x7b4002], ax
push esi
push ebx
push str.Control_PanelDesktopResourceLocale
xor eax, eax
mov word [0x7b4000], cx
push 0x80000001
mov word [0x7b4004], ax
call fcn.00406923
cmp word [0x79f248], bx
jne 0x405a76
push ebx
push esi
push 0x408684
push str..DEFAULTControl_PanelInternational
push 0x80000003
call fcn.00406923
push esi
push 0x7b4000
call sub.KERNEL32.dll_lstrcatW
call fcn.0040593a
mov eax, dword [0x7a7d8c]
mov ebp, 0x7b2800
and eax, 0x20
mov dword [0x7a7e5c], 0x10000
push ebp
mov dword [0x7a7e40], eax
call fcn.004065e4
test eax, eax
jne 0x405b42
mov edx, dword [edi + 0x48]
test edx, edx
je 0x405b42
mov ecx, dword [0x7a7db8]
mov esi, 0x7a5d20
mov eax, dword [edi + 0x4c]
push ebx
push esi
lea eax, [ecx + eax*2]
push eax
lea eax, [ecx + edx*2]
push eax
push dword [edi + 0x44]
call fcn.00406923
mov ax, word [0x7a5d20]
test ax, ax
je 0x405b42
push 0x22
pop ecx
cmp ax, cx
jne 0x405aff
push ecx
mov esi, 0x7a5d22
push esi
call fcn.004065a2
xor ecx, ecx
mov word [eax], cx
push esi
call sub.KERNEL32.dll_lstrlenW
add eax, 0xfffffffc
lea eax, [esi + eax*2]
cmp eax, esi
jbe 0x405b35
push str..exe
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x405b35
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x405b2f
test al, 0x10
jne 0x405b35
push esi
call fcn.00406cbc
push esi
call fcn.00406502
push eax
push ebp
call fcn.00406ac6
push ebp
call fcn.004065e4
test eax, eax
jne 0x405b58
push dword [edi + 0x118]
push ebp
call fcn.00405e54
push 0x8040
push ebx
push ebx
push 1
push 0x67
push dword [0x7a6d74]
call dword [sym.imp.USER32.dll_LoadImageW]
mov ecx, eax
mov ebp, 0x7a6d20
mov dword [0x7a6d58], ecx
cmp dword [edi + 0x50], 0xffffffff
mov edi, dword [sym.imp.USER32.dll_RegisterClassW]
je 0x405c05
mov eax, dword [0x7a6d74]
mov esi, 0x408734
push ebp
mov dword [0x7a6d24], 0x401000
mov dword [0x7a6d30], eax
mov dword [0x7a6d34], ecx
mov dword [0x7a6d44], esi
call edi
test ax, ax
jne 0x405bbc
xor eax, eax
jmp 0x405cc2
push ebx
lea eax, [esp + 0x14]
push eax
push ebx
push 0x30
call dword [sym.imp.USER32.dll_SystemParametersInfoW]
mov eax, dword [esp + 0x1c]
sub eax, dword [esp + 0x14]
push ebx
push dword [0x7a6d74]
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 esi
push pe_nt_image_headers32
call dword [sym.imp.USER32.dll_CreateWindowExW]
mov dword [0x7a1250], eax
push ebx
call fcn.00401533
test eax, eax
jne 0x405cbf
call fcn.0040593a
cmp dword [0x7a7e60], ebx
jne 0x405ca6
push 5
push dword [0x7a1250]
call dword [sym.imp.USER32.dll_ShowWindow]
push str.RichEd20
call fcn.0040614a
test eax, eax
jne 0x405c4a
push str.RichEd32
call fcn.0040614a
mov esi, dword [sym.imp.USER32.dll_GetClassInfoW]
push ebp
push str.RichEdit20W
push ebx
call esi
test eax, eax
jne 0x405c73
push ebp
push str.RichEdit
push ebx
call esi
push ebp
mov dword [0x7a6d44], 0x4086fc
call edi
mov eax, dword [0x7a6d54]
push ebx
push 0x404f4d
add eax, 0x69
push ebx
movzx eax, ax
push eax
push dword [0x7a6d74]
call dword [sym.imp.USER32.dll_DialogBoxParamW]
push 5
mov esi, eax
call fcn.00401533
push 1
call fcn.00403cb3
mov eax, esi
jmp 0x405cc2
push ebx
call fcn.0040581f
test eax, eax
je 0x405cca
cmp dword [0x7a6d6c], ebx
jne 0x405cbf
push 2
call fcn.00401533
push 2
pop eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
push 1
call fcn.00401533
jmp 0x405bb5