Function at 0x40d674
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x465c14]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x10], eax
xor eax, eax
push ebx
push esi
push edi
lea edi, [ebp - 0x28]
mov edx, dword [ebp + 0x1c]
stosd dword es:[edi], eax
mov ecx, dword [ebp + 0x20]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x18], edx
stosd dword es:[edi], eax
mov dword [ebp - 0x1c], ecx
stosd dword es:[edi], eax
xor eax, eax
lea edi, [ebp - 0x3c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
test edx, edx
je 0x40d818
test ecx, ecx
je 0x40d818
lea eax, [ebp - 0x3c]
xor ebx, ebx
push eax
lea eax, [ebp - 0x28]
mov dword [edx], ebx
push eax
mov dword [ecx], ebx
call fcn.00407889
pop ecx
pop ecx
push esi
push ebx
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
test esi, esi
jne 0x40d6f9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xfffffffffffffffe
pop eax
jmp 0x40d81b
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40d70d
push 0xfffffffffffffffe
jmp 0x40d80c
mov ebx, dword [ebp + 0x18]
mov edi, dword [ebp - 0x10]
mov ebx, dword [ebx]
sub ebx, dword [edi]
jns 0x40d71c
add ebx, dword [ebp + 0x10]
cmp ebx, 8
ja 0x40d730
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
xor edi, edi
inc edi
jmp 0x40d80d
push dword [edi]
lea eax, [ebp - 0xc]
push dword [ebp + 0x10]
push dword [ebp - 0x14]
push 8
push eax
call fcn.0040d5a8
add esp, 0x14
cmp byte [ebp - 0xc], 0x98
jne 0x40d7fc
cmp byte [ebp - 0xb], 0x76
jne 0x40d7fc
cmp byte [ebp - 0xa], 0x43
jne 0x40d7fc
cmp byte [ebp - 9], 0x21
jne 0x40d7fc
movzx edi, byte [ebp - 8]
movzx eax, byte [ebp - 7]
shl edi, 8
or edi, eax
movzx eax, byte [ebp - 6]
shl edi, 8
or edi, eax
movzx eax, byte [ebp - 5]
shl edi, 8
or edi, eax
lea eax, [edi + 8]
cmp eax, ebx
jle 0x40d7a9
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x10]
push esi
mov eax, dword [eax]
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push 0xfffffffffffffffb
jmp 0x40d80c
push edi
call fcn.0042a45f
pop ecx
mov ecx, eax
mov eax, dword [ebp - 0x18]
mov dword [eax], ecx
test ecx, ecx
je 0x40d7f0
mov ebx, dword [ebp - 0x10]
xor edx, edx
mov eax, dword [ebx]
add eax, 8
div dword [ebp + 0x10]
push edx
push dword [ebp + 0x10]
push dword [ebp - 0x14]
push edi
push ecx
call fcn.0040d5a8
mov eax, dword [ebx]
xor edx, edx
add eax, 8
add esp, 0x14
add eax, edi
div dword [ebp + 0x10]
mov eax, dword [ebp - 0x1c]
mov dword [ebx], edx
mov dword [eax], edi
xor edi, edi
jmp 0x40d7f3
push 0xfffffffffffffffd
pop edi
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x40d80d
mov eax, dword [ebp + 0x18]
push esi
mov eax, dword [eax]
mov dword [edi], eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push 0xfffffffffffffffc
pop edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
jmp 0x40d81b
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042345f
leave
ret