Function at 0x4052e2
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 [0x5a38ec]
push 6
call fcn.00405a31
xor ebx, ebx
cmp eax, ebx
je 0x405313
call eax
movzx eax, ax
push eax
push 0x5aa000
call fcn.004058ac
jmp 0x40535d
push ebx
mov esi, 0x59ed48
push esi
push ebx
push str.Control_PanelDesktopResourceLocale
push 0x80000001
mov dword [0x5aa000], 0x7830
call fcn.00405835
cmp byte [0x59ed48], bl
jne 0x405352
push ebx
push esi
push 0x40852a
push str..DEFAULTControl_PanelInternational
push 0x80000003
call fcn.00405835
push esi
push 0x5aa000
call sub.KERNEL32.dll_lstrcatA
call fcn.0040397c
mov eax, dword [0x5a3948]
and eax, 0x20
push 0x5a9400
mov dword [0x5a39a0], eax
mov dword [0x5a39bc], 0x10000
call fcn.00405b2d
test eax, eax
jne 0x405416
mov ecx, dword [edi + 0x48]
cmp ecx, ebx
je 0x405416
mov eax, dword [0x5a3918]
mov edx, dword [edi + 0x4c]
push ebx
mov esi, 0x5a2880
push esi
add edx, eax
push edx
add ecx, eax
push ecx
push dword [edi + 0x44]
call fcn.00405835
mov al, byte [0x5a2880]
cmp al, bl
je 0x405416
cmp al, 0x22
jne 0x4053d1
mov eax, 0x5a2881
push 0x22
push eax
mov esi, eax
call fcn.004056cd
mov byte [eax], bl
push esi
call sub.KERNEL32.dll_lstrlenA
lea eax, [eax + esi - 4]
cmp eax, esi
jbe 0x405405
push str..exe
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x405405
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4053ff
test al, 0x10
jne 0x405405
push esi
call fcn.00405b06
push esi
call fcn.00405ad9
push eax
push 0x5a9400
call fcn.0040594e
mov esi, 0x5a9400
push esi
call fcn.00405b2d
test eax, eax
jne 0x405431
push dword [edi + 0x118]
push esi
call fcn.00405c05
push 0x8040
push ebx
push ebx
push 1
push 0x67
push dword [0x5a38e8]
call dword [sym.imp.USER32.dll_LoadImageA]
mov dword [0x5a30b0], eax
cmp dword [edi + 0x50], 0xffffffff
mov esi, 0x5a3080
je 0x4054d7
mov ecx, dword [0x5a38e8]
mov dword [0x5a3094], eax
lea eax, [ebp - 4]
push esi
mov dword [ebp - 4], 0x624e5f
mov dword [0x5a3084], 0x401000
mov dword [0x5a3090], ecx
mov dword [0x5a30a4], eax
call dword [sym.imp.USER32.dll_RegisterClassA]
test ax, ax
je 0x405601
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 [0x5a38e8]
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 [0x59e144], eax
push ebx
call fcn.0040144f
test eax, eax
je 0x4054e9
push 2
pop eax
jmp 0x405603
call fcn.0040397c
cmp dword [0x5a39c0], ebx
jne 0x4055d8
push 5
push dword [0x59e144]
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 0x405578
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 str.RichEdit20A
push ebx
call edi
test eax, eax
jne 0x4055a5
push esi
push str.RichEdit
push ebx
call edi
push esi
mov dword [0x5a30a4], 0x4084ac
call dword [sym.imp.USER32.dll_RegisterClassA]
mov eax, dword [0x5a30bc]
push ebx
push 0x404e34
add eax, 0x69
movzx eax, ax
push ebx
push eax
push dword [0x5a38e8]
call dword [sym.imp.USER32.dll_DialogBoxParamA]
push 5
mov esi, eax
call fcn.0040144f
push 1
call fcn.00403770
mov eax, esi
jmp 0x405603
push ebx
call fcn.00404a3b
test eax, eax
je 0x4055fa
cmp dword [0x5a30b4], ebx
jne 0x4054e1
push 2
call fcn.0040144f
jmp 0x4054e1
push 1
call fcn.0040144f
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret