Function at 0x541695
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x54
mov edx, dword [ebp + 8]
lea eax, [ebp + 8]
push ebx
push esi
mov esi, ecx
mov byte [esp + 0x54], 0
xor ecx, ecx
mov dword [esp + 0x10], esi
mov word [esp + 0x44], cx
mov ebx, 0x80004005
mov dword [esp + 0x14], ebx
push edi
cmp dx, 3
jne 0x5416d8
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x44], eax
mov dword [esp + 0x59], ecx
jmp 0x54179a
mov ecx, 0x4003
cmp dx, cx
jne 0x5416f8
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov dword [esp + 0x44], eax
mov dword [esp + 0x59], 0
jmp 0x54179a
mov ecx, dword [ebp + 0x10]
mov dword [esp + 0x44], 0
cmp dx, 0xa
jne 0x541720
cmp ecx, 0x80020004
jne 0x541720
mov byte [esp + 0x58], 1
mov dword [esp + 0x59], 0x80020005
jmp 0x54179a
cmp dx, 9
je 0x541730
mov edi, 0x4009
cmp dx, di
jne 0x54177f
test edx, 0x4000
je 0x54173a
mov ecx, dword [ecx]
test ecx, ecx
je 0x541989
push 0
push 0
lea edx, [esp + 0x50]
xor eax, eax
push edx
lea edx, [esp + 0x40]
mov dword [esp + 0x40], eax
push edx
push 3
push 0
push 0x5c0a38
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov eax, dword [ecx]
push 0
push ecx
call dword [eax + 0x18]
mov dword [esp + 0x59], eax
test eax, eax
js 0x54178f
lea eax, [esp + 0x48]
movzx ecx, word [eax]
cmp ecx, 1
jne 0x5417ad
mov dword [esp + 0x59], 0x800a005e
cmp byte [esp + 0x58], 0
je 0x541991
mov eax, dword [esp + 0x44]
mov dword [esp + 0x10], eax
test eax, eax
jne 0x541800
mov eax, 1
jmp 0x541820
xor edx, edx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], edx
mov edx, 0x400c
cmp cx, dx
jne 0x5417d1
mov eax, dword [eax + 8]
cmp word [eax], dx
je 0x5417c9
push 3
push 2
push 0x400
push eax
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.OLEAUT32.dll_SafeArrayPtrOfIndex]
mov dword [esp + 0x59], eax
test eax, eax
js 0x54178f
mov eax, dword [esp + 0x28]
mov dword [esp + 0x44], eax
mov dword [esp + 0x59], 0
jmp 0x54179a
cmp eax, 0xd
je 0x541824
cmp eax, 1
je 0x541824
cmp eax, 0xffffbf01
jne 0x541996
push str.Rich_Text_Format
call dword [sym.imp.USER32.dll_RegisterClipboardFormatA]
mov dword [esp + 0x10], eax
xor edi, edi
test esi, esi
je 0x541875
mov eax, dword [esi - 4]
push edi
push edi
push edi
cdq
sub eax, edx
push edi
mov ebx, eax
sar ebx, 1
push ebx
push esi
push edi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
call edi
mov esi, eax
push esi
push 0
call dword [sym.imp.OLEAUT32.dll_DllRegisterServer]
push 0
push 0
push esi
push eax
push ebx
push dword [esp + 0x28]
mov dword [esp + 0x34], eax
push 0
push 0
call edi
mov edi, dword [esp + 0x1c]
mov byte [esi + edi], 0
test edi, edi
je 0x541875
mov esi, dword [edi - 4]
jmp 0x541877
xor esi, esi
push 0
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x54197c
lea eax, [esi + 1]
push eax
push 0x2000
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
mov dword [esp + 0x1c], ebx
test ebx, ebx
je 0x541976
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x541976
test esi, esi
je 0x5418c7
lea ecx, [esi + 1]
push ecx
push edi
push eax
call fcn.0055fcbe
add esp, 0xc
jmp 0x5418ca
mov byte [eax], 0
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov ebx, dword [esp + 0x10]
mov eax, 1
cmp ebx, 0xd
je 0x5418e2
movzx eax, bx
push dword [esp + 0x1c]
push eax
call dword [sym.imp.USER32.dll_SetClipboardData]
test eax, eax
je 0x541976
xor esi, esi
mov dword [esp + 0x18], esi
cmp ebx, 1
je 0x541905
cmp ebx, 0xd
jne 0x541976
mov eax, dword [esp + 0x14]
test eax, eax
je 0x541912
mov eax, dword [eax - 4]
jmp 0x541914
xor eax, eax
mov dword [esp + 0x10], eax
add eax, 2
push eax
push 0x2000
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
test ebx, ebx
je 0x541976
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x541976
cmp dword [esp + 0x10], esi
je 0x541955
push dword [esp + 0x1c]
push dword [esp + 0x18]
push eax
call fcn.0055fcbe
add esp, 0xc
jmp 0x54195a
xor ecx, ecx
mov word [eax], cx
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
push 0xd
call dword [sym.imp.USER32.dll_SetClipboardData]
neg eax
sbb eax, eax
not eax
and esi, eax
mov dword [esp + 0x18], esi
call dword [sym.imp.USER32.dll_CloseClipboard]
push edi
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov ebx, dword [esp + 0x18]
jmp 0x541996
mov dword [esp + 0x59], 0x800a005b
mov ebx, 0x80020005
cmp word [esp + 0x48], 0
je 0x5419a9
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 0x10