Function at 0x4027c0
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 0x402810
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]
inc ebx
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 0x402980
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GlobalLock]
mov dword [ebp - 0x30], eax
sub esp, 4
test eax, eax
je 0x402980
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 0x402a17
dec ebx
inc esi
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
nop
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 0x402914
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
inc ebx
mov eax, ebx
cmp ebx, dword [ebp - 0x10]
jb 0x4028f0
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x20]
add eax, edi
cmp eax, edi
ja 0x402929
jmp 0x402930
lea ecx, [eax - 2]
cmp ecx, edi
jbe 0x402990
mov eax, ecx
cmp word [eax - 2], 0x20
je 0x402920
lea edi, [eax + 2]
mov ecx, eax
cmp esi, dword [ebp - 0x28]
sbb eax, eax
inc esi
and eax, 0xa
mov word [ecx], ax
cmp dword [ebp - 0x1c], esi
ja 0x4028d0
mov esi, edi
sub esi, dword [ebp - 0x30]
mov ebx, esi
sar esi, 1
test byte [0x413034], 8
jne 0x4029b9
cmp dword [ebp - 0x38], esi
jne 0x402994
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 0x402935
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 0x40295d
mov eax, dword [ebp - 0x30]
shr eax, 0x10
je 0x402a20
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 0x4029ea
mov eax, edi
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x415a28
mov dword [esp + 8], str.copy_selection
mov dword [esp + 4], 0x413034
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x402958
xor esi, esi
xor ebx, ebx
jmp 0x40294f
movzx eax, word [ebp - 0x30]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf_1
jmp 0x4029ea