Function at 0x40d790
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x39c
mov eax, dword [str.__wine_clipboard_]
mov dword [ebp - 0x244], eax
mov eax, dword [0x418884]
mov dword [ebp - 0x240], eax
mov eax, dword [0x418888]
mov dword [ebp - 0x23c], eax
mov eax, dword [0x41888c]
mov dword [ebp - 0x238], eax
mov eax, dword [0x418890]
mov dword [ebp - 0x234], eax
mov eax, dword [0x418894]
mov dword [ebp - 0x230], eax
mov eax, dword [0x418898]
mov dword [ebp - 0x22c], eax
mov eax, dword [0x41889c]
mov dword [ebp - 0x228], eax
mov eax, dword [0x4188a0]
mov dword [ebp - 0x224], eax
call dword [sym.imp.user32.dll_GetProcessWindowStation]
lea edx, [ebp - 0x222]
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 0x40d850
mov edi, eax
test byte [0x4120c4], 2
jne 0x40d8b8
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
lea ebx, [ebp - 0x244]
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 0x40d842
test byte [0x4120c4], 8
jne 0x40d8f0
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 0x40d9d8
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, 0x4132b7
test ecx, ecx
jne 0x40d9eb
movzx eax, word [ebp - 0x244]
test ax, ax
je 0x40daf8
nop
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x40d930
mov ecx, 0x224c
mov dword [ebp - 0x37c], ebx
mov word [ebp - 0x370], cx
lea ecx, [ebp - 0x36e]
jmp 0x40d9a4
cmp ax, 9
je 0x40daa8
cmp ax, 0xa
jne 0x40da3e
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea edi, [edx - 1]
test edx, edx
jle 0x40dac0
lea eax, [ebp - 0x24e]
cmp ecx, eax
ja 0x40dac0
mov eax, dword [ebp - 0x37c]
mov edx, edi
movzx eax, word [eax]
add dword [ebp - 0x37c], 2
cmp ax, 0xd
je 0x40da20
jbe 0x40d960
cmp ax, 0x22
je 0x40da90
cmp ax, 0x5c
jne 0x40da31
mov eax, 0x5c5c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x40d980
movzx ebx, bx
mov dword [esp], 0x4132c1
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 0x40d891
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x40d980
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x40daf0
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + 0x418844]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + 0x418844]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + 0x418844]
and edi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [edi + 0x418844]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x40d980
mov eax, 0x225c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x40d980
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x40d980
mov byte [ecx], 0x22
test edi, edi
jle 0x40db11
mov edi, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], di
mov byte [eax], 0
lea eax, [ebp - 0x370]
mov dword [esp], eax
call sym.___wine_dbg_strdup
jmp 0x40d9eb
mov byte [ecx], al
inc ecx
jmp 0x40d980
mov ebx, 0x224c
mov byte [ebp - 0x36e], 0x22
lea ecx, [ebp - 0x36e]
mov word [ebp - 0x370], bx
lea eax, [ecx + 1]
jmp 0x40dad7