Function at 0x406400
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54acb0
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x60c9c8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [ebp + 8]
cmp dword [eax - 0xc], 0
mov dword [ebp - 4], 1
mov dword [ebp - 0x10], 0
je 0x4065ff
cmp dword [ebp + 0x10], 0
je 0x4065ff
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x14], esp
mov edi, esp
push eax
call fcn.00402f60
add eax, 0x10
add esp, 4
mov ecx, esi
mov dword [edi], eax
call fcn.00406150
mov ebx, eax
test ebx, ebx
je 0x4065fc
cmp dword [ebx + 8], 0
jle 0x4065fc
mov edi, dword [sym.imp.KERNEL32.dll_CreateMutexW]
push str.Inst_FileName_Mutex
push 0
push 0
call edi
push str.Inst_Progress_Mutex
push 0
push 0
mov dword [esi], eax
call edi
push str.Inst_Log_Mutex
push 0
push 0
mov dword [esi + 4], eax
call edi
cmp dword [esi], 0
mov edi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [esi + 8], eax
je 0x40654c
cmp dword [esi + 4], 0
je 0x406532
test eax, eax
je 0x406532
push 0x420
lea eax, [esi + 0xc]
push 0
push eax
call fcn.00531fb0
mov ecx, dword [ebp + 0x10]
mov edx, dword [esi]
mov eax, dword [esi + 4]
mov dword [esi + 0x41c], ecx
mov ecx, dword [esi + 8]
mov dword [esi + 0x420], ecx
add esp, 0xc
lea ecx, [ebp + 0xc]
mov dword [esi + 0x424], edx
mov dword [esi + 0x428], eax
call fcn.00405390
push eax
lea edx, [esi + 0x214]
push 0x104
push edx
call fcn.00532f33
add esp, 0xc
push ebx
mov ecx, esi
call fcn.00406070
test eax, eax
je 0x406532
mov ecx, esi
call fcn.00406030
mov dword [ebp - 0x10], eax
mov eax, dword [esi]
test eax, eax
je 0x40654c
push 0xffffffffffffffff
push eax
call edi
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi], 0
mov eax, dword [esi + 4]
test eax, eax
je 0x406569
push 0xffffffffffffffff
push eax
call edi
mov ecx, dword [esi + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 4], 0
mov eax, dword [esi + 8]
test eax, eax
je 0x406586
push 0xffffffffffffffff
push eax
call edi
mov edx, dword [esi + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 8], 0
push 0xffffffffffffffff
push 0
mov ecx, ebx
call fcn.00440903
mov eax, dword [ebx]
mov edx, dword [eax + 4]
push 1
mov ecx, ebx
call edx
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4065bf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4065e5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [ebp - 4], 0
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40661f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov dword [ebp - 4], edx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406641
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc