Function at 0x41c9c0
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [ebp - 8], esi
mov dword [ebp - 4], edi
mov esi, dword [ebp + 8]
cmp dword [ebp + 0xc], 5
jne 0x41ca21
cmp dword [0x4fdac0], 0
je 0x41cc83
push 0x4fdab8
call fcn.004080c0
add esp, 4
mov edx, dword [0x4fdac0]
xor eax, eax
cmp dword [edx + eax*4], 0xffffffff
jne 0x41cc35
inc eax
cmp eax, 0x10
jl 0x41c9f7
mov dword [0x4fdab8], 0
mov eax, 0x226
mov dword [esi], 0xffff7fff
jmp 0x41cc2b
push 0x4fdab8
call fcn.004080c0
add esp, 4
cmp dword [0x4fdabc], 0
je 0x41ca69
mov eax, dword [0x4f67a0]
cmp eax, 0xffff8000
mov dword [esi], eax
jle 0x41ca50
dec eax
mov dword [0x4f67a0], eax
jmp 0x41cc1f
mov dword [0x4f67a0], 0xffffff7f
mov dword [0x4fdabc], 0
jmp 0x41cc1f
mov edi, dword [0x4f67a0]
cmp edi, 0xffffc000
jge 0x41ca86
mov dword [0x4f67a0], 0xffffff7f
mov edi, 0xffffff7f
mov dword [ebp - 0xc], ebx
push edi
call fcn.00420710
add esp, 4
test eax, eax
je 0x41cc0f
cmp edi, 0xfffffffa
lea ecx, [edi + 5]
jg 0x41caa4
mov ecx, edi
mov eax, 0xfb93e673
mul ecx
shr edx, 9
imul ebx, edx, 0x209
sub ecx, ebx
mov edx, dword [0x4f5120]
cmp edx, 2
lea eax, [ecx + 0x69]
mov dword [ebp - 0x10], eax
jge 0x41caf4
lea ebx, [ecx*4 + 0x1a4]
lea ecx, [ebx*8]
sub ecx, ebx
mov ebx, dword [ecx + 0x4f9644]
test ebx, ebx
jne 0x41cb8e
mov dword [ecx + 0x4f9644], 1
jmp 0x41cb8e
lea eax, [ecx*4 + 0x1a4]
lea edx, [eax*8]
sub edx, eax
lea ecx, [edx + 0x4f9644]
push ecx
call fcn.004080c0
add esp, 4
test eax, eax
jne 0x41cb85
mov edx, dword [ebp - 0x10]
mov ecx, edx
shl ecx, 5
lea eax, [edx*4]
sub ecx, eax
cmp dword [ecx + 0x4f9640], 0
je 0x41cd2c
mov ecx, edx
lea eax, [edx*4]
shl ecx, 5
sub ecx, eax
mov dword [ecx + 0x4f9644], 0
push 0xffffffffffffffff
lea eax, [edx*4]
shl edx, 5
sub edx, eax
push dword [edx + 0x4f9640]
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 + 0x4f9644]
push ecx
call fcn.004080c0
add esp, 4
mov edx, dword [0x4f5120]
mov eax, dword [ebp - 0x10]
cmp edx, 1
je 0x41cd03
lea ecx, [eax*4]
shl eax, 5
sub eax, ecx
mov ebx, dword [eax + 0x4f9658]
test ebx, ebx
je 0x41cbbc
cmp edi, dword [ebx + 0x100]
jbe 0x41cbbc
mov ebx, dword [ebx + 0x28]
test ebx, ebx
jne 0x41cbad
cmp edx, 1
je 0x41ccd5
cmp edx, 2
jge 0x41cbd6
mov dword [eax + 0x4f9644], 0
jmp 0x41cbfb
mov edx, dword [ebp - 0x10]
mov dword [eax + 0x4f9644], 0
lea eax, [edx*4]
shl edx, 5
sub edx, eax
push dword [edx + 0x4f9640]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test ebx, ebx
je 0x41ccc4
cmp edi, dword [ebx + 0x100]
jne 0x41ccc4
dec edi
cmp edi, 0xffff8000
jg 0x41ca89
mov ebx, dword [ebp - 0xc]
mov dword [0x4fdab8], 0
xor eax, eax
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
mov edx, dword [edx + eax*4]
xor ecx, ecx
mov edi, edx
shl edi, cl
test edi, 0x80000000
je 0x41cc51
inc ecx
cmp ecx, 0x20
jl 0x41cc3a
jmp 0x41ca07
mov edi, eax
neg ecx
shl edi, 5
neg edi
lea edi, [edi + ecx - 1]
mov dword [esi], edi
add ecx, 0x1f
mov esi, 1
shl esi, cl
mov ecx, dword [0x4fdac0]
or edx, esi
mov dword [ecx + eax*4], edx
xor eax, eax
mov dword [0x4fdab8], 0
jmp 0x41cc2b
push 0x4fdac0
push 0
push 0x40
call fcn.004085a0
add esp, 0xc
test eax, eax
je 0x41cca9
mov esi, dword [ebp - 8]
mov dword [0x4fdab8], 0
mov esp, ebp
pop ebp
ret
mov eax, dword [0x4fdac0]
mov dword [eax], 0
mov eax, dword [0x4fdac0]
mov dword [eax], 0xf8000000
jmp 0x41c9e2
mov ebx, dword [ebp - 0xc]
mov dword [esi], edi
dec edi
mov dword [0x4f67a0], edi
jmp 0x41cc1f
push dword [eax + 0x4f9654]
push dword [eax + 0x4f9650]
call fcn.004080a0
add esp, 8
mov eax, dword [ebp - 0x10]
mov edx, dword [0x4f5120]
lea ecx, [eax*4]
shl eax, 5
sub eax, ecx
jmp 0x41cbc5
lea edx, [eax*4]
shl eax, 5
sub eax, edx
lea eax, [eax + 0x4f9650]
push eax
call fcn.00408070
add esp, 4
mov edx, dword [0x4f5120]
mov eax, dword [ebp - 0x10]
jmp 0x41cb97
xor eax, eax
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edx, dword [ebp - 0x10]
mov ebx, edx
shl ebx, 5
lea ecx, [edx*4]
sub ebx, ecx
mov dword [ebx + 0x4f9640], eax
mov dword [ebx + 0x4f9644], 0
jmp 0x41cb4d