Function at 0x40a614
Capabilities:
Check mutex on windows

Disassembly:
push 0xc8
mov eax, 0x433e8f
call fcn.0041e870
mov edi, ecx
mov dword [ebp - 0xc4], edi
mov ecx, dword [ebp + 8]
mov al, byte [ebp + 0xc]
push ecx
lea ecx, [ebp - 0x60]
mov byte [edi + 0x20], al
call fcn.00403c40
lea eax, [ebp - 0x78]
xor ebx, ebx
push eax
mov ecx, edi
mov dword [ebp - 4], ebx
call fcn.00409a28
mov esi, eax
push 0x43dcf0
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 1
call fcn.00403cd0
push 0xffffffffffffffff
push ebx
push esi
mov ecx, eax
call fcn.00403f30
lea ecx, [ebp - 0x78]
mov byte [ebp - 4], bl
call fcn.00401c20
cmp dword [ebp - 0x4c], 8
push dword [ebp + 0x10]
lea eax, [ebp - 0x60]
cmovae eax, dword [ebp - 0x60]
add edi, 4
push eax
mov ecx, edi
mov dword [ebp - 0xc8], edi
call fcn.00412fe9
cmp dword [edi], ebx
jne 0x40a704
mov eax, dword [0x447808]
and eax, 3
cmp al, 3
jne 0x40aa4a
push ebx
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], 7
call fcn.00404390
mov byte [ebp - 0x14], bl
mov byte [ebp - 4], 2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x43dcf4
lea ecx, [ebp - 0x2c]
call fcn.004013d0
mov ecx, eax
call fcn.004014a0
lea eax, [ebp - 0x2c]
push eax
push eax
push 0x15e
push str.Utils::CEventQueue::CSubscription::Activate
push 3
call fcn.004116e9
add esp, 0x14
lea ecx, [ebp - 0x2c]
call fcn.00401c20
jmp 0x40aa4a
push str._Active
lea edx, [ebp - 0x60]
lea ecx, [ebp - 0x90]
call fcn.0040b6f7
pop ecx
lea ecx, [ebp - 0xd4]
call fcn.00411df5
mov byte [ebp - 4], 4
cmp dword [ebp - 0x7c], 8
mov edx, dword [eax]
lea ecx, [ebp - 0x90]
cmovae ecx, dword [ebp - 0x90]
mov eax, dword [edx]
push 0x100001
push ecx
lea ecx, [ebp - 0xc0]
push ecx
mov ecx, edx
call dword [eax + 0xc]
lea ecx, [ebp - 0xd4]
mov byte [ebp - 4], 6
call fcn.00408ea0
mov edx, dword [ebp - 0xc4]
lea ecx, [ebp - 0xc0]
call fcn.00413d5a
cmp byte [edx + 0x20], 0
push eax
push ebx
je 0x40a799
xor esi, esi
cmp dword [ebp - 0x98], esi
lea ecx, [ebp - 0x9c]
cmove ecx, esi
lea esi, [edx + 0x24]
push ecx
mov dword [ebp - 0xcc], esi
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
jmp 0x40a7ad
lea esi, [edx + 0x24]
push 0x100001
mov dword [ebp - 0xcc], esi
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
mov dword [esi], eax
test eax, eax
jne 0x40a875
mov eax, dword [0x447808]
and eax, 3
cmp al, 3
jne 0x40a861
push ebx
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], 7
call fcn.00404390
mov byte [ebp - 0x14], bl
mov ecx, dword [ebp - 0xc4]
lea eax, [ebp - 0x78]
push eax
mov byte [ebp - 4], 7
call fcn.00409a28
mov esi, eax
push str.Cant_activate_subscription:
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 8
call fcn.004013d0
push 0xffffffffffffffff
mov edi, eax
push ebx
push esi
mov ecx, edi
call fcn.00403f30
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.__Error_code:
mov ecx, edi
call fcn.004013d0
mov ecx, eax
call fcn.004014a0
lea ecx, [ebp - 0x78]
mov byte [ebp - 4], 7
call fcn.00401c20
lea eax, [ebp - 0x2c]
push eax
push eax
push 0x171
push str.Utils::CEventQueue::CSubscription::Activate
push 3
call fcn.004116e9
add esp, 0x14
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 6
call fcn.00401c20
mov edi, dword [ebp - 0xc8]
cmp dword [edi], ebx
je 0x40aa29
mov ecx, edi
call fcn.00414591
jmp 0x40aa29
push ebx
push ebx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
mov dword [ebp - 0xc8], eax
test eax, eax
je 0x40aa12
cmp eax, 0x80
je 0x40a969
cmp eax, 0x102
je 0x40a94d
mov eax, dword [0x447808]
and eax, 3
cmp al, 3
jne 0x40a95d
push ebx
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], 7
call fcn.00404390
mov byte [ebp - 0x30], bl
mov byte [ebp - 4], 0xb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x78]
call fcn.00413b63
mov esi, eax
push str.__LastError:
push dword [ebp - 0xc8]
lea ecx, [ebp - 0x48]
push str.Unexpected_state._Result:
mov byte [ebp - 4], 0xc
call fcn.004013d0
mov ecx, eax
call fcn.004014a0
mov ecx, eax
call fcn.004013d0
push 0xffffffffffffffff
push ebx
push esi
mov ecx, eax
call fcn.00403f30
lea ecx, [ebp - 0x78]
mov byte [ebp - 4], 0xb
call fcn.00401c20
lea eax, [ebp - 0x48]
push eax
push eax
push 0x19c
push str.Utils::CEventQueue::CSubscription::Activate
push 3
call fcn.004116e9
add esp, 0x14
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 6
call fcn.00401c20
mov esi, dword [ebp - 0xcc]
jmp 0x40a95d
mov eax, dword [ebp - 0xc4]
cmp byte [eax + 0x20], 0
je 0x40aa26
mov ecx, esi
call fcn.00401e30
jmp 0x40a861
mov eax, dword [ebp - 0xc4]
cmp byte [eax + 0x20], 0
jne 0x40aa26
mov ecx, esi
call fcn.00401e30
cmp dword [edi], 0
je 0x40a98c
mov ecx, edi
call fcn.00414591
mov eax, dword [0x447808]
and eax, 3
cmp al, 3
jne 0x40aa29
push ebx
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], 7
call fcn.00404390
mov byte [ebp - 0x30], bl
mov ecx, dword [ebp - 0xc4]
lea eax, [ebp - 0x28]
push eax
mov byte [ebp - 4], 9
call fcn.00409a28
mov esi, eax
push str.Subscriber_thread_terminated_before_the_mutex_was_released._Subscriber_unique_id:
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 0xa
call fcn.004013d0
push 0xffffffffffffffff
push ebx
push esi
mov ecx, eax
call fcn.00403f30
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 9
call fcn.00401c20
lea eax, [ebp - 0x48]
push eax
push eax
push 0x18c
push str.Utils::CEventQueue::CSubscription::Activate
push 3
call fcn.004116e9
add esp, 0x14
lea ecx, [ebp - 0x48]
call fcn.00401c20
jmp 0x40aa29
mov eax, dword [ebp - 0xc4]
cmp byte [eax + 0x20], 0
jne 0x40aa26
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
xor ebx, ebx
inc ebx
lea ecx, [ebp - 0xa8]
call fcn.00413541
lea ecx, [ebp - 0xc0]
call fcn.00401c20
lea ecx, [ebp - 0x90]
call fcn.00401c20
lea ecx, [ebp - 0x60]
call fcn.00401c20
mov al, bl
call fcn.0041e81f
ret 0xc