Function at 0x4f88f0
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 0xc], ebx
mov ebx, eax
mov dword [ebp - 8], edi
cmp ebx, 0xfffffffb
mov dword [ebp - 4], esi
mov esi, edx
je 0x4f8fe3
cmp ebx, 0xfffffffa
jle 0x4f891a
lea edx, [ebx + 5]
mov eax, edx
mov ecx, edx
jmp 0x4f8920
mov edx, ebx
mov eax, ebx
mov ecx, ebx
test edx, edx
jl 0x4f8c14
cmp edx, 0x68
jg 0x4f8c14
lea edi, [edx*4]
shl edx, 5
sub edx, edi
mov edi, dword [edx + 0x57d0d8]
test edi, edi
mov dword [ebp - 0x18], edi
je 0x4f8950
cmp dword [edi + 0x18], 0
je 0x4f896d
mov dword [ebp - 0x10], ecx
push 0
push ebx
call fcn.00500590
add esp, 8
xor eax, eax
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
test esi, esi
mov ebx, dword [edi + 0x64]
mov dword [ebp - 0x14], ebx
mov dword [edi + 0x64], 0
je 0x4f8a9c
mov dword [ebp - 0x10], ecx
mov ecx, edi
test byte [ecx + 0x169], 0x18
jne 0x4f89fe
xor ecx, ecx
mov dword [edx + 0x57d0d8], ecx
mov dword [edx + 0x57d0cc], ecx
mov dword [edx + 0x57d0c8], 0xffffffff
lea edx, [eax*4]
shl eax, 5
sub eax, edx
cmp dword [0x577aa0], 2
jge 0x4f89c9
mov dword [eax + 0x57d0c4], 0
jmp 0x4f89ee
mov edx, dword [ebp - 0x10]
mov dword [eax + 0x57d0c4], 0
lea eax, [edx*4]
shl edx, 5
sub edx, eax
push dword [edx + 0x57d0c0]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [ebp - 0x18]
call fcn.004f1e90
add esp, 4
jmp 0x4f8bf5
mov eax, ecx
push 0x180
push 0
push eax
mov ebx, dword [eax + 0x100]
call fcn.0053bad0
add esp, 0xc
mov edx, edi
movzx eax, byte [edx + 0x169]
and eax, 0xffffffe7
or eax, 8
or byte [edx + 0x172], 4
mov byte [edx + 0x169], al
mov dword [edx + 0x100], ebx
mov edx, dword [ebp - 0x10]
mov eax, edx
shl eax, 5
lea ecx, [edx*4]
sub eax, ecx
cmp dword [0x577aa0], 2
mov dword [eax + 0x57d0cc], 0
mov dword [eax + 0x57d0c8], 0xffffffff
jge 0x4f8a75
mov dword [eax + 0x57d0c4], 0
jmp 0x4f8bf5
mov dword [eax + 0x57d0c4], 0
lea eax, [edx*4]
shl edx, 5
sub edx, eax
push dword [edx + 0x57d0c0]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x4f8bf5
mov esi, edi
movzx ebx, byte [esi + 0x173]
test bl, 1
mov dword [ebp - 0x18], ebx
je 0x4f8ad9
movzx edi, byte [esi + 0x16b]
mov ebx, edi
shr edi, 6
and ebx, 0xffffffdf
and edi, 1
shl edi, 5
or ebx, edi
mov byte [esi + 0x16b], bl
mov ebx, dword [ebp - 0x18]
and ebx, 0xfffffffe
mov dword [ebp - 0x18], ebx
mov byte [esi + 0x173], bl
test byte [ebp - 0x18], 2
je 0x4f8afb
movzx ebx, byte [esi + 0x162]
mov byte [esi + 0x161], bl
mov ebx, dword [ebp - 0x18]
and ebx, 0xfffffffd
mov dword [ebp - 0x18], ebx
mov byte [esi + 0x173], bl
test byte [ebp - 0x18], 4
je 0x4f8b1d
movzx ebx, byte [esi + 0x15a]
mov byte [esi + 0x159], bl
mov ebx, dword [ebp - 0x18]
and ebx, 0xfffffffb
mov dword [ebp - 0x18], ebx
mov byte [esi + 0x173], bl
test byte [ebp - 0x18], 8
je 0x4f8b4e
movzx edi, byte [esi + 0x16e]
mov ebx, edi
shr edi, 2
and ebx, 0xfffffffd
and edi, 1
add edi, edi
or ebx, edi
mov byte [esi + 0x16e], bl
mov ebx, dword [ebp - 0x18]
and ebx, 0xfffffff7
mov dword [ebp - 0x18], ebx
mov byte [esi + 0x173], bl
test byte [ebp - 0x18], 0x10
je 0x4f8b70
movzx ebx, byte [esi + 0x160]
mov byte [esi + 0x15f], bl
mov ebx, dword [ebp - 0x18]
and ebx, 0xffffffef
mov dword [ebp - 0x18], ebx
mov byte [esi + 0x173], bl
test byte [ebp - 0x18], 0x20
je 0x4f8b8f
movzx ebx, byte [esi + 0x164]
mov byte [esi + 0x163], bl
mov ebx, dword [ebp - 0x18]
and ebx, 0xffffffdf
mov byte [esi + 0x173], bl
mov dword [edx + 0x57d0cc], 0
mov dword [edx + 0x57d0c8], 0xffffffff
cmp dword [0x577aa0], 2
jge 0x4f8bc4
lea edx, [eax*4]
shl eax, 5
sub eax, edx
mov dword [eax + 0x57d0c4], 0
jmp 0x4f8bf5
mov dword [ebp - 0x10], ecx
lea edx, [eax*4]
shl eax, 5
sub eax, edx
mov dword [eax + 0x57d0c4], 0
lea eax, [ecx*4]
shl ecx, 5
sub ecx, eax
push dword [ecx + 0x57d0c0]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
cmp dword [ebp - 0x14], 0
je 0x4f8c05
mov eax, dword [ebp - 0x14]
mov dword [eax + 4], 0
xor eax, eax
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
cmp ebx, 0xfffffffa
lea ecx, [ebx + 5]
jg 0x4f8c1e
mov ecx, ebx
mov eax, 0xfb93e673
mul ecx
shr edx, 9
imul edi, edx, 0x209
sub ecx, edi
mov edx, dword [0x577aa0]
cmp edx, 2
lea eax, [ecx + 0x69]
mov dword [ebp - 0x10], eax
jge 0x4f8c6e
lea edi, [ecx*4 + 0x1a4]
lea ecx, [edi*8]
sub ecx, edi
mov edi, dword [ecx + 0x57d0c4]
test edi, edi
jne 0x4f8d08
mov dword [ecx + 0x57d0c4], 1
jmp 0x4f8d08
lea eax, [ecx*4 + 0x1a4]
lea edx, [eax*8]
sub edx, eax
lea ecx, [edx + 0x57d0c4]
push ecx
call fcn.004d87b0
add esp, 4
test eax, eax
jne 0x4f8cff
mov edx, dword [ebp - 0x10]
mov ecx, edx
shl ecx, 5
lea eax, [edx*4]
sub ecx, eax
cmp dword [ecx + 0x57d0c0], 0
je 0x4f8fb2
mov ecx, edx
lea eax, [edx*4]
shl ecx, 5
sub ecx, eax
mov dword [ecx + 0x57d0c4], 0
push 0xffffffffffffffff
lea eax, [edx*4]
shl edx, 5
sub edx, eax
push dword [edx + 0x57d0c0]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [ebp - 0x10]
lea eax, [edx*4]
shl edx, 5
sub edx, eax
lea ecx, [edx + 0x57d0c4]
push ecx
call fcn.004d87b0
add esp, 4
mov edx, dword [0x577aa0]
mov eax, dword [ebp - 0x10]
cmp edx, 1
je 0x4f8f89
lea ecx, [eax*4]
shl eax, 5
sub eax, ecx
mov edi, dword [eax + 0x57d0d8]
test edi, edi
je 0x4f8d3e
xor ecx, ecx
cmp ebx, dword [edi + 0x100]
jbe 0x4f8dbe
mov ecx, edi
mov edi, dword [edi + 0x28]
test edi, edi
jne 0x4f8d29
cmp edx, 1
je 0x4f8d93
cmp edx, 2
jge 0x4f8d54
mov dword [eax + 0x57d0c4], 0
jmp 0x4f8d79
mov edx, dword [ebp - 0x10]
mov dword [eax + 0x57d0c4], 0
lea eax, [edx*4]
shl edx, 5
sub edx, eax
push dword [edx + 0x57d0c0]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push 0
push ebx
call fcn.00500590
add esp, 8
xor eax, eax
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
push dword [eax + 0x57d0d4]
push dword [eax + 0x57d0d0]
call fcn.004d8790
add esp, 8
mov eax, dword [ebp - 0x10]
mov edx, dword [0x577aa0]
lea ecx, [eax*4]
shl eax, 5
sub eax, ecx
jmp 0x4f8d43
jne 0x4f8d3e
test esi, esi
je 0x4f8dd6
test ecx, ecx
je 0x4f8f4d
mov ebx, dword [edi + 0x28]
mov dword [ecx + 0x28], ebx
cmp edx, 1
je 0x4f8f5b
cmp edx, 2
jge 0x4f8df0
mov dword [eax + 0x57d0c4], 0
jmp 0x4f8e15
mov edx, dword [ebp - 0x10]
mov dword [eax + 0x57d0c4], 0
lea eax, [edx*4]
shl edx, 5
sub edx, eax
push dword [edx + 0x57d0c0]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [edi + 0x64]
mov dword [ebp - 0x14], eax
movzx eax, byte [edi + 0x173]
test al, 1
mov dword [edi + 0x64], 0
je 0x4f8e53
movzx ecx, byte [edi + 0x16b]
mov edx, ecx
shr ecx, 6
and edx, 0xffffffdf
and ecx, 1
and eax, 0xfffffffe
shl ecx, 5
or edx, ecx
mov byte [edi + 0x16b], dl
mov byte [edi + 0x173], al
test al, 2
je 0x4f8e6d
movzx edx, byte [edi + 0x162]
and eax, 0xfffffffd
mov byte [edi + 0x161], dl
mov byte [edi + 0x173], al
test al, 4
je 0x4f8e87
movzx edx, byte [edi + 0x15a]
and eax, 0xfffffffb
mov byte [edi + 0x159], dl
mov byte [edi + 0x173], al
test al, 8
je 0x4f8eb0
movzx ecx, byte [edi + 0x16e]
mov edx, ecx
shr ecx, 2
and edx, 0xfffffffd
and ecx, 1
and eax, 0xfffffff7
add ecx, ecx
or edx, ecx
mov byte [edi + 0x16e], dl
mov byte [edi + 0x173], al
test al, 0x10
je 0x4f8eca
movzx edx, byte [edi + 0x160]
and eax, 0xffffffef
mov byte [edi + 0x15f], dl
mov byte [edi + 0x173], al
test al, 0x20
je 0x4f8ee4
movzx edx, byte [edi + 0x164]
and eax, 0xffffffdf
mov byte [edi + 0x163], dl
mov byte [edi + 0x173], al
mov dword [edi + 0xc], 0
mov dword [edi + 8], 0xffffffff
cmp dword [0x577aa0], 2
jge 0x4f8f04
mov dword [edi + 4], 0
jmp 0x4f8f13
mov dword [edi + 4], 0
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test esi, esi
je 0x4f8bf5
cmp dword [0x577aa0], 2
jl 0x4f8f31
mov eax, dword [edi]
test eax, eax
je 0x4f8f31
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
mov dword [edi + 8], 0xffffffff
mov dword [edi + 0xc], 0
call fcn.004f1e90
add esp, 4
jmp 0x4f8bf5
mov ecx, dword [edi + 0x28]
mov dword [eax + 0x57d0d8], ecx
jmp 0x4f8dd6
push dword [eax + 0x57d0d4]
push dword [eax + 0x57d0d0]
call fcn.004d8790
add esp, 8
mov eax, dword [ebp - 0x10]
mov edx, dword [0x577aa0]
lea ecx, [eax*4]
shl eax, 5
sub eax, ecx
jmp 0x4f8ddf
lea edx, [eax*4]
shl eax, 5
sub eax, edx
lea eax, [eax + 0x57d0d0]
push eax
call fcn.004d8760
add esp, 4
mov edx, dword [0x577aa0]
mov eax, dword [ebp - 0x10]
jmp 0x4f8d11
xor eax, eax
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edx, dword [ebp - 0x10]
mov edi, edx
shl edi, 5
lea ecx, [edx*4]
sub edi, ecx
mov dword [edi + 0x57d0c0], eax
mov dword [edi + 0x57d0c4], 0
jmp 0x4f8cc7
mov eax, dword [0x577aa0]
cmp eax, 2
jge 0x4f9000
cmp eax, 1
je 0x4f9069
mov dword [ebp - 0x18], 0x577a00
mov edx, 0x577a00
jmp 0x4f9013
lea eax, [ebp - 0x18]
push eax
call fcn.004d8520
add esp, 4
test eax, eax
jne 0x4f905f
mov edx, dword [ebp - 0x18]
mov ebx, dword [edx]
test ebx, ebx
je 0x4f9091
mov eax, dword [ebx + 0x28]
mov dword [edx], eax
mov eax, dword [ebx + 0x58]
mov edx, dword [ebx + 0x64]
mov dword [ebx + 0x64], 0
mov dword [ebp - 0x14], edx
test byte [eax + 0x4f], 2
je 0x4f9042
push dword [eax + 4]
call fcn.004f1e90
add esp, 4
mov eax, dword [ebx + 0x58]
push eax
call fcn.004f1e90
push ebx
call fcn.004f1e90
add esp, 8
cmp dword [0x577aa0], 1
je 0x4f907b
jmp 0x4f8bf5
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
push 0x577a64
call fcn.004d8760
add esp, 4
jmp 0x4f8ff2
mov eax, dword [ebp - 0x18]
push dword [eax + 0x68]
push dword [eax + 0x64]
call fcn.004d8790
add esp, 8
jmp 0x4f8bf5
cmp dword [0x577aa0], 1
je 0x4f90a6
xor eax, eax
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
push dword [edx + 0x68]
push dword [edx + 0x64]
call fcn.004d8790
add esp, 8
jmp 0x4f909a