Function at 0x413f80
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 0x8e0
mov eax, dword [0x457078]
xor eax, esp
mov dword [esp + 0x8dc], eax
push ebx
push esi
push edi
mov edi, dword [esp + 0x8f0]
mov ebx, ecx
mov byte [esp + 0xf], 0
test edi, edi
jne 0x413fe2
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.ole32.dll_CoCreateGuid]
push 0x40
lea eax, [esp + 0x68]
push eax
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.ole32.dll_StringFromGUID2]
push edi
push edi
push 0x40
lea eax, [esp + 0x30]
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x78]
push eax
push edi
push edi
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea edi, [esp + 0x24]
mov eax, dword [ebx + 8]
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
cmp eax, 1
jne 0x414013
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [esp + 0xf0]
push str.LocalPID_d::TID_d::_s
push eax
call esi
add esp, 0x14
jmp 0x414059
cmp eax, 2
jne 0x414034
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [esp + 0xec]
push str.LocalPID_d::_s
push eax
call esi
add esp, 0x10
jmp 0x414059
cmp eax, 3
jne 0x414041
push edi
push str.Local_s
jmp 0x41404c
cmp eax, 4
jne 0x414059
push edi
push str.Global_s
lea eax, [esp + 0xec]
push eax
call esi
add esp, 0xc
lea eax, [esp + 0xe4]
push eax
lea eax, [esp + 0x4ec]
push str._s::Mutex
push eax
call esi
add esp, 0xc
lea eax, [esp + 0x4e8]
push eax
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [ebx + 0x814], eax
test eax, eax
je 0x414173
cmp eax, 0xffffffff
je 0x414173
push ebp
lea eax, [esp + 0xe8]
push eax
lea eax, [esp + 0x4f0]
push str._s::Event
push eax
call esi
add esp, 0xc
lea eax, [esp + 0x4ec]
push eax
push 1
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebx + 0x820], eax
lea eax, [esp + 0xe8]
push eax
push 0x54
push 0
push 4
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
setne al
mov byte [ebx + 0x818], al
test ebp, ebp
je 0x414156
cmp ebp, 0xffffffff
je 0x414156
push 0
push 0
push 0
push 0xf001f
push ebp
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esp + 0x14], eax
test eax, eax
je 0x41414f
lea eax, [ebx + 0x10]
push edi
push eax
call esi
lea eax, [esp + 0xf0]
push eax
lea eax, [ebx + 0x412]
push eax
call esi
mov eax, dword [esp + 0x24]
add esp, 0x10
mov dword [ebx + 4], eax
mov al, 1
mov dword [ebx + 0xc], ebp
mov byte [esp + 0x13], al
jmp 0x41415a
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [esp + 0x13]
test byte [esp + 0x8f8], 1
pop ebp
jne 0x4141c7
push dword [ebx + 0x814]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x4141c3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0
lea ecx, [esp + 0x18]
push ecx
push 0x400
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
test eax, eax
jne 0x4141b8
push 0x400
push eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [esp + 0x10], eax
test eax, eax
je 0x4141bc
push str.unknown_error
push eax
call esi
add esp, 8
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov al, byte [esp + 0xf]
mov ecx, dword [esp + 0x8e8]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0043bfe6
add esp, 0x8e0
ret 8