Function at 0x51e42ca6
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
mov ebx, dword [ebp + 8]
mov ecx, dword [ebx + 0xc]
mov edx, dword [ecx + 4]
mov eax, dword [ebx + 0x10]
xor ecx, ecx
inc ecx
cmp edx, ecx
push esi
push edi
mov dword [ebp - 4], eax
mov dword [ebp + 8], ecx
jb 0x51e42ccb
mov dword [ebp + 8], edx
mov edx, dword [ebx + 0x58]
lea esi, [ebx + 0x28]
lea edi, [ebp - 0x30]
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x18], edx
mov edx, dword [ebx + 0x5c]
mov dword [ebp - 0x14], edx
mov edx, dword [ebx + 0x38]
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x20], edx
mov edx, dword [ebx + 0x3c]
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x1c], edx
mov edx, dword [eax]
push ebx
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x10], edx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [ebx + 0x44], 0x1a
call fcn.51e07bba
pop ecx
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_UpdateWindow]
push ebx
call fcn.51e48116
pop ecx
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_SetCapture]
push ebx
call fcn.51e1435c
test eax, eax
pop ecx
je 0x51e42d33
push 0xffffffffffffffff
push ebx
call fcn.51e48cdf
pop ecx
pop ecx
mov eax, 0xfa
cmp dword [ebp + 8], eax
jb 0x51e42d40
mov eax, dword [ebp + 8]
push 0
push eax
mov esi, 0x1234
push esi
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_SetTimer]
mov eax, dword [ebp - 0x20]
and dword [ebp - 8], 0
mov dword [ebx + 0x38], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebx + 0x3c], eax
call dword [sym.imp.USER32.dll_GetCapture]
sub eax, dword [ebx + 4]
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0xc], eax
je 0x51e42ddc
test byte [ebx], 1
je 0x51e42ddc
push 1
call dword [sym.imp.USER32.dll_GetKeyState]
test ah, ah
jns 0x51e42ddc
push 3
push 0x20a
xor edi, edi
cmp dword [0x51e8bab8], edi
push pe_nt_image_headers32
lea eax, [ebp - 0x4c]
push edi
push eax
jne 0x51e42da9
call dword [sym.imp.USER32.dll_PeekMessageA]
jmp 0x51e42daf
call dword [sym.imp.USER32.dll_PeekMessageW]
cmp eax, edi
jne 0x51e42e0e
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
movzx eax, dx
movzx edi, cx
shl eax, 0x10
or eax, edi
mov edi, dword [ebp - 4]
mov dword [ebp - 0x48], 0x200
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], edx
jmp 0x51e42e89
mov edi, dword [ebp - 4]
and dword [edi + 4], 0
push ebx
call fcn.51e07bba
movzx eax, word [ebp - 0x14]
pop ecx
mov ecx, dword [ebp - 0x18]
movzx edx, cx
shl eax, 0x10
mov dword [ebp - 0x38], ecx
mov ecx, dword [ebp - 0x14]
or eax, edx
mov dword [ebp - 0x48], 0x202
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x34], ecx
jmp 0x51e42e14
mov eax, dword [ebp - 0x40]
mov edi, dword [ebp - 4]
mov ecx, dword [ebp - 0x48]
cmp ecx, 0x200
jb 0x51e42e58
cmp ecx, 0x20a
ja 0x51e42e58
mov dword [ebx + 0x4c], ecx
mov ecx, dword [ebp - 0x44]
mov dword [ebx + 0x54], eax
mov dword [ebx + 0x50], ecx
movsx ecx, ax
shr eax, 0x10
movsx eax, ax
mov dword [ebx + 0x5c], eax
mov eax, dword [ebp - 0x20]
mov dword [ebx + 0x38], eax
mov eax, dword [ebp - 0x1c]
push ebx
mov dword [ebx + 0x58], ecx
mov dword [ebx + 0x3c], eax
call fcn.51e48116
mov eax, dword [ebp - 0x40]
pop ecx
cmp dword [ebp - 0x48], 0x113
jne 0x51e42e89
cmp dword [ebp - 0x44], esi
jne 0x51e42e89
push esi
push dword [ebx + 4]
mov dword [ebp - 8], 1
call dword [sym.imp.USER32.dll_KillTimer]
push 0
push dword [ebp + 8]
push esi
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_SetTimer]
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x48]
sub ecx, 0x200
je 0x51e42eca
dec ecx
dec ecx
jne 0x51e42d62
push esi
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_KillTimer]
cmp dword [ebp - 0xc], 0
je 0x51e42eb2
call dword [sym.imp.USER32.dll_ReleaseCapture]
and dword [edi + 4], 0
push ebx
call fcn.51e07bba
mov eax, dword [ebp - 0x10]
pop ecx
mov dword [edi], eax
pop edi
xor eax, eax
pop esi
inc eax
pop ebx
leave
ret
mov edx, dword [edi + 4]
sub esp, 0x10
mov edi, esp
lea esi, [ebp - 0x30]
movsd dword es:[edi], dword [esi]
movsx ecx, ax
shr eax, 0x10
movsx eax, ax
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0xc], edx
mov edx, dword [ebp - 0x20]
push eax
movsd dword es:[edi], dword [esi]
mov dword [ebx + 0x38], edx
mov edx, dword [ebp - 0x1c]
push ecx
push ebx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], eax
mov dword [ebx + 0x3c], edx
movsd dword es:[edi], dword [esi]
call fcn.51e42c2f
mov esi, dword [ebp - 4]
add esp, 0x1c
cmp dword [ebp - 0xc], eax
mov dword [esi + 4], eax
je 0x51e42f1b
push ebx
mov dword [ebp - 8], 1
call fcn.51e07bba
pop ecx
xor edi, edi
cmp dword [ebp - 8], edi
je 0x51e42f3c
cmp dword [esi + 4], edi
je 0x51e42f3c
push ebx
call fcn.51e1435c
test eax, eax
pop ecx
je 0x51e42f3c
push 0xffffffffffffffff
push ebx
call fcn.51e48cdf
pop ecx
pop ecx
mov dword [ebp - 8], edi
mov esi, 0x1234
jmp 0x51e42d62