Function at 0x51d190
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdc0
push esi
xor ecx, ecx
mov dword [ebp - 0x240], ecx
mov dword [ebp - 0x23c], ecx
mov dword [ebp - 0x238], ecx
mov dword [ebp - 0x234], ecx
mov dword [ebp - 0x230], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x51d466
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 8], 1
jl 0x51d1f7
lea edx, [ebp - 0x230]
mov eax, dword [ebp - 4]
call fcn.0051cb3c
mov eax, dword [ebp - 0x230]
mov edx, dword [ebp - 8]
call fcn.00412ae8
cmp al, 1
jne 0x51d1f7
dec dword [ebp - 8]
mov eax, dword [ebp - 8]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
call fcn.0051cec8
test al, al
je 0x51d3c5
cmp dword [ebp - 0xc], 0
jge 0x51d218
xor eax, eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0x10], eax
lea edx, [ebp - 0x234]
mov eax, dword [ebp - 4]
call fcn.0051cb3c
mov eax, dword [ebp - 0x234]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x51d24d
mov eax, dword [ebp - 0x1c]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x10]
jle 0x51d283
lea edx, [ebp - 0x238]
mov eax, dword [ebp - 4]
call fcn.0051cb3c
mov eax, dword [ebp - 0x238]
mov edx, dword [ebp - 0x10]
mov al, byte [eax + edx - 1]
mov edx, dword [0x581f64]
and eax, 0xff
bt dword [edx], eax
jae 0x51d283
inc dword [ebp - 0x10]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x278]
cmp eax, dword [ebp - 0xc]
jg 0x51d2a3
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x278]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
call fcn.0051d160
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x10]
je 0x51d3b4
lea eax, [ebp - 0x12c]
push eax
call sub.user32.dll_GetKeyboardState
xor eax, eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov byte [ebp + eax - 0x22c], 0
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], 0x100
jne 0x51d2ce
mov byte [ebp - 0x21c], 0x81
mov eax, dword [ebp - 4]
mov si, 0xffc7
call fcn.0040470c
and eax, 0x7f
movzx eax, word [eax*2 + 0x58174c]
mov byte [ebp + eax - 0x22c], 0x81
lea eax, [ebp - 0x22c]
push eax
call sub.user32.dll_SetKeyboardState
mov eax, dword [ebp - 4]
mov byte [eax + 0x28c], 1
xor eax, eax
push ebp
push 0x51d3a1
push dword fs:[eax]
mov dword fs:[eax], esp
push 1
mov eax, dword [ebp - 4]
mov si, 0xffc7
call fcn.0040470c
and eax, 0x7f
movzx eax, word [eax*2 + 0x58174c]
push eax
push pe_nt_image_headers32
mov eax, dword [ebp - 4]
call fcn.00474f28
push eax
call sub.user32.dll_SendMessageA
push 1
mov eax, dword [ebp - 4]
mov si, 0xffc7
call fcn.0040470c
and eax, 0x7f
movzx eax, word [eax*2 + 0x58174c]
push eax
push 0x101
mov eax, dword [ebp - 4]
call fcn.00474f28
push eax
call sub.user32.dll_SendMessageA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51d3a8
mov eax, dword [ebp - 4]
mov byte [eax + 0x28c], 0
ret
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
mov dword [eax + 0x280], edx
jmp 0x51d448
cmp dword [ebp - 0xc], 0
jge 0x51d3d0
xor eax, eax
mov dword [ebp - 0xc], eax
lea edx, [ebp - 0x23c]
mov eax, dword [ebp - 4]
call fcn.0051cb3c
mov eax, dword [ebp - 0x23c]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x51d3fe
mov eax, dword [ebp - 0x24]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x24]
jl 0x51d43a
lea edx, [ebp - 0x240]
mov eax, dword [ebp - 4]
call fcn.0051cb3c
mov eax, dword [ebp - 0x240]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x51d434
mov eax, dword [ebp - 0x2c]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
call fcn.0051d160
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51d46d
lea eax, [ebp - 0x240]
mov edx, 5
call fcn.00405474
ret