Function at 0x406285
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 [0x435a68]
push 2
call fcn.00406846
add esp, 0xc
test eax, eax
je 0x4062bc
call eax
push ebx
movzx eax, ax
push ebx
push eax
mov eax, dword [0x40b688]
add eax, 0xc000
push eax
call fcn.004067be
jmp 0x40632f
mov ebx, dword [0x40b688]
sub esp, 0xc
add ebx, 0xc000
mov word [ebx], 0x30
mov word [ebx + 2], 0x78
mov word [ebx + 4], 0
push 0
push 0x42fce8
push 0
push str.Control_PanelDesktopResourceLocale
push 0x80000001
call fcn.00406b04
add esp, 0xc
cmp word [0x42fce8], 0
jne 0x406322
sub esp, 0xc
push 0
push 0x42fce8
push 0x40b61c
push str..DEFAULTControl_PanelInternational
push 0x80000003
call fcn.00406b04
add esp, 0xc
push ecx
push ecx
push 0x42fce8
push ebx
call fcn.00406a60
pop eax
pop edx
call fcn.004061a0
sub esp, 0xc
mov eax, dword [0x435ac8]
mov edi, dword [0x40b688]
and eax, 0x20
add edi, 0xa800
mov dword [0x435a08], eax
mov dword [0x435a24], 0x10000
push edi
call fcn.00406fde
add esp, 0xc
test eax, eax
jne 0x406432
mov ecx, dword [esi + 0x48]
test ecx, ecx
je 0x406432
sub esp, 0xc
mov eax, dword [0x435a90]
push 0
push 0x436bc8
mov edx, dword [esi + 0x4c]
lea edx, [eax + edx*2]
lea eax, [eax + ecx*2]
push edx
push eax
push dword [esi + 0x44]
call fcn.00406b04
add esp, 0xc
cmp word [0x436bc8], 0
je 0x406432
mov ebx, 0x436bc8
cmp word [0x436bc8], 0x22
jne 0x4063d4
push eax
push eax
push 0x22
push 0x436bca
call fcn.004068eb
mov ebx, 0x436bca
mov word [eax], 0
pop ecx
pop eax
sub esp, 0xc
push ebx
call fcn.00406a69
add esp, 0xc
lea eax, [ebx + eax*2 - 8]
cmp eax, ebx
jbe 0x40641c
push edx
push edx
push str..exe
push eax
call sub.KERNEL32.DLL_lstrcmpiW
pop edx
test eax, eax
pop ecx
jne 0x40641c
sub esp, 0xc
push ebx
call sub.KERNEL32.DLL_GetFileAttributesW
add esp, 0xc
cmp eax, 0xffffffff
je 0x406410
test al, 0x10
jne 0x40641c
sub esp, 0xc
push ebx
call fcn.00406a72
add esp, 0xc
sub esp, 0xc
push ebx
call fcn.00406aac
sub esp, 0xc
push eax
push edi
call fcn.00406aea
add esp, 0x18
sub esp, 0xc
push edi
call fcn.00406fde
add esp, 0xc
test eax, eax
jne 0x406452
push ecx
push ecx
push dword [esi + 0x118]
push edi
call fcn.00406b8a
pop eax
pop edx
push eax
push eax
push 0x8040
push 0
push 0
push 1
push 0x67
push dword [0x435b18]
call sub.USER32.dll_LoadImageW
mov dword [0x436b68], eax
mov edx, eax
pop edi
pop eax
cmp dword [esi + 0x50], 0xffffffff
je 0x406508
sub esp, 0xc
mov eax, dword [0x435b18]
mov dword [0x42fcbc], 0x401000
mov dword [0x42fcc8], eax
mov dword [0x42fccc], edx
mov dword [0x42fcdc], 0x40b532
push 0x42fcb8
call sub.USER32.dll_RegisterClassW
xor ebx, ebx
add esp, 0xc
test ax, ax
je 0x406618
lea eax, [ebp - 0x1c]
push 0
push eax
push 0
push 0x30
call sub.USER32.dll_SystemParametersInfoW
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x10]
push 0
sub eax, edx
push dword [0x435b18]
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 0x40b532
push 0x80
call sub.USER32.dll_CreateWindowExW
mov dword [0x431d18], eax
sub esp, 0xc
push 0
call fcn.0040331b
add esp, 0xc
test eax, eax
jne 0x406613
call fcn.004061a0
cmp dword [0x435a28], 0
jne 0x4065d7
push esi
push esi
push 5
push dword [0x431d18]
call sub.USER32.dll_ShowWindow
push ebx
push str.RichEd20
call fcn.004067db
add esp, 0xc
test eax, eax
jne 0x406560
sub esp, 0xc
push str.RichEd32
call fcn.004067db
add esp, 0xc
push ecx
push 0x42fcb8
push str.RichEdit20W
push 0
call sub.USER32.dll_GetClassInfoW
pop edx
test eax, eax
jne 0x4065a2
push eax
push 0x42fcb8
push 0x40b550
push 0
call sub.USER32.dll_GetClassInfoW
mov dword [0x42fcdc], 0x40b564
push eax
push eax
push 0x42fcb8
call sub.USER32.dll_RegisterClassW
add esp, 0xc
mov eax, dword [0x436b98]
sub esp, 0xc
add eax, 0x69
movzx eax, ax
push 0
push 0x405c09
push 0
push eax
push dword [0x435b18]
call sub.USER32.dll_DialogBoxParamW
mov ebx, eax
push 5
call fcn.0040331b
push 1
call fcn.004041c4
jmp 0x406600
sub esp, 0xc
push 0
call fcn.00404624
add esp, 0xc
test eax, eax
je 0x406605
cmp dword [0x436b28], 0
jne 0x406613
sub esp, 0xc
mov ebx, 2
push 2
call fcn.0040331b
add esp, 0xc
jmp 0x406618
sub esp, 0xc
xor ebx, ebx
push 1
call fcn.0040331b
jmp 0x406600
mov ebx, 2
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret