Function at 0x4d0d70
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x10
push esi
push edi
push 0x11
call dword [sym.imp.USER32.dll_GetKeyState]
mov esi, dword [esp + 0x1c]
and eax, 0x8000
cmp dword [esi + 0x4b48], 0
mov dword [esp + 0x10], eax
je 0x4d0fd9
mov eax, dword [esp + 0x20]
push 1
push eax
push esi
call fcn.004fc110
add esp, 0xc
cmp byte [esi + 0xaf8], 0x20
jne 0x4d0fd9
push ebp
push esi
call fcn.004ce860
mov ecx, dword [esi + 0x4b4c]
mov edx, dword [esi + 0x4b3c]
push ecx
push edx
push esi
call fcn.004f6e40
mov ecx, dword [esi + 0x4b40]
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x4b50]
push eax
push ecx
push esi
call fcn.004f6e40
mov edx, dword [esi + 0xae8]
mov dword [esp + 0x28], eax
mov eax, dword [esi + 0xae4]
push edx
push eax
push esi
call fcn.004f6e40
mov ecx, dword [esp + 0x38]
add esp, 0x28
cmp ecx, dword [esp + 0xc]
mov ebp, eax
jle 0x4d0e20
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x14]
push eax
call fcn.004e0910
add esp, 8
cmp ebp, dword [esp + 0x10]
jl 0x4d0e30
cmp ebp, dword [esp + 0xc]
jl 0x4d0fd8
test dword [esi + 0xa168], 0x200000
je 0x4d0e51
push 1
push 1
push esi
call fcn.004cf070
add esp, 0xc
test eax, eax
jne 0x4d0fd8
mov edx, dword [esi + 0x39c]
lea ecx, [esp + 0x18]
push ecx
push edx
call sym.LectoraViewer.exe__TerGetRtfSel_8
test eax, eax
mov dword [esp + 0x20], eax
je 0x4d0fd8
mov ecx, dword [esi + 0xae8]
mov eax, dword [esi + 0xae4]
push ebx
push ecx
push eax
lea edi, [esi + 0x5d8]
lea ebx, [esi + 0x47c]
push esi
mov dword [edi], eax
mov dword [ebx], ecx
call fcn.004ee990
add esp, 0xc
test eax, eax
jne 0x4d0eaa
push eax
call dword [sym.imp.USER32.dll_MessageBeep]
mov ebp, dword [esp + 0x24]
jmp 0x4d0fd0
cmp dword [esi + 0x4b48], 2
jne 0x4d0f1a
cmp dword [esp + 0x18], 0
jne 0x4d0f1a
test dword [esi + 0xa168], 0x400000
mov eax, dword [esi + 0xa15c]
mov dword [esp + 0x18], eax
je 0x4d0edb
or eax, 0x100
mov dword [esi + 0xa15c], eax
mov eax, dword [esi + 0x39c]
push 1
push eax
call sym.LectoraViewer.exe__TerDeleteBlock_8
test eax, eax
je 0x4d0f10
mov eax, dword [esp + 0x10]
add dword [esi + 0x5758], 0xffffffff
cmp ebp, eax
jl 0x4d0f04
mov ecx, dword [esp + 0x14]
sub ecx, eax
add ebp, ecx
push ebx
push edi
push ebp
push esi
call fcn.004f88e0
add esp, 0x10
mov edx, dword [esp + 0x18]
mov dword [esi + 0xa15c], edx
mov eax, dword [esi + 0x39c]
push 0
push 0
push eax
push 0xab3
push esi
call fcn.004f70b0
mov ebp, dword [esp + 0x38]
add esp, 0x14
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ecx, dword [ebx]
mov edx, dword [edi]
push 0
push ecx
mov ecx, dword [esp + 0x24]
push edx
mov edx, dword [esi + 0x39c]
push ecx
push eax
push edx
call sym.LectoraViewer.exe__InsertRtfBuf_24
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [esi + 0x5e4]
cmp dword [edi], eax
jl 0x4d0f6e
add eax, 0xffffffff
mov dword [edi], eax
mov edi, dword [edi]
mov eax, dword [esi + 0x490]
mov ecx, edi
sub ecx, dword [esi + 0x5e0]
cmp ecx, eax
jge 0x4d0f86
test ecx, ecx
jge 0x4d0f95
cdq
sub eax, edx
sar eax, 1
mov ecx, edi
sub ecx, eax
mov dword [esi + 0x5e0], ecx
xor eax, eax
cmp dword [esi + 0x5e0], eax
jge 0x4d0fa5
mov dword [esi + 0x5e0], eax
sub edi, dword [esi + 0x5e0]
mov dword [esi + 0x5d4], edi
jns 0x4d0fb9
mov dword [esi + 0x5d4], eax
mov edx, dword [esi + 0x39c]
push eax
push eax
push edx
push 0xab1
push esi
call fcn.004f70b0
add esp, 0x14
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop ebx
pop ebp
xor edi, edi
push edi
push edi
push edi
push 1
push edi
push esi
mov dword [esi + 0x4b48], edi
mov dword [esi + 0x66c], edi
call fcn.004d9160
add esp, 0x18
test eax, eax
jle 0x4d1006
push 1
push edi
push esi
call fcn.004d56b0
add esp, 0xc
push esi
mov dword [esi + 0x498], 4
call fcn.004de3e0
add esp, 4
pop edi
mov eax, 1
pop esi
add esp, 0x10
ret