Function at 0x4d1700
Capabilities:
Open clipboard
Read clipboard data

Disassembly:
sub esp, 0xc
push ebx
mov ebx, dword [esp + 0x18]
test ebx, ebx
push esi
mov esi, dword [esp + 0x18]
push edi
mov dword [esp + 0x10], 0
jne 0x4d17ca
mov eax, dword [esi + 0x4710]
mov edi, dword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
push eax
call edi
test eax, eax
jne 0x4d17ca
mov eax, dword [esi + 0x5b8]
test eax, eax
je 0x4d1761
push eax
call edi
test eax, eax
je 0x4d1761
push 0
push 0
push 0
push 0xaba
push esi
call fcn.004f70b0
add esp, 0x14
pop edi
pop esi
pop ebx
add esp, 0xc
ret
push 3
call edi
test eax, eax
je 0x4d1770
mov eax, 3
jmp 0x4d1790
cmp dword [0x622424], 0
je 0x4d17ac
mov ecx, dword [esi + 0x4718]
push ecx
call edi
test eax, eax
je 0x4d17ac
mov eax, dword [esi + 0x4718]
test eax, eax
je 0x4d17ca
mov edx, dword [esi + 0x39c]
push 1
push 0
push 0
push 0
push eax
push edx
call fcn.004d1030
pop edi
pop esi
pop ebx
add esp, 0xc
ret
push 8
call edi
test eax, eax
je 0x4d17bb
mov eax, 8
jmp 0x4d1790
push 2
call edi
test eax, eax
je 0x4d17ca
mov eax, 2
jmp 0x4d1790
mov eax, dword [esi + 0x47c]
mov ecx, dword [esi + 0x5d8]
push eax
push ecx
push esi
call fcn.004a0bf0
imul eax, eax, 0x170
mov edx, dword [esi + 0x3434]
add esp, 0xc
test dword [edx + eax + 0x134], 0x4000
jne 0x4d1c9c
mov eax, dword [esi + 0x47c]
mov ecx, dword [esi + 0x5d8]
push eax
push ecx
push esi
call fcn.004ee990
add esp, 0xc
test eax, eax
je 0x4d1c9c
cmp dword [esi + 0x4b48], 2
mov edi, 1
jne 0x4d1843
mov edx, dword [esi + 0x39c]
push edi
push edx
call sym.LectoraViewer.exe__TerDeleteBlock_8
test eax, eax
je 0x4d1843
add dword [esi + 0x5758], 0xffffffff
push 0
push 0
push 0
push 0xabb
push esi
call fcn.004f70b0
mov dword [esp + 0x28], eax
mov eax, dword [esi + 0x39c]
add esp, 0x14
push eax
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
jne 0x4d1885
push 0x5da43c
push 9
push esi
call fcn.004e26e0
add esp, 0xc
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 0xc
ret
cmp ebx, edi
jne 0x4d18ba
test dword [esi + 0xa170], 0x400000
mov ebx, dword [sym.imp.USER32.dll_GetClipboardData]
je 0x4d18b1
push 0xd
call ebx
test eax, eax
mov dword [esp + 0xc], eax
je 0x4d18b1
mov dword [esp + 0x20], 0xd
jmp 0x4d1920
push edi
call ebx
mov dword [esp + 0xc], eax
jmp 0x4d1920
cmp ebx, 0xd
jne 0x4d18ce
push ebx
mov ebx, dword [sym.imp.USER32.dll_GetClipboardData]
call ebx
mov dword [esp + 0xc], eax
jmp 0x4d1920
mov eax, dword [esi + 0x4710]
cmp ebx, eax
mov ebx, dword [sym.imp.USER32.dll_GetClipboardData]
push eax
jne 0x4d18eb
call ebx
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edi
jmp 0x4d1920
call ebx
test eax, eax
mov dword [esp + 0xc], eax
je 0x4d18fb
mov dword [esp + 0x10], edi
jmp 0x4d1920
push 0xd
call ebx
test eax, eax
mov dword [esp + 0xc], eax
je 0x4d1911
mov dword [esp + 0x20], 0xd
jmp 0x4d1920
push edi
call ebx
test eax, eax
mov dword [esp + 0xc], eax
je 0x4d1928
mov dword [esp + 0x20], edi
mov eax, dword [esp + 0xc]
test eax, eax
jne 0x4d1947
push 0x5da43c
push 0xb
push esi
call fcn.004e26e0
add esp, 0xc
call dword [sym.imp.USER32.dll_CloseClipboard]
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 0xc
ret
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebp, eax
test ebp, ebp
jne 0x4d1975
push str.CopyFromClipboard
push 0x6c
push esi
call fcn.004e26e0
add esp, 0xc
call dword [sym.imp.USER32.dll_CloseClipboard]
pop ebp
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 0xc
ret
mov ecx, dword [esi + 0x5d8]
mov edx, dword [esi + 0x138]
mov dword [esi + 0x590], 0xffffffff
mov dword [esi + 0x6ac], 0
mov eax, dword [edx + ecx*4]
mov eax, dword [eax + 0x2c]
test eax, eax
je 0x4d19b5
mov ecx, dword [esi + 0x588c]
imul eax, eax, 0x84
mov edx, dword [ecx + eax + 0x54]
mov dword [esi + 0x590], edx
mov eax, dword [esi + 0x4714]
push eax
call ebx
mov edi, eax
test edi, edi
je 0x4d19f0
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x4d19f0
cmp word [eax], 6
jne 0x4d19e9
movsx ecx, word [eax + 2]
mov dword [esi + 0x590], ecx
movsx edx, word [eax + 4]
mov dword [esi + 0x6ac], edx
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [esi + 0x5d8]
mov ecx, dword [esi + 0x138]
mov edx, dword [ecx + eax*4]
mov eax, dword [edx + 0xc]
cmp dword [esi + 0x47c], eax
jl 0x4d1a10
mov dword [esi + 0x47c], eax
cmp dword [esi + 0x47c], 0
jge 0x4d1a23
mov dword [esi + 0x47c], 0
cmp dword [esp + 0x14], 0
je 0x4d1ac7
test dword [esi + 0xa164], 0x1000000
jne 0x4d1ac7
mov ebx, dword [esp + 0x18]
or dword [esi + 0xa17c], 0x40
test ebx, ebx
je 0x4d1a92
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edi, eax
test edi, edi
je 0x4d1a92
mov eax, dword [esi + 0x47c]
mov ecx, dword [esi + 0x5d8]
push 0
push eax
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalSize]
mov edx, dword [esi + 0x39c]
push eax
push edi
push edx
call sym.LectoraViewer.exe__InsertRtfBuf_24
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
and dword [esi + 0xa17c], 0xffffffbf
jmp 0x4d1b53
mov eax, dword [esi + 0x47c]
mov ecx, dword [esi + 0x5d8]
mov edx, dword [esp + 0x10]
push 0
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GlobalSize]
push eax
mov eax, dword [esi + 0x39c]
push ebp
push eax
call sym.LectoraViewer.exe__InsertRtfBuf_24
and dword [esi + 0xa17c], 0xffffffbf
jmp 0x4d1b53
push esi
call fcn.004ad4e0
add esp, 4
xor ecx, ecx
cmp dword [esp + 0x24], 0xd
mov dword [esi + 0x2b2c], eax
mov dword [esp + 0x14], ebp
jne 0x4d1b3f
movzx eax, word [ebp]
xor edi, edi
test ax, ax
je 0x4d1b11
movzx eax, ax
cmp ax, 0xff
jbe 0x4d1afc
mov ecx, 1
movzx eax, word [ebp + edi*2 + 2]
add edi, 1
test ax, ax
jne 0x4d1af1
test ecx, ecx
jne 0x4d1c16
push 1
call ebx
mov ebx, eax
test ebx, ebx
je 0x4d1c16
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebp, eax
test ebp, ebp
je 0x4d1c16
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov dword [esp + 0x10], ebx
push 0
push 0
push 0
push 0
push 0
push ebp
push esi
call fcn.004cdf90
add esp, 0x1c
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
call dword [sym.imp.USER32.dll_CloseClipboard]
mov eax, dword [esi + 0x5d8]
cmp eax, dword [esi + 0x5e4]
mov edi, 1
mov dword [esi + 0x590], edi
mov dword [esi + 0x6ac], edi
jl 0x4d1b8c
add eax, 0xffffffff
mov dword [esi + 0x5d8], eax
mov ecx, dword [esi + 0x5d8]
mov eax, dword [esi + 0x490]
mov edx, ecx
sub edx, dword [esi + 0x5e0]
xor ebx, ebx
cmp edx, eax
jge 0x4d1baa
cmp edx, ebx
jge 0x4d1bc3
cdq
sub eax, edx
mov edx, eax
sar edx, 1
mov eax, ecx
sub eax, edx
mov dword [esi + 0x5e0], eax
jns 0x4d1bc3
mov dword [esi + 0x5e0], ebx
sub ecx, dword [esi + 0x5e0]
push ebx
push ebx
push edi
push ebx
push ebx
push esi
mov dword [esi + 0x5d4], ecx
mov dword [esi + 0x4b48], ebx
mov dword [esi + 0x4b5c], ebx
call fcn.004d9160
add esp, 0x18
cmp eax, 0xffffffff
jle 0x4d1bf9
push edi
push ebx
push esi
call fcn.004d56b0
add esp, 0xc
push esi
mov dword [esi + 0x498], 4
call fcn.004de3e0
add esp, 4
pop ebp
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 0xc
ret
lea edx, [edi + edi + 2]
push edx
mov dword [esp + 0x28], edi
call fcn.004e2930
mov ebx, eax
add edi, 1
push edi
mov dword [esp + 0x20], ebx
call fcn.004e2930
xor edi, edi
add esp, 8
cmp dword [esp + 0x24], edi
mov ebp, eax
jl 0x4d1c78
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
sub eax, ebx
mov dword [esp + 0x14], eax
jmp 0x4d1c54
mov eax, dword [esp + 0x14]
movzx edx, word [ebx]
lea ecx, [edi + ebp]
push ecx
add eax, ebx
push eax
push edx
push esi
call fcn.004b0090
add edi, 1
add esp, 0x10
add ebx, 2
cmp edi, dword [esp + 0x24]
jle 0x4d1c50
mov ebx, dword [esp + 0x18]
push 0
push 0
push 0
push 0
push ebx
push ebp
push esi
call fcn.004cdf90
push ebx
call fcn.004e2910
push ebp
call fcn.004e2910
add esp, 0x24
jmp 0x4d1b53
push 0
call dword [sym.imp.USER32.dll_MessageBeep]
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0xc
ret