Function at 0x40e230
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x370
mov eax, dword [str.__wine_clipboard_]
mov dword [ebp - 0x238], eax
mov eax, dword [0x418b44]
mov dword [ebp - 0x234], eax
mov eax, dword [0x418b48]
mov dword [ebp - 0x230], eax
mov eax, dword [0x418b4c]
mov dword [ebp - 0x22c], eax
mov eax, dword [0x418b50]
mov dword [ebp - 0x228], eax
mov eax, dword [0x418b54]
mov dword [ebp - 0x224], eax
mov eax, dword [0x418b58]
mov dword [ebp - 0x220], eax
mov eax, dword [0x418b5c]
mov dword [ebp - 0x21c], eax
mov eax, dword [0x418b60]
mov dword [ebp - 0x218], eax
call dword [sym.imp.user32.dll_GetProcessWindowStation]
lea edx, [ebp - 0x216]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x208
mov dword [esp + 8], edx
mov dword [esp + 4], 2
mov dword [esp], eax
call dword [sym.imp.user32.dll_GetUserObjectInformationW]
sub esp, 0x14
test eax, eax
jne 0x40e2f0
mov edi, eax
test byte [0x4120c4], 2
jne 0x40e358
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
lea ebx, [ebp - 0x238]
mov dword [esp + 4], 1
mov edi, 1
mov dword [esp + 8], ebx
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateMutexW]
sub esp, 0xc
mov esi, eax
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0xb7
jne 0x40e2e2
test byte [0x4120c4], 8
jne 0x40e390
mov dword [esp], esi
mov edi, 1
mov dword [esp + 4], 0xffffffff
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov eax, edi
sub esp, 8
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0xc], str.failed_to_get_winstation_name_n
mov dword [esp + 8], str.wait_clipboard_mutex
mov dword [esp + 4], 0x4120c4
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, ebx
shr eax, 0x10
je 0x40e478
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, 0x41330f
test ecx, ecx
jne 0x40e48b
movzx eax, word [ebp - 0x238]
test ax, ax
je 0x40e598
nop
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x40e3d0
mov ecx, 0x224c
mov dword [ebp - 0x368], ebx
mov word [ebp - 0x364], cx
lea ecx, [ebp - 0x362]
jmp 0x40e444
cmp ax, 9
je 0x40e548
cmp ax, 0xa
jne 0x40e4de
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea edi, [edx - 1]
test edx, edx
jle 0x40e560
lea eax, [ebp - 0x242]
cmp ecx, eax
ja 0x40e560
mov eax, dword [ebp - 0x368]
mov edx, edi
movzx eax, word [eax]
add dword [ebp - 0x368], 2
cmp ax, 0xd
je 0x40e4c0
jbe 0x40e400
cmp ax, 0x22
je 0x40e530
cmp ax, 0x5c
jne 0x40e4d1
mov eax, 0x5c5c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x40e420
movzx ebx, bx
mov dword [esp], 0x413319
mov dword [esp + 4], ebx
call sym._wine_dbg_sprintf_1
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.waiting_for_mutex__s_n
mov dword [esp + 8], str.wait_clipboard_mutex
mov dword [esp + 4], 0x4120c4
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x40e331
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x40e420
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x40e590
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + 0x418b10]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + 0x418b10]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + 0x418b10]
and edi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [edi + 0x418b10]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x40e420
mov eax, 0x225c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x40e420
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x40e420
mov byte [ecx], 0x22
test edi, edi
jle 0x40e5b1
mov edi, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], di
mov byte [eax], 0
lea eax, [ebp - 0x364]
mov dword [esp], eax
call sym.___wine_dbg_strdup
jmp 0x40e48b
mov byte [ecx], al
inc ecx
jmp 0x40e420
mov ebx, 0x224c
mov byte [ebp - 0x362], 0x22
lea ecx, [ebp - 0x362]
mov word [ebp - 0x364], bx
lea eax, [ecx + 1]
jmp 0x40e577