Function at 0x40fec0
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
push ebp
mov edx, eax
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x40
mov eax, dword [eax + 0x84]
mov dword [ebp - 0x14], edx
movsx esi, word [eax + 0x18]
movsx edi, word [eax + 0x1c]
movsx ebx, word [eax + 0x1a]
movzx eax, word [eax + 0x1e]
mov word [ebp - 0x10], ax
mov eax, dword [edx + 0xac]
mov dword [esp], eax
call dword [sym.imp.user32.dll_OpenClipboard]
sub esp, 4
test eax, eax
jne 0x40ff10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
movsx eax, word [ebp - 0x10]
sub esi, edi
mov edx, esi
sub ebx, eax
sar edx, 0x1f
mov eax, ebx
xor esi, edx
sar eax, 0x1f
sub esi, edx
xor ebx, eax
sub ebx, eax
call dword [sym.imp.user32.dll_EmptyClipboard]
add ebx, 1
lea eax, [esi + 2]
mov dword [esp], 2
imul eax, ebx
mov dword [ebp - 0x38], eax
add eax, eax
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_GlobalAlloc]
mov dword [ebp - 0x34], eax
sub esp, 8
test eax, eax
je 0x410092
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GlobalLock]
mov dword [ebp - 0x30], eax
sub esp, 4
test eax, eax
je 0x410092
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx + 0x84]
movzx eax, word [ecx + 0x18]
movzx edi, word [ecx + 0x1a]
cmp word [ecx + 0x1c], ax
cmovle ax, word [ecx + 0x1c]
cmp word [ecx + 0x1e], di
cmovle di, word [ecx + 0x1e]
movsx edi, di
add ebx, edi
mov dword [ebp - 0x1c], ebx
cmp ebx, edi
jbe 0x410127
sub ebx, 1
add esi, 1
mov dword [ebp - 0x28], ebx
movsx ebx, ax
lea ecx, [esi + esi]
lea eax, [ebx + ebx]
add esi, ebx
mov dword [ebp - 0x2c], ebx
mov ebx, eax
mov dword [ebp - 0x10], esi
mov esi, dword [ebp - 0x30]
neg ebx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x24], ebx
mov eax, esi
mov esi, edi
mov edi, eax
lea esi, [esi]
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x2c]
add eax, edi
mov dword [ebp - 0x18], ecx
mov ebx, ecx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
cmp ecx, eax
jae 0x41001e
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x18], edi
lea esi, [esi]
mov ecx, dword [edx + 8]
mov edi, dword [ecx + 0xc]
mov ecx, dword [ecx + 0x30]
imul edi, esi
add eax, edi
mov edi, dword [ebp - 0x14]
movzx eax, word [ecx + eax*4]
mov word [edi + ebx*2], ax
add ebx, 1
mov eax, ebx
cmp ebx, dword [ebp - 0x10]
jb 0x40fff8
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x20]
add eax, edi
cmp eax, edi
ja 0x410039
jmp 0x410040
lea ecx, [eax - 2]
cmp ecx, edi
jbe 0x4100a0
mov eax, ecx
cmp word [eax - 2], 0x20
je 0x410030
lea edi, [eax + 2]
mov ecx, eax
cmp esi, dword [ebp - 0x28]
sbb eax, eax
add esi, 1
and eax, 0xa
mov word [ecx], ax
cmp dword [ebp - 0x1c], esi
ja 0x40ffd8
mov esi, edi
sub esi, dword [ebp - 0x30]
mov ebx, esi
sar esi, 1
test byte [0x413080], 8
jne 0x4100c9
cmp dword [ebp - 0x38], esi
jne 0x4100a4
mov esi, dword [ebp - 0x34]
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_GlobalUnlock]
sub esp, 4
mov dword [esp + 4], esi
mov dword [esp], 0xd
call dword [sym.imp.user32.dll_SetClipboardData]
sub esp, 8
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp dword [sym.imp.user32.dll_CloseClipboard]
mov edi, eax
jmp 0x410045
mov esi, dword [ebp - 0x34]
mov dword [esp + 8], 2
mov dword [esp + 4], ebx
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_GlobalReAlloc]
sub esp, 0xc
test eax, eax
cmove eax, esi
mov dword [ebp - 0x34], eax
jmp 0x41006f
mov eax, dword [ebp - 0x30]
shr eax, 0x10
je 0x410130
mov edi, dword [ebp - 0x30]
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x4100fa
mov eax, edi
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x414f6c
mov dword [esp + 8], str.copy_selection
mov dword [esp + 4], 0x413080
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x41006a
xor esi, esi
xor ebx, ebx
jmp 0x410061
movzx eax, word [ebp - 0x30]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf_1
jmp 0x4100fa