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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
mov edi, dword [0x4745dc]
push 6
call fcn.00406145
xor ebx, ebx
cmp eax, ebx
je 0x4058df
call eax
movzx eax, ax
push eax
push 0x4d50c0
call fcn.00405f16
jmp 0x40593a
push 0x30
pop eax
push 0x78
mov word [0x4d50c0], ax
pop eax
push ebx
mov esi, 0x44a260
push esi
push ebx
mov word [0x4d50c2], ax
push str.Control_PanelDesktopResourceLocale
xor eax, eax
push 0x80000001
mov word [0x4d50c4], ax
call fcn.00405e98
cmp word [0x44a260], bx
jne 0x40592f
push ebx
push esi
push 0x408794
push str..DEFAULTControl_PanelInternational
push 0x80000003
call fcn.00405e98
push esi
push 0x4d50c0
call sub.KERNEL32.dll_lstrcatW
call fcn.00403e13
mov eax, dword [0x474628]
and eax, 0x20
push 0x4c90a8
mov dword [0x474680], eax
mov dword [0x47469c], 0x10000
call fcn.004065c8
test eax, eax
jne 0x4059fc
mov ecx, dword [edi + 0x48]
cmp ecx, ebx
je 0x4059fc
mov eax, dword [0x4745f8]
mov edx, dword [edi + 0x4c]
push ebx
mov esi, 0x464540
push esi
lea edx, [eax + edx*2]
push edx
lea eax, [eax + ecx*2]
push eax
push dword [edi + 0x44]
call fcn.00405e98
mov ax, word [0x464540]
cmp ax, bx
je 0x4059fc
cmp ax, 0x22
jne 0x4059b7
mov eax, 0x464542
push 0x22
push eax
mov esi, eax
call fcn.00405c6c
xor ecx, ecx
mov word [eax], cx
push esi
call sub.KERNEL32.dll_lstrlenW
lea eax, [esi + eax*2 - 8]
cmp eax, esi
jbe 0x4059eb
push str..exe
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x4059eb
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4059e5
test al, 0x10
jne 0x4059eb
push esi
call fcn.0040659b
push esi
call fcn.0040656c
push eax
push 0x4c90a8
call fcn.00405fcf
mov esi, 0x4c90a8
push esi
call fcn.004065c8
test eax, eax
jne 0x405a17
push dword [edi + 0x118]
push esi
call fcn.00406650
push 0x8040
push ebx
push ebx
push 1
push 0x67
push dword [0x4745d8]
call dword [sym.imp.USER32.dll_LoadImageW]
mov dword [0x46c590], eax
cmp dword [edi + 0x50], 0xffffffff
mov esi, 0x46c560
je 0x405acc
mov ecx, dword [0x4086f0]
mov dword [ebp - 8], ecx
mov ecx, dword [0x4086f4]
mov dword [ebp - 4], ecx
mov ecx, dword [0x4745d8]
mov dword [0x46c574], eax
lea eax, [ebp - 8]
push esi
mov dword [0x46c564], 0x401000
mov dword [0x46c570], ecx
mov dword [0x46c584], eax
call dword [sym.imp.USER32.dll_RegisterClassW]
test ax, ax
je 0x405b9e
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 [0x4745d8]
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 [0x43e240], eax
push ebx
call fcn.004014dd
test eax, eax
je 0x405ade
push 2
pop eax
jmp 0x405ba0
call fcn.00403e13
cmp dword [0x4746a0], ebx
jne 0x405b75
push 5
push dword [0x43e240]
call dword [sym.imp.USER32.dll_ShowWindow]
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push str.RichEd20
call edi
test eax, eax
jne 0x405b15
push str.RichEd32
call edi
mov edi, dword [sym.imp.USER32.dll_GetClassInfoW]
push esi
push str.RichEdit20A
push ebx
call edi
test eax, eax
jne 0x405b42
push esi
push str.RichEdit
push ebx
call edi
push esi
mov dword [0x46c584], 0x4086b0
call dword [sym.imp.USER32.dll_RegisterClassW]
mov eax, dword [0x46c59c]
push ebx
push 0x4053fe
add eax, 0x69
movzx eax, ax
push ebx
push eax
push dword [0x4745d8]
call dword [sym.imp.USER32.dll_DialogBoxParamW]
push 5
mov esi, eax
call fcn.004014dd
push 1
call fcn.00403c07
mov eax, esi
jmp 0x405ba0
push ebx
call fcn.00405001
test eax, eax
je 0x405b97
cmp dword [0x46c594], ebx
jne 0x405ad6
push 2
call fcn.004014dd
jmp 0x405ad6
push 1
call fcn.004014dd
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret