Function at 0x40a470
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x354
mov eax, dword [0x47c554]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov bl, byte [ebp + 8]
push esi
push edi
push 0
cmp bl, 1
jne 0x40a6b6
push 0x40a960
push 0xf
call dword [sym.imp.USER32.dll_GetSysColor]
push eax
push 0
push 0
push 0
push 0
push str.Preparation...
push str.Project_openning
push dword [0x47cea4]
call fcn.00439a50
add esp, 0x28
test al, al
jne 0x40a4ed
push str.ISIPLC_by_ISITEC_International
push dword [0x47cea4]
call dword [sym.imp.USER32.dll_SetWindowTextA]
push 1
push 0x47cec0
xor bl, bl
call fcn.00412f90
add esp, 8
jmp 0x40a763
push 0xdc
push dword [0x4daa3c]
call fcn.00401c70
push 0x484b8e
push 0x484b6f
push 0x484b50
push str.ISIPLC_by_ISITEC_International____s_:__s___s_
lea eax, [ebp - 0x20c]
push 0x100
push eax
call fcn.004038d0
add esp, 0x20
lea eax, [ebp - 0x20c]
push eax
push dword [0x47cea4]
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov eax, dword [0x4c648c]
test eax, eax
jne 0x40a5a3
push str.ISIPLC_CONSOLE
lea eax, [ebp - 0x354]
push 0x1f
push eax
call fcn.0043f2f3
push 0x484b9c
lea eax, [ebp - 0x335]
push 0x10
push eax
call fcn.0043f2f3
mov eax, dword [0x484bac]
mov dword [ebp - 0x220], eax
lea eax, [ebp - 0x354]
push eax
mov byte [ebp - 0x325], 0
mov dword [ebp - 0x21c], 0xa
mov dword [ebp - 0x210], 0x40e700
call fcn.00405640
add esp, 0x1c
mov dword [0x4c648c], eax
jmp 0x40a5b7
push dword [0x484bac]
push 0x484b9c
push eax
call fcn.00405860
add esp, 0xc
push dword [0x47ceac]
call dword [sym.imp.KERNEL32.dll_PulseEvent]
call fcn.0043b350
mov esi, eax
push 0xbb8
push esi
call fcn.0043b310
push esi
call fcn.0043b360
add esp, 0xc
test eax, eax
jne 0x40a60a
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
nop dword [eax + eax]
mov al, byte [0x47cebc]
test al, al
jne 0x40a60f
push 0x64
call edi
push esi
call fcn.0043b360
add esp, 4
test eax, eax
je 0x40a5f0
mov al, byte [0x47cebc]
cmp al, 1
jne 0x40a650
push 1
push 0x40a960
push 0xf
call dword [sym.imp.USER32.dll_GetSysColor]
push eax
push 0
push 0
push 0
push 0
push str.Preparation...
push str.Project_opening
push dword [0x47cea4]
call fcn.00439a50
push 1
push dword [0x4daa3c]
call fcn.00401c00
add esp, 0x30
push 1
call fcn.00424070
mov edi, dword [sym.imp.USER32.dll_MessageBoxA]
add esp, 4
test al, al
jne 0x40a678
push 0x40
push str.Fatal_error
push str.This_software_is_not_correctly_installed._Building_bloc_is_not_possible_nYou_should_re_install_this_software
push dword [0x47cea4]
call edi
mov ecx, 0x484b40
mov edx, 0x47cec4
mov esi, 0xc
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x40a69d
add ecx, 4
add edx, 4
sub esi, 4
jae 0x40a687
jmp 0x40a763
push 0x40
push str.Project_checking
push str.The_PLC_is_not_connected_or_is_not_executing_the_openned_project_nDownloading_bloc_wont_be_possible
push dword [0x47cea4]
call edi
jmp 0x40a763
call fcn.00424070
add esp, 4
cmp byte [0x47cfd9], 0
je 0x40a6d6
push 1
push 0x47cec0
call fcn.00412f90
add esp, 8
push 0
push dword [0x4daa3c]
mov dword [0x4af514], 0
call fcn.00401c70
mov eax, dword [0x4c648c]
add esp, 8
test eax, eax
je 0x40a709
push 0
push str.0.0.0.0
push eax
call fcn.00405860
add esp, 0xc
cmp byte [0x4daa40], 1
jne 0x40a752
lea eax, [ebp - 0x10c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push str.LocalEdit
lea eax, [ebp - 0x10c]
push 0x105
push eax
call fcn.0043f34d
lea eax, [ebp - 0x10c]
push 1
push eax
call fcn.00414c90
add esp, 0x14
mov byte [0x4daa40], 0
push str.ISIPLC_by_ISITEC_International
push dword [0x47cea4]
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov edi, dword [sym.imp.USER32.dll_EnableMenuItem]
xor esi, esi
nop dword [eax + eax]
cmp byte [esi + 0x46f1c4], 1
jne 0x40a7e7
mov edx, dword [esi + 0x46f1c0]
lea eax, [edx - 0x9c49]
cmp eax, 3
ja case.default.0x40a78a
jmp dword [eax*4 + 0x40a82c]
cmp byte [0x4af625], 0
jne case.default.0x40a78a
xor cl, cl
jmp 0x40a7ce
cmp byte [0x4af830], 0
jne case.default.0x40a78a
xor cl, cl
jmp 0x40a7ce
cmp byte [0x4afa3b], 0
jne case.default.0x40a78a
xor cl, cl
jmp 0x40a7ce
cmp byte [0x4afc46], 0
jne case.default.0x40a78a
xor cl, cl
jmp 0x40a7ce
cmp bl, byte [esi + 0x46f1c5]
sete cl
xor eax, eax
cmp cl, 1
setne al
push eax
push edx
push dword [0x47cea4]
call dword [sym.imp.USER32.dll_GetMenu]
push eax
call edi
add esi, 8
cmp esi, 0xe0
jb 0x40a770
xor eax, eax
mov byte [0x47cec0], bl
cmp bl, 1
mov ecx, 0x47cec0
push 0x403
cmovne ecx, eax
push ecx
call fcn.0040c920
mov ecx, dword [ebp - 4]
add esp, 8
mov al, bl
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0043b572
mov esp, ebp
pop ebp
ret