Function at 0x5419e0
Capabilities:
Open clipboard
Read clipboard data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4c
mov edx, dword [ebp + 8]
lea eax, [ebp + 8]
push ebx
mov ebx, ecx
mov byte [esp + 0x48], 0
push esi
xor ecx, ecx
mov dword [esp + 0xc], ebx
mov word [esp + 0x3c], cx
mov esi, 0x80004005
mov dword [ebx], 0
push edi
cmp dx, 3
jne 0x541a25
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x51], ecx
jmp 0x541ae7
mov ecx, 0x4003
cmp dx, cx
jne 0x541a45
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x51], 0
jmp 0x541ae7
mov ecx, dword [ebp + 0x10]
mov dword [esp + 0x3c], 0
cmp dx, 0xa
jne 0x541a6d
cmp ecx, 0x80020004
jne 0x541a6d
mov byte [esp + 0x50], 1
mov dword [esp + 0x51], 0x80020005
jmp 0x541ae7
cmp dx, 9
je 0x541a7d
mov edi, 0x4009
cmp dx, di
jne 0x541acc
test edx, 0x4000
je 0x541a87
mov ecx, dword [ecx]
test ecx, ecx
je 0x541d14
push 0
push 0
lea edx, [esp + 0x48]
xor eax, eax
push edx
lea edx, [esp + 0x38]
mov dword [esp + 0x38], eax
push edx
push 3
push 0
push 0x5c0a38
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov eax, dword [ecx]
push 0
push ecx
call dword [eax + 0x18]
mov dword [esp + 0x51], eax
test eax, eax
js 0x541adc
lea eax, [esp + 0x40]
movzx ecx, word [eax]
cmp ecx, 1
jne 0x541b17
mov dword [esp + 0x51], 0x800a005e
cmp byte [esp + 0x50], 0
je 0x541d1c
mov edi, dword [esp + 0x3c]
test edi, edi
jne 0x541b8b
mov edi, dword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
push 0xd
call edi
test eax, eax
jne 0x541ba9
push 1
call edi
test eax, eax
je 0x541b6d
mov edi, 1
jmp 0x541c50
xor edx, edx
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], edx
mov edx, 0x400c
cmp cx, dx
jne 0x541b3b
mov eax, dword [eax + 8]
cmp word [eax], dx
je 0x541b33
push 3
push 2
push 0x400
push eax
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.OLEAUT32.dll_SafeArrayPtrOfIndex]
mov dword [esp + 0x51], eax
test eax, eax
js 0x541adc
mov eax, dword [esp + 0x20]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x51], 0
jmp 0x541ae7
push str.Rich_Text_Format
call dword [sym.imp.USER32.dll_RegisterClipboardFormatA]
push eax
call edi
test eax, eax
jne 0x541c43
lea edi, [eax + 1]
jmp 0x541c50
cmp edi, 1
je 0x541c50
cmp edi, 0xffffbf01
je 0x541c43
cmp edi, 0xd
jne 0x541d21
push 0
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x541d21
push 0xd
call dword [sym.imp.USER32.dll_GetClipboardData]
mov edi, eax
test edi, edi
je 0x541c29
push edi
call dword [sym.imp.KERNEL32.dll_GlobalSize]
mov esi, eax
shr esi, 1
je 0x541c29
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edi, eax
test edi, edi
je 0x541c11
xor ecx, ecx
test esi, esi
je 0x541bf3
cmp word [edi + ecx*2], 0
je 0x541bf3
inc ecx
cmp ecx, esi
jb 0x541be7
push ecx
push edi
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
push edi
mov dword [ebx], eax
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
call dword [sym.imp.USER32.dll_CloseClipboard]
jmp 0x541d21
push 0
push edi
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov dword [ebx], eax
xor esi, esi
call dword [sym.imp.USER32.dll_CloseClipboard]
jmp 0x541d21
push 0x5c4be4
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov dword [ebx], eax
xor esi, esi
call dword [sym.imp.USER32.dll_CloseClipboard]
jmp 0x541d21
push str.Rich_Text_Format
call dword [sym.imp.USER32.dll_RegisterClipboardFormatA]
mov edi, eax
push 0
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x541d21
movzx eax, di
push eax
call dword [sym.imp.USER32.dll_GetClipboardData]
mov edi, eax
test edi, edi
je 0x541cfd
push edi
call dword [sym.imp.KERNEL32.dll_GlobalSize]
mov esi, eax
test esi, esi
je 0x541cfd
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
xor ebx, ebx
mov dword [esp + 0x14], eax
test eax, eax
je 0x541cab
test esi, esi
je 0x541cab
lea ebx, [ebx]
cmp byte [ebx + eax], 0
je 0x541cab
inc ebx
cmp ebx, esi
jb 0x541ca0
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
push 0
push ebx
push eax
push 0
push 0
call esi
mov edi, eax
push edi
push 0
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov ecx, dword [esp + 0x10]
push edi
push eax
push ebx
mov ebx, dword [esp + 0x20]
push ebx
push 0
push 0
mov dword [ecx], eax
call esi
mov ecx, dword [esp + 0x10]
xor esi, esi
mov eax, dword [ecx]
xor ecx, ecx
mov word [eax + edi*2], cx
test ebx, ebx
je 0x541d0c
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
call dword [sym.imp.USER32.dll_CloseClipboard]
jmp 0x541d21
push 0x5c4be4
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
xor esi, esi
mov dword [ebx], eax
call dword [sym.imp.USER32.dll_CloseClipboard]
jmp 0x541d21
mov dword [esp + 0x51], 0x800a005b
mov esi, 0x80020005
cmp word [esp + 0x40], 0
je 0x541d34
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10