Function at 0x51b6a8
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0xa
push 0
push 0
dec ecx
jne 0x51b6b1
xchg dword [ebp - 4], ecx
push ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x51bcb2
push dword fs:[eax]
mov dword fs:[eax], esp
cmp byte [ebp + 0xc], 0
je 0x51b6ef
mov eax, dword [ebp - 4]
cmp dword [eax + 0x3ac], 2
jne 0x51b6ef
xor edx, edx
mov eax, dword [ebp - 4]
call fcn.004fde6c
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
call fcn.0051c360
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
cmp eax, 0x40
jbe 0x51b70a
call fcn.00403a58
imul eax, eax, 8
jno 0x51b714
call fcn.00403a60
mov edx, dword [ebp - 4]
mov eax, dword [edx + eax*8 + 0xd28]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x51b74b
mov eax, dword [ebp - 0x18]
cmp eax, 0x40
jbe 0x51b734
call fcn.00403a58
imul eax, eax, 8
jno 0x51b73e
call fcn.00403a60
mov edx, dword [ebp - 4]
cmp dword [edx + eax*8 + 0xd2c], 2
je 0x51b74f
xor eax, eax
jmp 0x51b751
mov al, 1
mov byte [ebp - 0x1d], al
cmp byte [ebp + 0xc], 0
je 0x51b75e
mov byte [ebp - 0x1d], 0
cmp byte [ebp - 0x1d], 0
jne 0x51b78a
mov eax, dword [ebp - 4]
cmp byte [eax + 0x37c], 0
je 0x51b78a
cmp dword [ebp - 8], 0
jne 0x51b77f
mov dword [ebp - 8], 1
jmp 0x51b78a
cmp dword [ebp - 8], 1
jne 0x51b78a
xor eax, eax
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 9
jne 0x51b7b0
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov al, byte [ebp - 0x1d]
push eax
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp + 0x14]
mov edx, 0x800
mov eax, dword [ebp - 4]
call fcn.004fe8ec
cmp dword [ebp - 8], 0
jne 0x51b86d
cmp dword [ebp - 0xc], 0
je 0x51b7ca
cmp dword [ebp - 0xc], 1
jne 0x51b86d
push 1
call sub.user32.dll_GetAsyncKeyState
movsx eax, ax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x10]
push eax
push 0
mov al, byte [ebp - 0x1d]
push eax
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp + 0x14]
mov edx, 2
mov eax, dword [ebp - 4]
call fcn.004fe8ec
cmp dword [ebp - 0x14], 0
jne 0x51b802
push 1
call sub.user32.dll_GetAsyncKeyState
lea eax, [ebp - 0x1c]
mov edx, 0x51bcc4
call fcn.00405358
cmp byte [ebp - 0x1d], 0
je 0x51b847
push dword [ebp - 0x1c]
push 0x51bcdc
mov eax, dword [ebp - 0x24]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x2c]
call fcn.0040a4d8
mov edx, dword [ebp - 0x2c]
lea eax, [ebp - 0x28]
call fcn.004054d0
push dword [ebp - 0x28]
lea eax, [ebp - 0x1c]
mov edx, 3
call fcn.004055cc
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3b8]
call fcn.004b2214
test eax, eax
jge 0x51b86d
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3b8]
mov ecx, dword [eax]
call dword [ecx + 0x38]
cmp dword [ebp - 8], 1
jne 0x51b92a
cmp dword [ebp - 0xc], 0
je 0x51b887
cmp dword [ebp - 0xc], 1
jne 0x51b92a
push 2
call sub.user32.dll_GetAsyncKeyState
movsx eax, ax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x10]
push eax
push 0
mov al, byte [ebp - 0x1d]
push eax
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp + 0x14]
mov edx, 8
mov eax, dword [ebp - 4]
call fcn.004fe8ec
cmp dword [ebp - 0x14], 0
jne 0x51b8bf
push 2
call sub.user32.dll_GetAsyncKeyState
lea eax, [ebp - 0x1c]
mov edx, 0x51bce4
call fcn.00405358
cmp byte [ebp - 0x1d], 0
je 0x51b904
push dword [ebp - 0x1c]
push 0x51bcdc
mov eax, dword [ebp - 0x24]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x34]
call fcn.0040a4d8
mov edx, dword [ebp - 0x34]
lea eax, [ebp - 0x30]
call fcn.004054d0
push dword [ebp - 0x30]
lea eax, [ebp - 0x1c]
mov edx, 3
call fcn.004055cc
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3b8]
call fcn.004b2214
test eax, eax
jge 0x51b92a
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3b8]
mov ecx, dword [eax]
call dword [ecx + 0x38]
cmp dword [ebp - 8], 2
jne 0x51b9e7
cmp dword [ebp - 0xc], 0
je 0x51b944
cmp dword [ebp - 0xc], 1
jne 0x51b9e7
push 4
call sub.user32.dll_GetAsyncKeyState
movsx eax, ax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x10]
push eax
push 0
mov al, byte [ebp - 0x1d]
push eax
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp + 0x14]
mov edx, 0x20
mov eax, dword [ebp - 4]
call fcn.004fe8ec
cmp dword [ebp - 0x14], 0
jne 0x51b97c
push 4
call sub.user32.dll_GetAsyncKeyState
lea eax, [ebp - 0x1c]
mov edx, 0x51bcfc
call fcn.00405358
cmp byte [ebp - 0x1d], 0
je 0x51b9c1
push dword [ebp - 0x1c]
push 0x51bcdc
mov eax, dword [ebp - 0x24]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x3c]
call fcn.0040a4d8
mov edx, dword [ebp - 0x3c]
lea eax, [ebp - 0x38]
call fcn.004054d0
push dword [ebp - 0x38]
lea eax, [ebp - 0x1c]
mov edx, 3
call fcn.004055cc
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3b8]
call fcn.004b2214
test eax, eax
jge 0x51b9e7
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3b8]
mov ecx, dword [eax]
call dword [ecx + 0x38]
cmp dword [ebp - 0xc], 0
jne 0x51b9f4
push 0x14
call sub.kernel32.dll_Sleep_1
cmp dword [ebp - 8], 0
jne 0x51bab6
cmp dword [ebp - 0xc], 0
je 0x51ba0e
cmp dword [ebp - 0xc], 2
jne 0x51bab6
mov eax, dword [ebp + 0x10]
push eax
push 0
mov al, byte [ebp - 0x1d]
push eax
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp + 0x14]
mov edx, 4
mov eax, dword [ebp - 4]
call fcn.004fe8ec
call sub.kernel32.dll_GetCurrentThreadId_1
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x21b0]
jne 0x51ba46
mov eax, dword [ebp - 4]
mov byte [eax + 0x37d], 1
lea eax, [ebp - 0x1c]
mov edx, 0x51bcc4
call fcn.00405358
cmp byte [ebp - 0x1d], 0
je 0x51ba8b
push dword [ebp - 0x1c]
push 0x51bcdc
mov eax, dword [ebp - 0x24]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x44]
call fcn.0040a4d8
mov edx, dword [ebp - 0x44]
lea eax, [ebp - 0x40]
call fcn.004054d0
push dword [ebp - 0x40]
lea eax, [ebp - 0x1c]
mov edx, 3
call fcn.004055cc
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3b8]
call fcn.004b2214
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jl 0x51bab6
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3b8]
mov ecx, dword [eax]
call dword [ecx + 0x4c]
cmp dword [ebp - 8], 1
jne 0x51bb78
cmp dword [ebp - 0xc], 0
je 0x51bad0
cmp dword [ebp - 0xc], 2
jne 0x51bb78
mov eax, dword [ebp + 0x10]
push eax
push 0
mov al, byte [ebp - 0x1d]
push eax
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp + 0x14]
mov edx, 0x10
mov eax, dword [ebp - 4]
call fcn.004fe8ec
call sub.kernel32.dll_GetCurrentThreadId_1
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x21b0]
jne 0x51bb08
mov eax, dword [ebp - 4]
mov byte [eax + 0x37d], 0
lea eax, [ebp - 0x1c]
mov edx, 0x51bce4
call fcn.00405358
cmp byte [ebp - 0x1d], 0
je 0x51bb4d
push dword [ebp - 0x1c]
push 0x51bcdc
mov eax, dword [ebp - 0x24]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x4c]
call fcn.0040a4d8
mov edx, dword [ebp - 0x4c]
lea eax, [ebp - 0x48]
call fcn.004054d0
push dword [ebp - 0x48]
lea eax, [ebp - 0x1c]
mov edx, 3
call fcn.004055cc
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3b8]
call fcn.004b2214
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jl 0x51bb78
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3b8]
mov ecx, dword [eax]
call dword [ecx + 0x4c]
cmp dword [ebp - 8], 2
jne 0x51bc20
cmp dword [ebp - 0xc], 0
je 0x51bb92
cmp dword [ebp - 0xc], 2
jne 0x51bc20
mov eax, dword [ebp + 0x10]
push eax
push 0
mov al, byte [ebp - 0x1d]
push eax
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp + 0x14]
mov edx, 0x40
mov eax, dword [ebp - 4]
call fcn.004fe8ec
lea eax, [ebp - 0x1c]
mov edx, 0x51bcfc
call fcn.00405358
cmp byte [ebp - 0x1d], 0
je 0x51bbf5
push dword [ebp - 0x1c]
push 0x51bcdc
mov eax, dword [ebp - 0x24]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x54]
call fcn.0040a4d8
mov edx, dword [ebp - 0x54]
lea eax, [ebp - 0x50]
call fcn.004054d0
push dword [ebp - 0x50]
lea eax, [ebp - 0x1c]
mov edx, 3
call fcn.004055cc
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3b8]
call fcn.004b2214
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jl 0x51bc20
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3b8]
mov ecx, dword [eax]
call dword [ecx + 0x4c]
cmp byte [ebp + 0xc], 0
je 0x51bc3c
mov eax, dword [ebp - 4]
cmp dword [eax + 0x3ac], 2
jne 0x51bc3c
mov dl, 1
mov eax, dword [ebp - 4]
call fcn.004fde6c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51bcb9
lea eax, [ebp - 0x54]
call fcn.00404acc
lea eax, [ebp - 0x50]
call fcn.004052f4
lea eax, [ebp - 0x4c]
call fcn.00404acc
lea eax, [ebp - 0x48]
call fcn.004052f4
lea eax, [ebp - 0x44]
call fcn.00404acc
lea eax, [ebp - 0x40]
call fcn.004052f4
lea eax, [ebp - 0x3c]
call fcn.00404acc
lea eax, [ebp - 0x38]
call fcn.004052f4
lea eax, [ebp - 0x34]
call fcn.00404acc
lea eax, [ebp - 0x30]
call fcn.004052f4
lea eax, [ebp - 0x2c]
call fcn.00404acc
lea eax, [ebp - 0x28]
call fcn.004052f4
lea eax, [ebp - 0x1c]
call fcn.004052f4
ret