Function at 0x10004340
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x20
cmp byte [0x10034401], 0
push esi
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], ecx
je 0x100043ef
call fcn.10007950
mov dword [esp + 0x14], eax
mov ecx, edx
sub eax, dword [0x10034c28]
mov dword [esp + 0x10], ecx
sbb ecx, dword [0x10034c2c]
mov byte [esp + 0xf], 1
cmp ecx, 1
jb 0x100043cc
ja 0x1000439a
cmp eax, 0x2a05f200
jbe 0x100043cc
push 0x10034420
push 0
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
test eax, eax
setne byte [esp + 0xf]
test eax, eax
je 0x100043ba
push eax
call edi
mov eax, dword [esp + 0x14]
mov dword [0x10034c28], eax
mov eax, dword [esp + 0x10]
mov dword [0x10034c2c], eax
push 0
push dword [0x100344a4]
call esi
test eax, eax
je 0x100043e1
cmp byte [esp + 0xf], 0
jne 0x100043e6
call fcn.10003950
cmp byte [0x10034401], 0
jne 0x1000444f
push 0
push dword [0x100344ac]
call esi
test eax, eax
jne 0x10004442
push 0x10034420
push eax
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
test eax, eax
setne cl
mov byte [esp + 0xf], cl
test eax, eax
je 0x10004422
push eax
call edi
mov cl, byte [esp + 0xf]
test cl, cl
je 0x10004442
mov eax, dword [0x100344a0]
test eax, eax
je 0x10004434
cmp eax, 0xffffffff
jne 0x10004439
call fcn.10007190
mov ecx, dword [esp + 0x18]
call fcn.100041d0
cmp byte [0x10034401], 0
je 0x100045da
mov eax, dword [0x100344a8]
mov esi, dword [eax + 0x38]
mov edi, dword [eax + 0x3c]
mov eax, esi
or eax, edi
je 0x100044d7
call fcn.10007950
mov ecx, eax
mov dword [esp + 0x10], edx
sub eax, dword [0x10034c38]
mov dword [esp + 0x14], ecx
mov ecx, dword [0x10034c3c]
sbb dword [esp + 0x10], ecx
mov dword [esp + 0x20], eax
cmp dword [esp + 0x10], edi
jb 0x100045da
ja 0x10004497
cmp eax, esi
jb 0x100045da
mov eax, edi
mov ecx, esi
shld eax, ecx, 1
add ecx, ecx
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x14]
cmp dword [esp + 0x10], eax
jb 0x100044bb
ja 0x100044cb
mov eax, dword [esp + 0x20]
cmp eax, dword [esp + 0x24]
ja 0x100044cb
mov ecx, dword [0x10034c38]
mov edx, dword [0x10034c3c]
add ecx, esi
adc edx, edi
mov dword [0x10034c38], ecx
mov dword [0x10034c3c], edx
mov ecx, dword [0x100349f4]
cmp ecx, dword [esp + 0x18]
je 0x100044ee
call fcn.10003950
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp byte [0x10034a08], 0
je 0x10004534
mov eax, dword [ecx]
push 0
push 0
push dword [0x10034a0c]
push 0
push dword [esp + 0x2c]
push ecx
call dword [eax + 0x88]
test eax, eax
jns 0x100045da
mov edx, eax
mov ecx, str.d3d9_shtex_capture:_StretchRect_failed
call fcn.100078e0
mov ecx, str.d3d9
call fcn.10007110
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [0x10034a50]
mov ecx, 3
inc eax
cdq
idiv ecx
mov edi, edx
mov ecx, edi
call fcn.100042e0
mov eax, dword [0x10034a54]
cmp eax, 2
jge 0x1000455d
inc eax
mov dword [0x10034a54], eax
jmp 0x100045d4
mov ecx, dword [0x10034a50]
mov esi, dword [ecx*4 + 0x10034a28]
call fcn.10007dd0
test al, al
je 0x10004590
mov eax, dword [esi]
push esi
call dword [eax + 0x38]
mov eax, dword [0x10034a50]
mov byte [eax + 0x10034a44], 0
mov ecx, dword [0x10034a50]
call fcn.10007e10
mov ecx, dword [0x100349f4]
push esi
push dword [esp + 0x20]
mov eax, dword [ecx]
push ecx
call dword [eax + 0x80]
test eax, eax
jns 0x100045b4
mov edx, eax
mov ecx, str.d3d9_shmem_capture:_GetRenderTargetData_failed
call fcn.100078e0
mov eax, dword [0x10034a50]
push 1
mov eax, dword [eax*4 + 0x10034a34]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov eax, dword [0x10034a50]
mov byte [eax + 0x10034a47], 1
mov dword [0x10034a50], edi
mov ecx, str.d3d9
call fcn.10007110
pop edi
pop esi
mov esp, ebp
pop ebp
ret