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

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov edi, dword [0x7a2850]
push 2
call fcn.004065a6
xor ebx, ebx
test eax, eax
je 0x4057b0
call eax
movzx eax, ax
push eax
push 0x7a9000
call fcn.004062c9
jmp 0x4057ff
push ebx
mov esi, 0x79de10
mov word [0x7a9000], 0x7830
push esi
push ebx
push str.Control_PanelDesktopResourceLocale
push 0x80000001
mov byte [0x7a9002], bl
call fcn.00406637
cmp byte [0x79de10], bl
jne 0x4057f4
push ebx
push esi
push 0x4084b6
push str..DEFAULTControl_PanelInternational
push 0x80000003
call fcn.00406637
push esi
push 0x7a9000
call sub.KERNEL32.dll_lstrcatA
call fcn.004056c5
mov eax, dword [0x7a284c]
mov ebp, 0x7a8400
and eax, 0x20
mov dword [0x7a291c], 0x10000
push ebp
mov dword [0x7a2900], eax
call fcn.004062e2
test eax, eax
jne 0x4058b2
mov edx, dword [edi + 0x48]
test edx, edx
je 0x4058b2
mov ecx, dword [0x7a2878]
mov esi, 0x7a17e0
mov eax, dword [edi + 0x4c]
push ebx
push esi
add eax, ecx
push eax
lea eax, [edx + ecx]
push eax
push dword [edi + 0x44]
call fcn.00406637
mov al, byte [0x7a17e0]
test al, al
je 0x4058b2
cmp al, 0x22
jne 0x405870
push 0x22
mov esi, 0x7a17e1
push esi
call fcn.004062a5
mov byte [eax], bl
push esi
call sub.KERNEL32.dll_lstrlenA
add eax, 0xfffffffc
add eax, esi
cmp eax, esi
jbe 0x4058a5
push str..exe
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x4058a5
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40589f
test al, 0x10
jne 0x4058a5
push esi
call fcn.00406983
push esi
call fcn.00406207
push eax
push ebp
call fcn.004067cb
push ebp
call fcn.004062e2
test eax, eax
jne 0x4058c8
push dword [edi + 0x118]
push ebp
call fcn.00405c08
push 0x8040
push ebx
push ebx
push 1
push 0x67
push dword [0x7a2034]
call dword [sym.imp.USER32.dll_LoadImageA]
mov ecx, eax
mov ebp, 0x7a1fe0
mov dword [0x7a2018], ecx
cmp dword [edi + 0x50], 0xffffffff
mov edi, dword [sym.imp.USER32.dll_RegisterClassA]
je 0x405975
mov eax, dword [0x7a2034]
mov esi, 0x408520
push ebp
mov dword [0x7a1fe4], 0x401000
mov dword [0x7a1ff0], eax
mov dword [0x7a1ff4], ecx
mov dword [0x7a2004], esi
call edi
test ax, ax
jne 0x40592c
xor eax, eax
jmp 0x405a32
push ebx
lea eax, [esp + 0x14]
push eax
push ebx
push 0x30
call dword [sym.imp.USER32.dll_SystemParametersInfoA]
mov eax, dword [esp + 0x1c]
sub eax, dword [esp + 0x14]
push ebx
push dword [0x7a2034]
push ebx
push ebx
push eax
mov eax, dword [esp + 0x2c]
sub eax, dword [esp + 0x24]
push eax
push dword [esp + 0x2c]
push dword [esp + 0x2c]
push 0x80000000
push ebx
push esi
push 0x80
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [0x79ee18], eax
push ebx
call fcn.00401533
test eax, eax
jne 0x405a2f
call fcn.004056c5
cmp dword [0x7a2920], ebx
jne 0x405a16
push 5
push dword [0x79ee18]
call dword [sym.imp.USER32.dll_ShowWindow]
push str.RichEd20
call fcn.00405f0b
test eax, eax
jne 0x4059ba
push str.RichEd32
call fcn.00405f0b
mov esi, dword [sym.imp.USER32.dll_GetClassInfoA]
push ebp
push str.RichEdit20A
push ebx
call esi
test eax, eax
jne 0x4059e3
push ebp
push str.RichEdit
push ebx
call esi
push ebp
mov dword [0x7a2004], 0x408500
call edi
mov eax, dword [0x7a2014]
push ebx
push 0x404d44
add eax, 0x69
push ebx
movzx eax, ax
push eax
push dword [0x7a2034]
call dword [sym.imp.USER32.dll_DialogBoxParamA]
push 5
mov esi, eax
call fcn.00401533
push 1
call fcn.00403aeb
mov eax, esi
jmp 0x405a32
push ebx
call fcn.004055aa
test eax, eax
je 0x405a3a
cmp dword [0x7a202c], ebx
jne 0x405a2f
push 2
call fcn.00401533
push 2
pop eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
push 1
call fcn.00401533
jmp 0x405925