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

Disassembly:
sub esp, 0x14
push ebx
push ebp
push esi
mov esi, dword [0x40ad60]
push edi
push 6
call fcn.00405818
xor ebx, ebx
cmp eax, ebx
je 0x405166
call eax
movzx eax, ax
push eax
push 0x42a000
call fcn.00405693
jmp 0x4051b0
push ebx
mov edi, 0x41fa90
push edi
push ebx
push str.Control_PanelDesktopResourceLocale
push 0x80000001
mov dword [0x42a000], 0x7830
call fcn.0040561c
cmp byte [0x41fa90], bl
jne 0x4051a5
push ebx
push edi
push 0x4074ce
push str..DEFAULTControl_PanelInternational
push 0x80000003
call fcn.0040561c
push edi
push 0x42a000
call sub.KERNEL32.dll_lstrcatA
call fcn.0040383c
mov eax, dword [0x40ae3c]
and eax, 0x20
mov ebp, 0x429400
push ebp
mov dword [0x40a4e4], eax
mov dword [0x40a500], 0x10000
call fcn.004058d6
test eax, eax
jne 0x405260
mov ecx, dword [esi + 0x48]
cmp ecx, ebx
je 0x405260
mov eax, dword [0x40ad80]
mov edx, dword [esi + 0x4c]
push ebx
mov edi, 0x421af0
push edi
add edx, eax
push edx
add ecx, eax
push ecx
push dword [esi + 0x44]
call fcn.0040561c
mov al, byte [0x421af0]
cmp al, bl
je 0x405260
cmp al, 0x22
jne 0x40521f
push 0x22
mov edi, 0x421af1
push edi
call fcn.004054ca
mov byte [eax], bl
push edi
call sub.KERNEL32.dll_lstrlenA
lea eax, [eax + edi - 4]
cmp eax, edi
jbe 0x405253
push str..exe
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x405253
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40524d
test al, 0x10
jne 0x405253
push edi
call fcn.004058af
push edi
call fcn.00405882
push eax
push ebp
call fcn.00405735
push ebp
call fcn.004058d6
test eax, eax
jne 0x405276
push dword [esi + 0x118]
push ebp
call fcn.004059ae
push 0x8040
push ebx
push ebx
push 1
push 0x67
push dword [0x41f650]
call dword [sym.imp.USER32.dll_LoadImageA]
mov dword [0x41fa74], eax
cmp dword [esi + 0x50], 0xffffffff
mov edi, 0x421ac8
je 0x40532a
mov ecx, dword [0x41f650]
mov dword [0x421adc], eax
lea eax, [esp + 0x10]
push edi
mov dword [esp + 0x14], 0x624e5f
mov dword [0x421acc], 0x401000
mov dword [0x421ad8], ecx
mov dword [0x421aec], eax
call dword [sym.imp.USER32.dll_RegisterClassA]
test ax, ax
je 0x4053f9
push ebx
lea eax, [esp + 0x18]
push eax
push ebx
push 0x30
call dword [sym.imp.USER32.dll_SystemParametersInfoA]
mov eax, dword [esp + 0x20]
sub eax, dword [esp + 0x18]
push ebx
push dword [0x41f650]
push ebx
push ebx
push eax
mov eax, dword [esp + 0x30]
sub eax, dword [esp + 0x28]
push eax
push dword [esp + 0x30]
lea eax, [esp + 0x2c]
push dword [esp + 0x30]
push 0x80000000
push ebx
push eax
push 0x80
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [0x41fa84], eax
push ebx
call fcn.004014b5
test eax, eax
je 0x40533c
push 2
pop eax
jmp 0x4053fb
call fcn.0040383c
cmp dword [0x40a504], ebx
jne 0x4053d0
push 5
push dword [0x41fa84]
call dword [sym.imp.USER32.dll_ShowWindow]
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.RichEd20
call esi
test eax, eax
jne 0x405373
push str.RichEd32
call esi
mov esi, dword [sym.imp.USER32.dll_GetClassInfoA]
push edi
mov ebp, 0x40745c
push ebp
push ebx
call esi
test eax, eax
jne 0x40539d
push edi
push str.RichEdit
push ebx
call esi
push edi
mov dword [0x421aec], ebp
call dword [sym.imp.USER32.dll_RegisterClassA]
mov eax, dword [0x41fa88]
push ebx
push 0x404c8c
add eax, 0x69
movzx eax, ax
push ebx
push eax
push dword [0x41f650]
call dword [sym.imp.USER32.dll_DialogBoxParamA]
push 5
mov esi, eax
call fcn.004014b5
push 1
call fcn.00403630
mov eax, esi
jmp 0x4053fb
push ebx
call fcn.0040488f
test eax, eax
je 0x4053f2
cmp dword [0x41fa7c], ebx
jne 0x405334
push 2
call fcn.004014b5
jmp 0x405334
push 1
call fcn.004014b5
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret