Function at 0x53a2f0
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, dword fs:[0x18]
sub esp, 0x30
mov edi, dword [sym.imp.kernel32.dll_OpenMutexA]
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [esp + 8], str.WineTestMutex
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [ebp - 0x18], edi
call edi
sub esp, 0xc
mov esi, eax
mov eax, 0xf2
call fcn.00537ed0
xor eax, eax
test esi, esi
mov dword [esp + 4], str.OpenMutex_succeeded_n
sete al
mov dword [esp], eax
call fcn.00538680
mov eax, 0xf3
call fcn.00537ed0
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], 0x5f613c
mov dword [esp + 8], eax
xor eax, eax
cmp dword [ebx + 0x34], 2
sete al
mov dword [esp], eax
call fcn.00538680
mov eax, dword [sym.imp.kernel32.dll_CreateMutexA]
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [esp + 8], str.WineTestMutex
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [ebp - 0x2c], eax
call eax
sub esp, 0xc
mov esi, eax
mov dword [ebp - 0x14], eax
mov eax, 0xf7
call fcn.00537ed0
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.CreateMutex_failed_with_error__ld_n
mov dword [esp + 8], eax
xor eax, eax
test esi, esi
setne al
mov dword [esp], eax
call fcn.00538680
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [esp + 8], str.WineTestMutex
mov dword [esp + 4], 0
mov dword [esp], 0
call edi
mov esi, dword [0x8f0770]
sub esp, 0xc
mov ebx, eax
call fcn.0057d110
mov ecx, dword [eax + 0x10]
mov dword [eax + 0x14], 1
lea edx, [ecx + ecx]
xor ecx, ecx
test esi, esi
setne cl
or edx, ecx
mov dword [eax + 0x10], edx
jmp 0x53a451
call fcn.0057d110
mov dword [eax], 0x5f5ef4
mov dword [eax + 4], 0xfc
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 4], str.OpenMutex_succeeded_n
mov dword [esp], eax
call fcn.00538680
call fcn.0057d110
shr dword [eax + 0x10], 1
call fcn.0057d110
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x53a420
mov ebx, dword [0x8f0770]
call fcn.0057d110
mov ecx, dword [eax + 0x10]
mov dword [eax + 0x14], 1
lea edx, [ecx + ecx]
xor ecx, ecx
test ebx, ebx
setne cl
or edx, ecx
mov dword [eax + 0x10], edx
mov ebx, dword fs:[0x18]
jmp 0x53a4d2
call fcn.0057d110
mov dword [eax], 0x5f5ef4
mov dword [eax + 4], 0xfe
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], 0x5f613c
mov dword [esp + 8], eax
xor eax, eax
cmp dword [ebx + 0x34], 5
sete al
mov dword [esp], eax
call fcn.00538680
call fcn.0057d110
shr dword [eax + 0x10], 1
call fcn.0057d110
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x53a498
mov dword [ebp - 0x10], edx
mov edx, dword fs:[0x18]
mov dword [edx + 0x34], 0xdeadbeef
mov dword [ebp - 0x1c], edx
mov dword [esp + 8], str.WineTestMutex
mov dword [esp + 4], 0
mov dword [esp], 0x20000000
mov eax, dword [ebp - 0x18]
call eax
sub esp, 0xc
mov esi, eax
mov eax, 0x102
call fcn.00537ed0
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 0x34]
mov dword [esp + 4], str.OpenMutex_failed_with_error__ld_n
mov dword [esp + 8], eax
xor eax, eax
test esi, esi
setne al
mov dword [esp], eax
call fcn.00538680
mov dword [esp], esi
mov ebx, dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov dword [esp + 4], 0xffffffff
call ebx
sub esp, 8
mov edi, eax
mov eax, 0x104
call fcn.00537ed0
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 0x34]
mov dword [esp + 4], str.WaitForSingleObject_failed_with_error__ld_n
mov dword [esp + 8], eax
xor eax, eax
test edi, edi
sete al
mov dword [esp], eax
call fcn.00538680
mov eax, dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [esp], esi
mov esi, 0x1f
mov dword [ebp - 0x24], eax
call eax
sub esp, 4
lea esi, [esi]
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call ebx
sub esp, 8
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x5f5ef4
mov dword [eax + 4], 0x10a
xor eax, eax
test edi, edi
sete al
mov dword [esp + 8], edi
mov dword [esp + 4], str.WaitForSingleObject_failed_with_error_0x_08lx_n
mov dword [esp], eax
call fcn.00538680
sub esi, 1
jne 0x53a5a0
mov dword [ebp - 0x28], esi
mov esi, dword fs:[0x18]
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 8], str.WineTestMutex
mov dword [esp + 4], 0
mov dword [esp], 0xc0000000
mov eax, dword [ebp - 0x18]
call eax
sub esp, 0xc
mov edi, eax
mov eax, 0x10f
call fcn.00537ed0
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.OpenMutex_failed_with_error__ld_n
mov dword [esp + 8], eax
xor eax, eax
test edi, edi
setne al
mov dword [esp], eax
call fcn.00538680
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call ebx
sub esp, 8
mov ebx, eax
mov eax, 0x111
call fcn.00537ed0
xor eax, eax
cmp ebx, 0xffffffff
mov dword [esp + 4], str.WaitForSingleObject_succeeded_n
sete al
mov dword [esp], eax
call fcn.00538680
mov dword [esp], edi
mov eax, dword [ebp - 0x24]
call eax
sub esp, 4
jmp 0x53a6ef
mov dword [edi + 0x34], 0xdeadbeef
mov dword [esp], eax
mov dword [ebp - 0x20], eax
call dword [sym.imp.kernel32.dll_ReleaseMutex]
sub esp, 4
mov dword [ebp - 0x1c], eax
call fcn.0057d110
mov dword [eax], 0x5f5ef4
mov dword [eax + 4], 0x11c
mov dword [esp + 0xc], ebx
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.ReleaseMutex_failed_with_error__ld__access__x_n
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x1c]
mov dword [esp], ecx
call fcn.00538680
mov edx, dword [ebp - 0x20]
mov dword [esp], edx
mov eax, dword [ebp - 0x24]
call eax
add dword [ebp - 0x10], 1
mov eax, dword [ebp - 0x10]
sub esp, 4
cmp eax, 0x20
je 0x53a7db
movzx ecx, byte [ebp - 0x10]
mov ebx, 1
mov edi, dword fs:[0x18]
shl ebx, cl
mov dword [edi + 0x34], 0xdeadbeef
mov dword [esp + 8], str.WineTestMutex
mov dword [esp + 4], 0
mov dword [esp], ebx
mov eax, dword [ebp - 0x18]
call eax
sub esp, 0xc
test eax, eax
jne 0x53a688
mov ecx, dword [0x8f0770]
xor eax, eax
test ecx, ecx
setne al
cmp dword [ebp - 0x10], 0x18
mov dword [ebp - 0x1c], eax
je 0x53ab90
call fcn.0057d110
mov ecx, dword [eax + 0x10]
mov dword [eax + 0x14], 1
lea edx, [ecx + ecx]
mov ecx, dword [ebp - 0x1c]
or edx, ecx
mov dword [eax + 0x10], edx
jmp 0x53a7a6
call fcn.0057d110
mov dword [eax], 0x5f5ef4
mov dword [eax + 4], 0x124
mov dword [esp + 0xc], ebx
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.wrong_error__lu____access__x_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [esi + 0x34], 5
sete al
mov dword [esp], eax
call fcn.00538680
call fcn.0057d110
shr dword [eax + 0x10], 1
call fcn.0057d110
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x53a768
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ReleaseMutex]
add dword [ebp - 0x10], 1
mov eax, dword [ebp - 0x10]
or dword [ebp - 0x28], ebx
sub esp, 4
cmp eax, 0x20
jne 0x53a6ef
mov ebx, dword [0x8f0770]
call fcn.0057d110
mov esi, dword [ebp - 0x28]
mov ecx, dword [eax + 0x10]
mov dword [eax + 0x14], 1
lea edx, [ecx + ecx]
xor ecx, ecx
test ebx, ebx
setne cl
or edx, ecx
mov dword [eax + 0x10], edx
jmp 0x53a841
call fcn.0057d110
mov dword [eax], 0x5f5ef4
mov dword [eax + 4], 0x12b
xor eax, eax
cmp esi, 0xde0fffe
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.open_succeeded_when_it_shouldnt:__lx_n
call fcn.00538680
call fcn.0057d110
shr dword [eax + 0x10], 1
call fcn.0057d110
mov ebx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test ebx, ebx
jne 0x53a808
mov eax, dword [ebp - 0x14]
mov esi, dword fs:[0x18]
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ReleaseMutex]
sub esp, 4
mov edi, eax
mov eax, 0x12f
call fcn.00537ed0
mov eax, dword [esi + 0x34]
test edi, edi
jne 0x53a88e
xor ebx, ebx
cmp eax, 0x120
sete bl
mov dword [esp], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], str.ReleaseMutex_should_have_failed_with_ERROR_NOT_OWNER_instead_of__ld_n
mov esi, dword fs:[0x18]
call fcn.00538680
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 8], str.WINETESTMUTEX
mov dword [esp + 4], 0
mov dword [esp], 0x20000
mov edi, dword [ebp - 0x18]
call edi
sub esp, 0xc
mov ebx, eax
mov eax, 0x136
call fcn.00537ed0
xor eax, eax
test ebx, ebx
mov dword [esp + 4], str.OpenMutex_succeeded_n
sete al
mov dword [esp], eax
call fcn.00538680
mov eax, 0x137
call fcn.00537ed0
mov eax, dword [esi + 0x34]
mov dword [esp + 4], 0x5f613c
mov dword [esp + 8], eax
xor eax, eax
cmp dword [esi + 0x34], 2
sete al
mov dword [esp], eax
call fcn.00538680
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 8], str.winetestmutex
mov dword [esp + 4], 0
mov dword [esp], 0x20000
call edi
sub esp, 0xc
mov ebx, eax
mov eax, 0x13b
call fcn.00537ed0
xor eax, eax
test ebx, ebx
mov dword [esp + 4], str.OpenMutex_succeeded_n
sete al
mov dword [esp], eax
call fcn.00538680
mov eax, 0x13c
call fcn.00537ed0
mov eax, dword [esi + 0x34]
mov dword [esp + 4], 0x5f613c
mov dword [esp + 8], eax
xor eax, eax
cmp dword [esi + 0x34], 2
sete al
mov dword [esp], eax
call fcn.00538680
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0x20000
call edi
sub esp, 0xc
mov ebx, eax
mov eax, 0x140
call fcn.00537ed0
xor eax, eax
test ebx, ebx
mov dword [esp + 4], str.OpenMutex_succeeded_n
sete al
mov dword [esp], eax
call fcn.00538680
mov eax, 0x141
call fcn.00537ed0
mov eax, dword [esi + 0x34]
mov dword [esp + 4], 0x5f613c
mov dword [esp + 8], eax
xor eax, eax
cmp dword [esi + 0x34], 0x57
sete al
mov dword [esp], eax
call fcn.00538680
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0x20000
call dword [sym.imp.kernel32.dll_OpenMutexW]
sub esp, 0xc
mov ebx, eax
mov eax, 0x145
call fcn.00537ed0
xor eax, eax
test ebx, ebx
mov dword [esp + 4], str.OpenMutex_succeeded_n
sete al
mov dword [esp], eax
call fcn.00538680
mov eax, 0x146
call fcn.00537ed0
mov eax, dword [esi + 0x34]
mov dword [esp + 4], 0x5f613c
mov dword [esp + 8], eax
xor eax, eax
cmp dword [esi + 0x34], 0x57
sete al
mov dword [esp], eax
call fcn.00538680
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 8], str.WineTestMutex
mov dword [esp + 4], 0
mov dword [esp], 0
mov eax, dword [ebp - 0x2c]
call eax
sub esp, 0xc
mov ebx, eax
mov eax, 0x14a
call fcn.00537ed0
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.CreateMutex_failed_with_error__ld_n
mov dword [esp + 8], eax
xor eax, eax
test ebx, ebx
setne al
mov dword [esp], eax
call fcn.00538680
mov eax, 0x14b
call fcn.00537ed0
mov eax, dword [esi + 0x34]
mov dword [esp + 4], 0x5f613c
mov dword [esp + 8], eax
xor eax, eax
cmp dword [esi + 0x34], 0xb7
sete al
mov dword [esp], eax
call fcn.00538680
mov dword [esp], ebx
mov edi, dword [ebp - 0x24]
call edi
mov dword [esi + 0x34], 0xdeadbeef
sub esp, 4
mov dword [esp + 8], str.WINETESTMUTEX
mov dword [esp + 4], 0
mov dword [esp], 0
mov eax, dword [ebp - 0x2c]
call eax
sub esp, 0xc
mov ebx, eax
mov eax, 0x150
call fcn.00537ed0
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.CreateMutex_failed_with_error__ld_n
mov dword [esp + 8], eax
xor eax, eax
test ebx, ebx
setne al
mov dword [esp], eax
call fcn.00538680
mov eax, 0x151
call fcn.00537ed0
mov eax, dword [esi + 0x34]
mov dword [esp + 4], 0x5f613c
mov dword [esp + 8], eax
mov edx, dword [esi + 0x34]
xor eax, eax
test edx, edx
sete al
mov dword [esp], eax
call fcn.00538680
mov dword [esp], ebx
call edi
mov eax, dword [ebp - 0x14]
sub esp, 4
mov dword [esp], eax
call edi
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.0057d110
mov edx, dword [ebp - 0x1c]
mov ecx, dword [eax + 0x10]
mov dword [eax + 0x14], 1
add ecx, ecx
or ecx, edx
mov dword [eax + 0x10], ecx
jmp 0x53abf5
call fcn.0057d110
mov dword [eax], 0x5f5ef4
mov dword [eax + 4], 0x122
mov dword [esp + 0xc], 0x1000000
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.wrong_error__lu__access__x_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [edi + 0x34], 0x522
sete al
mov dword [esp], eax
call fcn.00538680
call fcn.0057d110
shr dword [eax + 0x10], 1
call fcn.0057d110
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x53abb0
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ReleaseMutex]
or dword [ebp - 0x28], ebx
mov dword [ebp - 0x10], 0x19
sub esp, 4
jmp 0x53a6ef