Function at 0x40cc10
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 0x30
xor ecx, ecx
mov dword [esp + 0x1d], ecx
mov dword [esp + 0x21], ecx
mov dword [esp + 0x25], ecx
mov dword [esp + 0x29], ecx
mov word [esp + 0x2d], cx
xor eax, eax
push ebx
xor ebx, ebx
mov byte [esp + 0x33], cl
mov ecx, dword [esp + 0x4c]
cmp ecx, ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], eax
mov byte [esp + 0x20], bl
je 0x40ce18
mov eax, dword [esp + 0x50]
cmp eax, ebx
je 0x40ce18
push esi
mov dword [ecx], ebx
lea edx, [esp + 0x24]
mov dword [eax], ebx
push edx
lea eax, [esp + 0x1c]
push eax
call fcn.0040c9f0
mov ecx, dword [esp + 0x44]
add esp, 8
push ecx
push ebx
lea edx, [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
cmp esi, ebx
mov dword [esp + 0xc], esi
jne 0x40cc9e
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop esi
mov eax, 0xfffffffe
pop ebx
add esp, 0x30
ret
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40ccbd
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov eax, 0xfffffffe
pop ebx
add esp, 0x30
ret
mov eax, dword [esp + 0x4c]
mov eax, dword [eax]
push ebp
mov ebp, dword [esp + 0x48]
push edi
mov edi, dword [esp + 0x50]
mov edx, dword [edi]
sub eax, edx
mov dword [esp + 0x10], eax
jns 0x40ccdd
add eax, ebp
mov dword [esp + 0x10], eax
cmp eax, 8
ja 0x40ccfd
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop ebp
pop esi
mov eax, 1
pop ebx
add esp, 0x30
ret
mov ebx, dword [esp + 0x48]
lea ecx, [esp + 0x18]
push 8
push ecx
mov eax, ebp
call fcn.0040c8d0
mov al, byte [esp + 0x20]
add esp, 8
cmp al, 0x98
jne 0x40cdf5
cmp byte [esp + 0x19], 0x76
jne 0x40cdf5
cmp byte [esp + 0x1a], 0x43
jne 0x40cdf5
cmp byte [esp + 0x1b], 0x21
jne 0x40cdf5
mov eax, dword [esp + 0x1c]
movzx ecx, byte [esp + 0x1f]
movzx esi, al
shl esi, 8
movzx edx, ah
movzx eax, byte [esp + 0x1e]
or esi, edx
shl esi, 8
or esi, eax
mov eax, dword [esp + 0x10]
shl esi, 8
or esi, ecx
lea edx, [esi + 8]
cmp edx, eax
jle 0x40cd94
mov eax, dword [esp + 0x54]
mov ecx, dword [eax]
mov esi, dword [esp + 0x14]
push esi
mov dword [edi], ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop ebp
pop esi
mov eax, 0xfffffffb
pop ebx
add esp, 0x30
ret
push esi
call fcn.00414902
mov edx, dword [esp + 0x5c]
mov ecx, eax
add esp, 4
test ecx, ecx
mov dword [edx], ecx
je 0x40cdd4
mov eax, dword [edi]
add eax, 8
xor edx, edx
div ebp
push esi
push ecx
mov eax, ebp
call fcn.0040c8d0
mov eax, dword [edi]
lea eax, [eax + esi + 8]
xor edx, edx
div ebp
mov ecx, dword [esp + 0x64]
add esp, 8
mov dword [edi], edx
mov dword [ecx], esi
xor esi, esi
jmp 0x40cdd9
mov esi, 0xfffffffd
mov edi, dword [esp + 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop ebp
mov eax, esi
pop esi
pop ebx
add esp, 0x30
ret
mov edx, dword [esp + 0x54]
mov eax, dword [edx]
push esi
mov dword [edi], eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop ebp
pop esi
mov eax, 0xfffffffc
pop ebx
add esp, 0x30
ret
or eax, 0xffffffff
pop ebx
add esp, 0x30
ret