Function at 0x4068e0
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 0x114
push ebx
push ebp
mov ebp, dword [esp + 0x120]
push esi
push edi
cmp dword [ebp], 2
jne 0x406a01
mov eax, dword [esp + 0x130]
xor cx, cx
xor ebx, ebx
mov cl, al
mov word [esp + 0x14], bx
mov word [esp + 0x16], cx
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x12c]
mov byte [esp + 0x10], 0x40
mov byte [esp + 0x11], bl
mov word [esp + 0x12], bx
mov edx, dword [esp + 0x10]
mov dword [esp + 0x20], ecx
mov ecx, eax
mov dword [esp + 0x1c], edx
mov edx, ecx
lea edi, [esp + 0x24]
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add eax, 8
and ecx, 3
lea edx, [esp + 0x20]
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x13c]
mov edi, dword [esp + 0x138]
push esi
mov dword [esp + 0x20], ebx
mov ecx, dword [esi]
push ecx
push edi
push eax
mov eax, dword [ebp + 4]
push edx
push 0x220028
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x406b00
mov edx, dword [esp + 0x12c]
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x14]
push edx
mov edx, dword [ebp + 4]
push eax
push ecx
push edx
call fcn.00407560
add esp, 0x14
test eax, eax
jne 0x4069b9
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x114
ret
mov edx, dword [ebp + 4]
mov word [esp + 0x14], bx
mov word [esp + 0x16], 0xff
mov eax, dword [esp + 0x14]
mov byte [esp + 0x10], 0xc0
mov byte [esp + 0x11], bl
mov word [esp + 0x12], bx
mov ecx, dword [esp + 0x10]
push esi
push edi
push eax
push ecx
push edx
call fcn.004075f0
add esp, 0x14
test eax, eax
jne 0x406b00
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x114
ret
movzx ax, byte [esp + 0x130]
mov word [esp + 0x16], ax
mov eax, dword [0x43d6d4]
xor ebx, ebx
mov byte [esp + 0x10], 0x40
cmp eax, ebx
mov dword [esp + 0x18], ebx
mov byte [esp + 0x11], bl
mov word [esp + 0x14], bx
mov word [esp + 0x12], bx
jne 0x406a55
push 0x43a070
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
cmp eax, ebx
mov dword [0x43d6d4], eax
jne 0x406a55
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x114
ret
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, ebx
je 0x406a77
cmp eax, 0x80
je 0x406a77
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x114
ret
mov edx, dword [esp + 0x12c]
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x14]
push edx
mov edx, dword [ebp + 4]
push eax
push ecx
push edx
call fcn.00407690
add esp, 0x14
test eax, eax
jne 0x406ab8
mov eax, dword [0x43d6d4]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x114
ret
mov ecx, dword [esp + 0x138]
mov edx, dword [esp + 0x134]
mov eax, dword [ebp + 4]
push ecx
push edx
push eax
call fcn.004077a0
add esp, 0xc
test eax, eax
jne 0x406af3
mov ecx, dword [0x43d6d4]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x114
ret
mov edx, dword [0x43d6d4]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x114
ret