Function at 0x4058c0
Capabilities:
Check mutex on windows

Disassembly:
push 0x48
mov eax, 0x506ac6
call fcn.00506098
mov esi, edx
push 0x41fc1f
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov ecx, esi
call fcn.0040563d
mov edi, eax
xor ebx, ebx
cmp edi, 5
je 0x4058f0
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
mov dword [0xd58f50], 1
cmp edi, 3
jne 0x405913
mov dword [0xd58f50], 0xb
call fcn.00405568
jmp 0x405b1c
cmp edi, 4
jne 0x405957
mov dword [0xd58f50], 0xc
call fcn.00405568
call fcn.004b906b
call fcn.004be604
test eax, eax
je 0x40593a
call fcn.004be71b
call fcn.004be049
push ecx
mov ecx, esp
push str.Anvirlauncher
call fcn.004094e6
call fcn.004c30f8
pop ecx
jmp 0x405b1c
cmp edi, 5
jne 0x405966
call fcn.0040e91b
jmp 0x405b1c
test edi, edi
je 0x405978
cmp edi, 1
je 0x405978
cmp edi, 2
jne 0x405a40
push str.ANVIR_RESTARTING
push ebx
push 0x1f0001
mov dword [0xd58f50], 0xd
call dword [sym.imp.KERNEL32.dll_OpenMutexA]
mov esi, eax
test esi, esi
je 0x4059a5
push 0x2710
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push str.ANVIR_START
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
test eax, eax
je 0x4059c9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4059c9
cmp edi, 1
je 0x405a17
push ebx
push str.AnVirMainFrame
call dword [sym.imp.USER32.dll_FindWindowA]
mov ebx, eax
test ebx, ebx
je 0x405a33
lea ecx, [ebp - 0x1c]
call fcn.004203f0
and dword [ebp - 0x10], 0
lea eax, [ebp - 0x10]
push eax
push str.EnableMultiInstances
lea ecx, [ebp - 0x1c]
call fcn.00406623
cmp dword [ebp - 0x10], 1
je 0x405a2b
xor edx, edx
mov ecx, ebx
inc edx
call fcn.0046da04
push ebx
call dword [sym.imp.USER32.dll_SetForegroundWindow]
lea ecx, [ebp - 0x1c]
call fcn.00408049
test esi, esi
je 0x405b1c
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x405b1c
lea ecx, [ebp - 0x1c]
call fcn.00408049
test esi, esi
je 0x405a3e
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
lea eax, [ebp - 0x18]
mov dword [0xd58f50], 2
push eax
mov dword [ebp - 0x18], 8
mov dword [ebp - 0x14], 0xff
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
sub esp, 0xc
call fcn.00406598
xorps xmm0, xmm0
mov dword [ebp - 0x40], ebx
movups xmmword [ebp - 0x50], xmm0
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x54], 0x51e77c
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x54]
mov esi, dword [0xd5afec]
add esi, 0x10
mov dword [ebp - 0x10], eax
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [0xd5a848]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.0040652e
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [ebp + 8]
or eax, 0xffffffff
cmp edi, 1
push edi
cmove edx, eax
call fcn.004052c2
pop ecx
test eax, eax
je 0x405ae3
lea ecx, [ebp - 0x54]
mov dword [0xd58f50], 3
call fcn.00405781
mov dword [0xd58f50], 4
call fcn.004064d2
mov ecx, dword [0xd58f54]
test ecx, ecx
je 0x405b09
mov eax, dword [ecx]
push 1
call dword [eax + 4]
mov dword [0xd58f54], ebx
call fcn.004062e1
call dword [sym.imp.ole32.dll_CoUninitialize]
lea ecx, [ebp - 0x54]
call fcn.00405b2e
xor eax, eax
call fcn.00506061
ret