Function at 0x404960
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x514388
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x56a698]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push str.__Productsetup_starter
lea ecx, [ebp - 0x10]
call fcn.00401fe0
mov esi, dword [ebp + 8]
mov dword [ebp - 4], 0
cmp esi, 1
je 0x4049ba
mov eax, dword [ebp - 0x10]
push str.__Test_for_Mutex...
push eax
push 0xa
push 0x56bc60
call fcn.00407920
add esp, 0x10
push str.Global_MSIExecute
push 0
push 0x1f0001
call dword [sym.imp.KERNEL32.dll_OpenMutexA]
mov edi, eax
test edi, edi
jne 0x404a0e
cmp esi, 1
je 0x4049ef
mov ecx, dword [ebp - 0x10]
push str.____No_MSI_active__no_Mutex_existing_
push ecx
push 0xa
push 0x56bc60
call fcn.00407920
add esp, 0x10
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x404c02
test esi, esi
jne 0x404a1c
mov ebx, 0x7d0
lea eax, [esi + 2]
jmp 0x404a2b
mov ebx, esi
imul ebx, ebx, 0x3e8
cmp esi, 1
je 0x404a44
mov eax, esi
mov ecx, dword [ebp - 0x10]
push eax
push str.____Waiting_for_Mutex_to_release...___maxwait_d_sec_
push ecx
push 0xa
push 0x56bc60
call fcn.00407920
add esp, 0x14
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebx, eax
cmp esi, 1
je 0x404a6b
mov edx, dword [ebp - 0x10]
push str.____Wait_end_for_Mutex
push edx
push 0xa
push 0x56bc60
call fcn.00407920
add esp, 0x10
test ebx, ebx
je 0x404b9c
cmp ebx, 0x80
je 0x404b42
cmp ebx, 0x102
je 0x404ae3
mov eax, dword [ebp - 0x10]
push str.__Error_Mutex:_Default_case_not_specified.
push eax
push 0
push 0x56bc60
call fcn.00407920
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404acc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0xfffffffd
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp esi, 1
je 0x404b00
mov ecx, dword [ebp - 0x10]
push str.__Mutex:_WAIT_TIMEOUT
push ecx
push 0
push 0x56bc60
call fcn.00407920
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x404b2d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x10]
push str.__Mutex:_WAIT_ABANDONED
push ecx
push 0
push 0x56bc60
call fcn.00407920
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x404b2d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test eax, eax
jne 0x404bbe
mov ecx, dword [ebp - 0x10]
push str.__Mutex:_Error_while_releasing
push ecx
push eax
push 0x56bc60
call fcn.00407920
add esp, 0x10
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [ebp - 0x10]
push str.__Mutex:_MSI_not_no_longer_active.
push edx
push 0
push 0x56bc60
call fcn.00407920
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404c0e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret