Function at 0x100049f0
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
cmp byte [0x10033b44], 0
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x10004a83
call fcn.100022e0
mov dword [ebp - 8], eax
mov ecx, edx
sub eax, dword [0x10033e58]
mov bl, 1
mov dword [ebp - 0xc], ecx
sbb ecx, dword [0x10033e5c]
cmp ecx, 1
jb 0x10004a65
ja 0x10004a37
cmp eax, 0x2a05f200
jbe 0x10004a65
push 0x10033b48
push 0
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
test eax, eax
setne bl
test eax, eax
je 0x10004a55
push eax
call edi
mov eax, dword [ebp - 8]
mov dword [0x10033e58], eax
mov eax, dword [ebp - 0xc]
mov dword [0x10033e5c], eax
push 0
push dword [0x10033924]
call esi
test eax, eax
je 0x10004a77
test bl, bl
jne 0x10004a7c
call fcn.10004cc0
cmp byte [0x10033b44], 0
mov ebx, dword [ebp + 8]
jne 0x10004ad9
push 0
push dword [0x10033920]
call esi
test eax, eax
jne 0x10004ad9
push 0x10033b48
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 0x10004ab9
push eax
call edi
mov cl, byte [ebp - 1]
test cl, cl
je 0x10004ad9
mov eax, dword [0x1003391c]
test eax, eax
je 0x10004acb
cmp eax, 0xffffffff
jne 0x10004ad0
call fcn.100020b0
push ebx
call fcn.10004de0
add esp, 4
cmp byte [0x10033b44], 0
je 0x10004cb8
mov eax, dword [0x10033918]
mov esi, dword [eax + 0x38]
mov edi, dword [eax + 0x3c]
mov eax, esi
or eax, edi
je 0x10004b61
call fcn.100022e0
mov ebx, dword [0x10033e54]
mov ecx, eax
sub eax, dword [0x10033e50]
mov dword [ebp - 8], edx
sbb dword [ebp - 8], ebx
mov dword [ebp - 0xc], eax
cmp dword [ebp - 8], edi
jb 0x10004cb8
ja 0x10004b26
cmp eax, esi
jb 0x10004cb8
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 0x10004b45
ja 0x10004b55
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x10]
ja 0x10004b55
mov ecx, dword [0x10033e50]
mov edx, dword [0x10033e54]
add ecx, esi
adc edx, edi
mov dword [0x10033e50], ecx
mov dword [0x10033e54], edx
mov ecx, dword [0x10033de4]
cmp ecx, ebx
je 0x10004b77
call fcn.10004cc0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [0x10033df8], 0
je 0x10004bb5
mov eax, dword [ecx]
push 0
push 0
push dword [0x10033dfc]
push 0
push dword [ebp + 0xc]
push ecx
call dword [eax + 0x88]
test eax, eax
jns 0x10004cb8
push eax
push str.d3d9_shtex_capture:_StretchRect_failed
call fcn.10001fc0
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x10033e40]
mov ecx, 3
inc eax
cdq
idiv ecx
mov esi, edx
cmp byte [esi + 0x10033e37], 0
mov edi, dword [esi*4 + 0x10033e18]
je 0x10004c17
mov ecx, dword [esi*4 + 0x10033e24]
push 0
push 0
push 0
mov eax, dword [ecx]
push ecx
call dword [eax + 0x1c]
test eax, eax
jne 0x10004c17
push 0x10
push 0
mov byte [esi + 0x10033e37], al
lea ecx, [ebp - 0x18]
mov eax, dword [edi]
push ecx
push edi
call dword [eax + 0x34]
test eax, eax
js 0x10004c17
push dword [ebp - 0x14]
mov byte [esi + 0x10033e34], 1
push esi
call fcn.100023a0
add esp, 8
mov eax, dword [0x10033e44]
cmp eax, 2
jge 0x10004c34
pop edi
mov dword [0x10033e40], esi
inc eax
pop esi
mov dword [0x10033e44], eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x10033e40]
push eax
mov edi, dword [eax*4 + 0x10033e18]
call fcn.100023e0
add esp, 4
test al, al
je 0x10004c6d
mov eax, dword [edi]
push edi
call dword [eax + 0x38]
mov eax, dword [0x10033e40]
mov byte [eax + 0x10033e34], 0
push dword [0x10033e40]
call fcn.10002430
add esp, 4
mov ecx, dword [0x10033de4]
push edi
push dword [ebp + 0xc]
mov eax, dword [ecx]
push ecx
call dword [eax + 0x80]
test eax, eax
jns 0x10004c92
push eax
push str.d3d9_shmem_capture:_GetRenderTargetData_failed
call fcn.10001fc0
add esp, 8
mov eax, dword [0x10033e40]
push 1
mov eax, dword [eax*4 + 0x10033e24]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov eax, dword [0x10033e40]
mov byte [eax + 0x10033e37], 1
mov dword [0x10033e40], esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret