Function at 0x51e6784d
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x51e8c348]
or dword [eax + 0x48], 0xffffffff
mov ecx, dword [eax]
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0xc], ecx
xor ecx, ecx
cmp dword [ebp + 0x14], ecx
push ebx
mov ebx, dword [ebp + 0xc]
setne cl
push edi
mov edi, dword [ebp + 8]
movzx edx, di
mov dword [ebp - 0x18], edi
lea ecx, [ecx + ecx + 0x201]
mov dword [ebp - 0x28], ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x24], ecx
movzx ecx, bx
shl ecx, 0x10
or ecx, edx
mov dword [ebp - 0x20], ecx
lea ecx, [ebp - 0x2c]
push ecx
push 0
push 0x80a
mov dword [ebp - 0x14], ebx
push dword [eax]
call dword [sym.imp.USER32.dll_GetParent]
push eax
call dword [0x51e8bba0]
test eax, eax
jne 0x51e67b9c
cmp dword [ebp - 0x28], 0x203
push esi
mov esi, dword [sym.imp.USER32.dll_GetFocus]
jne 0x51e678d5
call esi
cmp eax, dword [ebp - 0xc]
jne 0x51e67b9b
push dword [ebp - 0xc]
call dword [sym.imp.USER32.dll_SetCapture]
push 1
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp - 4]
push eax
push ebx
push edi
call fcn.51e670bb
mov eax, dword [0x51e8c348]
xor ecx, ecx
add esp, 0x14
cmp dword [eax + 0x15c], ecx
je 0x51e67926
mov edx, dword [eax + 0x140]
push ecx
push ecx
mov dword [eax + 0x144], edx
push dword [ebp - 4]
call fcn.51e0e490
mov ecx, dword [0x51e8c348]
add esp, 0xc
mov dword [ecx + 0x14c], eax
cmp dword [ebp + 0x14], 0
mov eax, dword [ebp - 4]
mov dword [ebp - 8], eax
je 0x51e67941
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
call fcn.51e66d37
pop ecx
pop ecx
test byte [ebp + 0x10], 4
jne 0x51e67960
mov eax, dword [0x51e8b69c]
cmp dword [eax + 0x7c], 0
jne 0x51e67960
mov eax, dword [ebp - 4]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
mov dword [ebp + 0x10], eax
jmp 0x51e67979
call fcn.51e16841
mov ecx, dword [0x51e8c348]
mov edx, dword [ecx + 0x5c]
add edx, dword [ecx + 0x58]
sub edx, eax
mov dword [ebp + 0x10], edx
mov dword [ebp - 0x10], edx
push dword [ebp + 0xc]
push dword [ebp - 8]
push dword [ebp - 4]
push dword [ebp + 0x10]
push dword [ebp - 0x10]
call fcn.51e67465
push 0
push dword [ebp - 0xc]
call fcn.51e17119
add esp, 0x1c
call esi
cmp eax, dword [ebp - 0xc]
jne 0x51e67b95
xor esi, esi
cmp dword [0x51eb3b14], esi
jne 0x51e67b95
call dword [sym.imp.USER32.dll_GetCapture]
cmp eax, dword [ebp - 0xc]
jne 0x51e67a48
push 1
call dword [sym.imp.USER32.dll_GetKeyState]
test ah, ah
jns 0x51e67a48
cmp dword [0x51e8bab8], esi
push 3
push 0x20a
push pe_nt_image_headers32
lea eax, [ebp - 0x2c]
push esi
push eax
jne 0x51e679ef
call dword [sym.imp.USER32.dll_PeekMessageA]
jmp 0x51e679f5
call dword [sym.imp.USER32.dll_PeekMessageW]
cmp eax, esi
jne 0x51e67a19
movzx eax, bx
movzx ecx, di
shl eax, 0x10
or eax, ecx
mov dword [ebp - 0x28], 0x200
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], ebx
jmp 0x51e67aaa
cmp dword [ebp - 0x28], 0x104
jb 0x51e67a65
cmp dword [ebp - 0x28], 0x106
ja 0x51e67a65
movzx eax, bx
movzx ecx, di
shl eax, 0x10
or eax, ecx
mov dword [ebp - 0x28], 0x202
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], ebx
jmp 0x51e67a83
movzx eax, bx
movzx ecx, di
shl eax, 0x10
or eax, ecx
mov dword [ebp - 0x28], 0x202
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], ebx
jmp 0x51e67a68
mov eax, dword [ebp - 0x20]
cmp dword [ebp - 0x28], 0x200
jb 0x51e67aaa
cmp dword [ebp - 0x28], 0x20a
ja 0x51e67aaa
cmp dword [ebp - 0x28], 0x202
jne 0x51e67a89
call dword [sym.imp.USER32.dll_ReleaseCapture]
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [0x51e8c348]
push esi
push 0x80a
push dword [eax]
call dword [sym.imp.USER32.dll_GetParent]
push eax
call dword [0x51e8bba0]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x28]
sub ecx, 0x200
je 0x51e67ac2
dec ecx
dec ecx
jne 0x51e679b3
jmp 0x51e67b9b
movsx edi, ax
shr eax, 0x10
movsx ebx, ax
mov eax, dword [0x51e8c348]
cmp byte [eax + 0x118], 0
je 0x51e67aef
mov esi, edi
sub esi, dword [eax + 0xb0]
test esi, esi
jg 0x51e67afb
mov esi, dword [eax + 0xa8]
sub esi, edi
jmp 0x51e67b07
mov esi, dword [eax + 0xac]
sub esi, ebx
test esi, esi
jle 0x51e67aff
push 0xffffffffffffffff
jmp 0x51e67b0b
mov esi, ebx
sub esi, dword [eax + 0xb4]
js 0x51e67b33
push 1
call fcn.51e672dc
pop ecx
push 0
push 2
call fcn.51e168aa
mov eax, dword [0x51e8c348]
cmp esi, dword [eax + 0x10]
pop ecx
pop ecx
jg 0x51e67b33
push 0x64
call fcn.51e66171
mov eax, dword [0x51e8c348]
pop ecx
cmp dword [eax + 0x15c], 0
je 0x51e67b48
mov ecx, dword [eax + 0x140]
mov dword [eax + 0x148], ecx
push 0
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp - 4]
push eax
push ebx
push edi
call fcn.51e670bb
mov eax, dword [ebp - 4]
add esp, 0x14
cmp dword [ebp + 0x14], 0
mov dword [ebp - 8], eax
je 0x51e67b77
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
call fcn.51e66d37
pop ecx
pop ecx
push dword [ebp + 0xc]
push dword [ebp - 8]
push dword [ebp - 4]
push dword [ebp + 0x10]
push dword [ebp - 0x10]
call fcn.51e67465
add esp, 0x14
xor esi, esi
jmp 0x51e679b3
call dword [sym.imp.USER32.dll_ReleaseCapture]
pop esi
pop edi
pop ebx
leave
ret