Function at 0x40b790
Capabilities:
Check mutex on windows

Disassembly:
push 0xffffffffffffffff
push 0x4c8371
mov eax, dword fs:[0]
push eax
sub esp, 0x164
mov eax, dword [0x54e864]
xor eax, esp
mov dword [esp + 0x160], eax
push esi
push edi
mov eax, dword [0x54e864]
xor eax, esp
push eax
lea eax, [esp + 0x170]
mov dword fs:[0], eax
mov edi, dword [esp + 0x180]
push 0x104
lea eax, [esp + 0x6c]
push eax
push 0
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40b7ff
push 1
push 0x4d29bc
mov ecx, edi
call fcn.00406dc0
jmp 0x40b844
push eax
lea ecx, [esp + 0x6c]
push ecx
lea edx, [esp + 0x34]
push edx
call fcn.00407cf0
add esp, 0xc
push eax
mov ecx, edi
mov dword [esp + 0x17c], 0
call fcn.00407940
cmp dword [esp + 0x40], 0x10
mov dword [esp + 0x178], 0xffffffff
jb 0x40b844
mov eax, dword [esp + 0x2c]
push eax
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea ecx, [esp + 0x4c]
push str.z__dbg_util__mutex__05u
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea edx, [esp + 0x48]
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40b8bc
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, esi
mov dword [esi], 0
call fcn.00408290
xor al, al
mov ecx, dword [esp + 0x170]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [esp + 0x160]
xor ecx, esp
call fcn.004c6212
add esp, 0x170
ret 4
push str._NT_SYMBOL_PATH
push edi
mov ecx, esi
call fcn.00407f70
push str._NT_ALTERNATE_SYMBOL_PATH
push edi
mov ecx, esi
call fcn.00407f70
push str.SYSTEMROOT
push edi
mov ecx, esi
call fcn.00407f70
push 0x2c
mov dword [esp + 0x1c], 0
call sub.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
test eax, eax
je 0x40b9eb
mov dword [esp + 0x14], eax
mov dword [eax], eax
mov eax, dword [esp + 0x14]
mov dword [eax + 4], eax
mov eax, dword [esp + 0x14]
mov dword [eax + 8], eax
mov ecx, dword [esp + 0x14]
mov byte [ecx + 0x28], 1
mov edx, dword [esp + 0x14]
mov byte [edx + 0x29], 1
lea eax, [esp + 0x10]
push eax
push 0x40b2a0
mov dword [esp + 0x180], 1
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.imagehlp.dll_EnumerateLoadedModules]
mov eax, dword [esp + 0x14]
mov esi, dword [eax]
cmp esi, eax
je 0x40b9ba
lea ecx, [ecx]
push 1
push 0x4d25f8
mov ecx, edi
call fcn.00406bb0
push 0xffffffffffffffff
lea eax, [esi + 0xc]
push 0
push eax
mov ecx, edi
call fcn.00406ac0
cmp byte [esi + 0x29], 0
jne 0x40b9b2
mov eax, dword [esi + 8]
cmp byte [eax + 0x29], 0
jne 0x40b992
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x29], 0
jne 0x40b9b2
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x29], 0
je 0x40b986
jmp 0x40b9b2
mov eax, dword [esi + 4]
cmp byte [eax + 0x29], 0
jne 0x40b9b0
jmp 0x40b9a0
cmp esi, dword [eax + 8]
jne 0x40b9b0
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x29], 0
je 0x40b9a0
mov esi, eax
mov eax, dword [esp + 0x14]
cmp esi, eax
jne 0x40b950
mov ecx, dword [eax]
push eax
push ecx
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x184], 2
call fcn.0040b450
mov edx, dword [esp + 0x14]
push edx
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
add esp, 4
mov al, 1
jmp 0x40b894
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0x24]
mov dword [esp + 0x10], 0
call dword [sym.imp.MSVCR100.dll_public:_void___thiscall_std::exception::constructor_char_const__const_const__]
push 0x51e22c
lea ecx, [esp + 0x24]
push ecx
mov dword [esp + 0x28], vtable.std::bad_alloc.0
call sub.MSVCR100.dll__CxxThrowException
int3