Function at 0x49c440
Capabilities:
Check mutex on windows

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x10]
mov edx, eax
sub esp, 0x158
sub edx, 2
je 0x49c483
sub edx, 2
je 0x49c466
sub edx, 4
jne 0x49c488
mov eax, 5
jmp 0x49c488
mov eax, dword [esp + 0x164]
test eax, eax
je 0x49c47c
test ecx, ecx
jbe 0x49c47c
mov eax, 6
jmp 0x49c488
mov eax, 4
jmp 0x49c488
mov eax, 2
mov edx, dword [esp + 0x15c]
push ebx
push ebp
push esi
mov esi, dword [edx]
push edi
cmp esi, 2
jne 0x49c5ba
xor esi, esi
mov word [esp + 0x12], ax
cmp ecx, esi
mov dword [esp + 0x1c], esi
mov byte [esp + 0x10], 0x40
mov byte [esp + 0x11], 1
mov word [esp + 0x14], si
mov eax, 8
je 0x49c4c3
mov eax, ecx
mov ebp, dword [esp + 0x10]
mov esi, dword [esp + 0x174]
movzx ax, al
mov word [esp + 0x16], ax
mov ebx, dword [esp + 0x14]
mov eax, ecx
lea edi, [esp + 0x68]
shr ecx, 2
mov dword [esp + 0x60], ebp
mov dword [esp + 0x64], ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x16]
and ecx, 3
mov edx, dword [edx + 4]
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x180]
mov edi, dword [esp + 0x17c]
push 0
and eax, 0xffff
mov ecx, dword [esi]
push esi
push ecx
add eax, 8
push edi
lea ecx, [esp + 0x70]
push eax
push ecx
push 0x220028
push edx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x49c6ce
mov eax, dword [esp + 0x174]
test eax, eax
jne 0x49c542
lea eax, [esp + 0x20]
lea ecx, [esp + 0x1c]
push ecx
push eax
push ebx
mov ebx, dword [esp + 0x178]
push ebp
mov edx, dword [ebx + 4]
push edx
call fcn.004a2380
add esp, 0x14
test eax, eax
jne 0x49c56f
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x158
ret
mov edx, dword [ebx + 4]
xor eax, eax
mov word [esp + 0x14], ax
mov word [esp + 0x12], ax
mov word [esp + 0x16], 0xff
mov eax, dword [esp + 0x14]
mov byte [esp + 0x10], 0xc0
mov byte [esp + 0x11], 1
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 0x49c6ce
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x158
ret
xor edx, edx
mov byte [esp + 0x10], 0x40
cmp ecx, edx
mov dword [esp + 0x1c], edx
mov byte [esp + 0x11], 1
mov word [esp + 0x14], dx
mov word [esp + 0x12], ax
jne 0x49c5dd
mov ecx, 8
xor ax, ax
mov al, cl
mov word [esp + 0x16], ax
mov eax, dword [0x507de8]
cmp eax, edx
jne 0x49c614
push 0x4e7da0
push edx
push edx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
test eax, eax
mov dword [0x507de8], eax
jne 0x49c614
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x158
ret
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x49c636
cmp eax, 0x80
je 0x49c636
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x158
ret
mov eax, dword [esp + 0x174]
test eax, eax
jne 0x49c645
lea eax, [esp + 0x20]
mov esi, dword [esp + 0x16c]
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esi + 4]
push eax
mov eax, dword [esp + 0x18]
push edx
push eax
push ecx
call fcn.004a24b0
add esp, 0x14
test eax, eax
jne 0x49c687
mov edx, dword [0x507de8]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x158
ret
mov eax, dword [esp + 0x180]
mov ecx, dword [esp + 0x17c]
mov edx, dword [esi + 4]
push eax
push ecx
push edx
call fcn.004a25c0
add esp, 0xc
test eax, eax
jne 0x49c6c1
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, 0x158
ret
mov ecx, dword [0x507de8]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x158
ret