Function at 0x10005860
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
cmp byte [0x100eaaac], 0
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x100058f3
call fcn.10003b60
mov dword [ebp - 8], eax
mov ecx, edx
sub eax, dword [0x100eaeb8]
mov bl, 1
mov dword [ebp - 0xc], ecx
sbb ecx, dword [0x100eaebc]
cmp ecx, 1
jb 0x100058d5
ja 0x100058a7
cmp eax, 0x2a05f200
jbe 0x100058d5
push 0x100eabb8
push 0
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
test eax, eax
setne bl
test eax, eax
je 0x100058c5
push eax
call edi
mov eax, dword [ebp - 8]
mov dword [0x100eaeb8], eax
mov eax, dword [ebp - 0xc]
mov dword [0x100eaebc], eax
push 0
push dword [0x100ea98c]
call esi
test eax, eax
je 0x100058e7
test bl, bl
jne 0x100058ec
call fcn.10005ad0
cmp byte [0x100eaaac], 0
mov ebx, dword [ebp + 8]
jne 0x10005949
push 0
push dword [0x100ea988]
call esi
test eax, eax
jne 0x10005949
push 0x100eabb8
push eax
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
test eax, eax
setne cl
mov byte [ebp - 1], cl
test eax, eax
je 0x10005929
push eax
call edi
mov cl, byte [ebp - 1]
test cl, cl
je 0x10005949
mov eax, dword [0x100ea984]
test eax, eax
je 0x1000593b
cmp eax, 0xffffffff
jne 0x10005940
call fcn.100038e0
push ebx
call fcn.10005b30
add esp, 4
cmp byte [0x100eaaac], 0
je 0x10005ac4
mov eax, dword [0x100ea980]
mov esi, dword [eax + 0x38]
mov edi, dword [eax + 0x3c]
mov eax, esi
or eax, edi
je 0x100059d1
call fcn.10003b60
mov ebx, dword [0x100eaeb4]
mov ecx, eax
sub eax, dword [0x100eaeb0]
mov dword [ebp - 8], edx
sbb dword [ebp - 8], ebx
mov dword [ebp - 0xc], eax
cmp dword [ebp - 8], edi
jb 0x10005ac4
ja 0x10005996
cmp eax, esi
jb 0x10005ac4
mov eax, edi
mov ebx, esi
shld eax, ebx, 1
add ebx, ebx
mov dword [ebp - 0x10], ebx
mov ebx, dword [ebp + 8]
cmp dword [ebp - 8], eax
jb 0x100059b5
ja 0x100059c5
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x10]
ja 0x100059c5
mov ecx, dword [0x100eaeb0]
mov edx, dword [0x100eaeb4]
add ecx, esi
adc edx, edi
mov dword [0x100eaeb0], ecx
mov dword [0x100eaeb4], edx
mov ecx, dword [0x100eaf64]
mov esi, 3
lea eax, [ecx + 1]
cdq
idiv esi
mov esi, edx
cmp byte [esi + 0x100eaf5c], 0
je 0x10005a26
mov byte [esi + 0x100eaf5c], 0
lea edx, [ebp - 0x18]
mov ecx, dword [esi*4 + 0x100eaf50]
push 0x10
push 0
push edx
mov eax, dword [ecx]
push ecx
call dword [eax + 0x24]
test eax, eax
js 0x10005a20
push dword [ebp - 0x14]
mov byte [esi + 0x100eaf5f], 1
push esi
call fcn.10003bd0
add esp, 8
mov ecx, dword [0x100eaf64]
mov eax, dword [0x100eaf68]
cmp eax, 2
jge 0x10005a38
inc eax
mov dword [0x100eaf68], eax
jmp 0x10005a9a
mov edi, dword [ecx*4 + 0x100eaf50]
push ecx
call fcn.10003c10
add esp, 4
test al, al
je 0x10005a6c
mov eax, dword [edi]
push edi
call dword [eax + 0x28]
mov eax, dword [0x100eaf64]
mov byte [eax + 0x100eaf5f], 0
push dword [0x100eaf64]
call fcn.10003c60
add esp, 4
mov eax, dword [ebx]
push 0
push edi
push 0
push 0
push dword [ebp + 0xc]
push ebx
call dword [eax + 0x70]
test eax, eax
jns 0x10005a8e
push eax
push str.d3d8_shmem_capture:_CopyRects_failed
call fcn.100037f0
add esp, 8
mov eax, dword [0x100eaf64]
mov byte [eax + 0x100eaf5c], 1
push dword [0x100ea994]
mov dword [0x100eaf64], esi
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x10005ac4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.d3d8_capture:_Failed_to_signal_frame_ready:__d
call fcn.10003740
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret