Function at 0x405418
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x424
push ebx
push esi
push edi
mov edi, dword [0x597c0c]
push 6
call fcn.00405b67
xor ebx, ebx
cmp eax, ebx
je 0x405449
call eax
movzx eax, ax
push eax
push 0x59e000
call fcn.004059e2
jmp 0x405493
push ebx
mov esi, 0x5941e0
push esi
push ebx
push str.Control_PanelDesktopResourceLocale
push 0x80000001
mov dword [0x59e000], 0x7830
call fcn.0040596b
cmp byte [0x5941e0], bl
jne 0x405488
push ebx
push esi
push 0x407546
push str..DEFAULTControl_PanelInternational
push 0x80000003
call fcn.0040596b
push esi
push 0x59e000
call sub.KERNEL32.dll_lstrcatA
call fcn.00403ab2
mov eax, dword [0x597c68]
and eax, 0x20
push 0x59d400
mov dword [0x597cc0], eax
mov dword [0x597cdc], 0x10000
call fcn.00405c63
test eax, eax
jne 0x40554c
mov ecx, dword [edi + 0x48]
cmp ecx, ebx
je 0x40554c
mov eax, dword [0x597c38]
mov edx, dword [edi + 0x4c]
push ebx
mov esi, 0x596ba0
push esi
add edx, eax
push edx
add ecx, eax
push ecx
push dword [edi + 0x44]
call fcn.0040596b
mov al, byte [0x596ba0]
cmp al, bl
je 0x40554c
cmp al, 0x22
jne 0x405507
mov eax, 0x596ba1
push 0x22
push eax
mov esi, eax
call fcn.00405803
mov byte [eax], bl
push esi
call sub.KERNEL32.dll_lstrlenA
lea eax, [eax + esi - 4]
cmp eax, esi
jbe 0x40553b
push str..exe
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40553b
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405535
test al, 0x10
jne 0x40553b
push esi
call fcn.00405c3c
push esi
call fcn.00405c0f
push eax
push 0x59d400
call fcn.00405a84
mov esi, 0x59d400
push esi
call fcn.00405c63
test eax, eax
jne 0x405567
push dword [edi + 0x118]
push esi
call fcn.00405d3b
push CheckDlgButton
push ebx
push ebx
push 1
push 0x67
push dword [0x597c08]
call dword [sym.imp.USER32.dll_LoadImageA]
mov dword [0x5973d0], eax
cmp dword [edi + 0x50], 0xffffffff
mov esi, 0x5973a0
je 0x40560d
mov ecx, dword [0x597c08]
mov dword [0x5973b4], eax
lea eax, [ebp - 4]
push esi
mov dword [ebp - 4], 0x624e5f
mov dword [0x5973a4], 0x401000
mov dword [0x5973b0], ecx
mov dword [0x5973c4], eax
call dword [sym.imp.USER32.dll_RegisterClassA]
test ax, ax
je 0x405737
push ebx
lea eax, [ebp - 0x14]
push eax
push ebx
push 0x30
call dword [sym.imp.USER32.dll_SystemParametersInfoA]
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0x10]
push ebx
push dword [0x597c08]
push ebx
push ebx
push eax
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 0x14]
push eax
push dword [ebp - 0x10]
lea eax, [ebp - 4]
push dword [ebp - 0x14]
push 0x80000000
push ebx
push eax
push 0x80
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [0x5935dc], eax
push ebx
call fcn.0040144f
test eax, eax
je 0x40561f
push 2
pop eax
jmp 0x405739
call fcn.00403ab2
cmp dword [0x597ce0], ebx
jne 0x40570e
push 5
push dword [0x5935dc]
call dword [sym.imp.USER32.dll_ShowWindow]
push 0x208
lea eax, [ebp - 0x424]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
push str.RichEd20
lea eax, [ebp - 0x424]
push eax
lea eax, [ebp - 0x21c]
push str._s_s.dll
push eax
call edi
add esp, 0x10
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
jne 0x4056ae
push str.RichEd32
lea eax, [ebp - 0x424]
push eax
lea eax, [ebp - 0x21c]
push str._s_s.dll
push eax
call edi
add esp, 0x10
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, dword [sym.imp.USER32.dll_GetClassInfoA]
push esi
push 0x4074c8
push ebx
call edi
test eax, eax
jne 0x4056db
push esi
push str.RichEdit
push ebx
call edi
push esi
mov dword [0x5973c4], 0x4074c8
call dword [sym.imp.USER32.dll_RegisterClassA]
mov eax, dword [0x5973dc]
push ebx
push 0x404f6a
add eax, 0x69
movzx eax, ax
push ebx
push eax
push dword [0x597c08]
call dword [sym.imp.USER32.dll_DialogBoxParamA]
push 5
mov esi, eax
call fcn.0040144f
push 1
call fcn.004038a6
mov eax, esi
jmp 0x405739
push ebx
call fcn.00404b71
test eax, eax
je 0x405730
cmp dword [0x5973d4], ebx
jne 0x405617
push 2
call fcn.0040144f
jmp 0x405617
push 1
call fcn.0040144f
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret