Function at 0x40ead0
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
mov eax, dword [0x41c014]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x41c044]
push ebx
push esi
push edi
mov esi, dword [eax*4 + 0x406998]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SetPriorityClass]
mov ecx, dword [0x41c464]
mov dword [ebp - 0x110], 0x40849c
mov dword [ebp - 0x108], 0
mov dword [ebp - 0x10c], 0
test ecx, ecx
jne 0x40eb3e
mov eax, 0x68
lea edi, [ecx + 0x33]
lea ebx, [ebp - 0x104]
mov dword [ebp - 0x10c], eax
jmp 0x40eb94
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40eb41
sub ecx, edx
sar ecx, 1
lea edi, [ecx + 0xd]
cmp edi, 0x7ffffffc
ja 0x40ed65
lea eax, [edi + edi]
cmp eax, 0xfffffff8
jae 0x40eb92
add eax, 3
and eax, 0xfffffffc
cmp eax, 0x100
ja 0x40eb82
lea ebx, [ebp - 0x104]
mov dword [ebp - 0x10c], eax
jmp 0x40eb94
push eax
lea ecx, [ebp - 0x110]
call fcn.0040f350
mov ebx, eax
jmp 0x40eb94
xor ebx, ebx
test ebx, ebx
je 0x40ed65
xor esi, esi
cmp byte [0x41c031], 0
jne 0x40ec3d
push 0x406bfc
mov edx, edi
mov ecx, ebx
call fcn.0040d660
add esp, 4
test eax, eax
jns 0x40ebdc
push eax
push 0x407670
call fcn.0040cdd0
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 8
or edi, 0xffffffff
jmp 0x40ed57
push ebx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov esi, eax
test esi, esi
jne 0x40ec0e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push 0x407b58
call fcn.0040cdd0
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 8
jmp 0x40ed57
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x40ec3d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push 0x407bf8
call fcn.0040cdd0
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 8
jmp 0x40ed57
call fcn.0040e900
mov edi, eax
test edi, edi
jne 0x40ec4f
call fcn.0040e740
mov edi, eax
cmp byte [0x41c031], 0
jne 0x40ec5f
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test edi, edi
je 0x40ec6e
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40ed57
mov edi, dword [sym.imp.RPCRT4.dll_RpcMgmtStopServerListening]
mov ebx, dword [sym.imp.RPCRT4.dll_RpcServerUnregisterIf]
lea ebx, [ebx]
mov eax, dword [0x41c064]
push 0
mov dword [ebp - 0x118], eax
mov eax, dword [0x41c060]
push 0xffffffffffffffff
mov dword [ebp - 0x114], eax
lea eax, [ebp - 0x118]
push 0
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjectsEx]
push 0x41c048
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x41c038], 0
jne 0x40ecd2
push 0
call edi
push 0
push 0
push 0
call ebx
mov byte [0x41c033], 1
push 0x41c048
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp byte [0x41c033], 0
je 0x40ec80
cmp byte [0x41c034], 0
je 0x40ed39
lea eax, [ebp - 0x114]
push eax
push 0
call dword [sym.imp.RPCRT4.dll_RpcMgmtInqStats]
test eax, eax
jne 0x40ed2c
mov eax, dword [ebp - 0x114]
cmp dword [eax], 4
jne 0x40ed2c
push dword [eax + 4]
push 0x407ca4
call fcn.0040ce70
add esp, 8
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.RPCRT4.dll_RpcMgmtStatsVectorFree]
jmp 0x40ed39
push 0x407ce0
call fcn.0040ce70
add esp, 4
call dword [sym.imp.mspdbcore.dll_public:_static_int___cdecl_PDB::ShutDownTimeoutManager_void_]
push dword [0x41c064]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
push dword [0x41c060]
call ebx
xor edi, edi
test esi, esi
je 0x40ed74
cmp esi, 0xffffffff
je 0x40ed74
push esi
call ebx
jmp 0x40ed74
push 0x407620
call fcn.0040cdd0
add esp, 4
xor edi, edi
mov esi, dword [ebp - 0x108]
mov dword [ebp - 0x110], 0x40849c
test esi, esi
je 0x40ed97
push esi
mov esi, dword [esi]
call fcn.0041aa06
add esp, 4
test esi, esi
jne 0x40ed88
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041a744
mov esp, ebp
pop ebp
ret