Function at 0x49c6e0
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 0x49c801
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 0x49c900
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.004a2380
add esp, 0x14
test eax, eax
jne 0x49c7b9
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.004a2410
add esp, 0x14
test eax, eax
jne 0x49c900
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 [0x507de8]
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 0x49c855
push 0x4e7da0
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
cmp eax, ebx
mov dword [0x507de8], eax
jne 0x49c855
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 0x49c877
cmp eax, 0x80
je 0x49c877
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.004a24b0
add esp, 0x14
test eax, eax
jne 0x49c8b8
mov eax, dword [0x507de8]
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.004a25c0
add esp, 0xc
test eax, eax
jne 0x49c8f3
mov ecx, dword [0x507de8]
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 [0x507de8]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x114
ret