Function at 0x416510
Capabilities:
Check for time delay via gettickcount
Check os version

Disassembly:
push 0xffffffffffffffff
push 0x51d28c
mov eax, dword fs:[0]
push eax
sub esp, 0x13c
mov eax, dword [0x5b339c]
xor eax, esp
mov dword [esp + 0x138], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5b339c]
xor eax, esp
push eax
lea eax, [esp + 0x150]
mov dword fs:[0], eax
mov eax, dword [0x5b6bb0]
cmp byte [ecx + 0x480], 1
mov ecx, dword [eax]
mov edi, dword [esp + 0x164]
mov esi, dword [esp + 0x168]
mov edx, dword [ecx]
mov byte [esp + 0x17], 0
jne 0x41671c
push str.Server_Mutex_is__ENABLED_
push str.CPSTServer::OpenServerMutex
push 7
push eax
call edx
add esp, 0x10
lea ecx, [esp + 0x1c]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
mov dword [esp + 0x158], 0
lea eax, [esp + 0x38]
push eax
mov dword [esp + 0x3c], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [esp + 0x3c], 5
lea ecx, [esp + 0x1c]
jb 0x4165c0
push str.Global_
jmp 0x4165c5
push 0x57ea28
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
push edi
lea ecx, [esp + 0x20]
call dword [0x539434]
push str._Mutex
lea ecx, [esp + 0x20]
call dword [0x539464]
mov ecx, dword [0x5b6bb0]
mov edi, dword [ecx]
lea ecx, [esp + 0x1c]
call dword [sym.imp.MSVCP90.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
mov edx, dword [0x5b6bb0]
push eax
mov eax, dword [edi]
push str.Opening_Mutex_with_name___ls_.
push str.CPSTServer::OpenServerMutex
push 7
push edx
call eax
add esp, 0x14
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea ecx, [esp + 0x1c]
mov dword [esp + 0x18], eax
call dword [sym.imp.MSVCP90.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
mov ebp, dword [sym.imp.KERNEL32.dll_CreateMutexW]
push eax
push 0
push 0
call ebp
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
call ebx
cmp dword [esi], 0
mov edi, eax
je 0x4166e5
cmp edi, 0xb7
jne 0x416695
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x18]
cdq
xor eax, edx
sub eax, edx
cmp eax, dword [esp + 0x160]
jae 0x416695
mov ecx, dword [esi]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [esp + 0x1c]
call dword [sym.imp.MSVCP90.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
push 0
push 0
call ebp
mov dword [esi], eax
call ebx
cmp dword [esi], 0
mov edi, eax
jne 0x416648
cmp dword [esi], 0
je 0x4166e5
mov eax, dword [0x5b6bb0]
cmp edi, 0xb7
je 0x4166c4
mov edx, dword [eax]
push str.Server_Mutex_is__OPEN_.
push str.CPSTServer::OpenServerMutex
push 7
push eax
mov eax, dword [edx]
call eax
add esp, 0x10
mov byte [esp + 0x17], 1
jmp 0x416701
mov ecx, dword [eax]
mov edx, dword [ecx]
push str.ERROR:_Mutex_is_opened_by_another_OPC_Server_instance.
push str.CPSTServer::OpenServerMutex
push 1
push eax
call edx
mov eax, dword [esi]
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x416701
mov eax, dword [0x5b6bb0]
mov ecx, dword [eax]
mov edx, dword [ecx]
push edi
push str.ERROR:_Could_not_open_mutex___error___d.
push str.CPSTServer::OpenServerMutex
push 1
push eax
call edx
add esp, 0x14
mov dword [esp + 0x158], 0xffffffff
lea ecx, [esp + 0x1c]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov al, byte [esp + 0x17]
jmp 0x416730
push str.Server_Mutex_is__DISABLED_
push str.CPSTServer::OpenServerMutex
push 7
push eax
call edx
add esp, 0x10
mov al, 1
mov ecx, dword [esp + 0x150]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x138]
xor ecx, esp
call fcn.0051973e
add esp, 0x148
ret 0xc