Function at 0x50fed0
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 9
push 0
push 0
dec ecx
jne 0x50fed9
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 0x510446
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
cmp dword [eax + 0x654], 0
jbe 0x50ff13
mov eax, dword [ebp - 4]
cmp dword [eax + 0x658], 2
je 0x50ff17
xor eax, eax
jmp 0x50ff19
mov al, 1
mov byte [ebp - 0x19], al
cmp byte [ebp + 8], 0
je 0x50ff26
mov byte [ebp - 0x19], 0
cmp byte [ebp - 0x19], 0
jne 0x50ff52
mov eax, dword [ebp - 4]
cmp byte [eax + 0x37d], 0
je 0x50ff52
cmp dword [ebp - 8], 0
jne 0x50ff47
mov dword [ebp - 8], 1
jmp 0x50ff52
cmp dword [ebp - 8], 1
jne 0x50ff52
xor eax, eax
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 9
jne 0x50ff74
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov al, byte [ebp - 0x19]
push eax
mov ecx, dword [ebp + 0x10]
mov edx, 0x800
mov eax, dword [ebp - 4]
call fcn.004fa1d8
cmp dword [ebp - 8], 0
jne 0x510033
cmp dword [ebp - 0xc], 0
je 0x50ff8e
cmp dword [ebp - 0xc], 1
jne 0x510033
push 1
call sub.user32.dll_GetAsyncKeyState
movsx eax, ax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
push eax
push 0
mov al, byte [ebp - 0x19]
push eax
mov ecx, dword [ebp + 0x10]
mov edx, 2
mov eax, dword [ebp - 4]
call fcn.004fa1d8
cmp dword [ebp - 0x14], 0
jne 0x50ffc2
push 1
call sub.user32.dll_GetAsyncKeyState
lea eax, [ebp - 0x18]
mov edx, 0x510458
call fcn.00405514
cmp byte [ebp - 0x19], 0
je 0x51000d
push dword [ebp - 0x18]
push 0x510470
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x654]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x24]
call fcn.0040a6d4
mov edx, dword [ebp - 0x24]
lea eax, [ebp - 0x20]
call fcn.0040567c
push dword [ebp - 0x20]
lea eax, [ebp - 0x18]
mov edx, 3
call fcn.00405778
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3b0]
call fcn.004b1734
test eax, eax
jge 0x510033
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3b0]
mov ecx, dword [eax]
call dword [ecx + 0x38]
cmp dword [ebp - 8], 1
jne 0x5100f2
cmp dword [ebp - 0xc], 0
je 0x51004d
cmp dword [ebp - 0xc], 1
jne 0x5100f2
push 2
call sub.user32.dll_GetAsyncKeyState
movsx eax, ax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
push eax
push 0
mov al, byte [ebp - 0x19]
push eax
mov ecx, dword [ebp + 0x10]
mov edx, 8
mov eax, dword [ebp - 4]
call fcn.004fa1d8
cmp dword [ebp - 0x14], 0
jne 0x510081
push 2
call sub.user32.dll_GetAsyncKeyState
lea eax, [ebp - 0x18]
mov edx, 0x510478
call fcn.00405514
cmp byte [ebp - 0x19], 0
je 0x5100cc
push dword [ebp - 0x18]
push 0x510470
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x654]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x2c]
call fcn.0040a6d4
mov edx, dword [ebp - 0x2c]
lea eax, [ebp - 0x28]
call fcn.0040567c
push dword [ebp - 0x28]
lea eax, [ebp - 0x18]
mov edx, 3
call fcn.00405778
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3b0]
call fcn.004b1734
test eax, eax
jge 0x5100f2
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3b0]
mov ecx, dword [eax]
call dword [ecx + 0x38]
cmp dword [ebp - 8], 2
jne 0x5101b1
cmp dword [ebp - 0xc], 0
je 0x51010c
cmp dword [ebp - 0xc], 1
jne 0x5101b1
push 4
call sub.user32.dll_GetAsyncKeyState
movsx eax, ax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
push eax
push 0
mov al, byte [ebp - 0x19]
push eax
mov ecx, dword [ebp + 0x10]
mov edx, 0x20
mov eax, dword [ebp - 4]
call fcn.004fa1d8
cmp dword [ebp - 0x14], 0
jne 0x510140
push 4
call sub.user32.dll_GetAsyncKeyState
lea eax, [ebp - 0x18]
mov edx, 0x510490
call fcn.00405514
cmp byte [ebp - 0x19], 0
je 0x51018b
push dword [ebp - 0x18]
push 0x510470
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x654]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x34]
call fcn.0040a6d4
mov edx, dword [ebp - 0x34]
lea eax, [ebp - 0x30]
call fcn.0040567c
push dword [ebp - 0x30]
lea eax, [ebp - 0x18]
mov edx, 3
call fcn.00405778
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3b0]
call fcn.004b1734
test eax, eax
jge 0x5101b1
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3b0]
mov ecx, dword [eax]
call dword [ecx + 0x38]
cmp dword [ebp - 0xc], 0
jne 0x5101be
push 0x14
call sub.kernel32.dll_Sleep_1
cmp dword [ebp - 8], 0
jne 0x510272
cmp dword [ebp - 0xc], 0
je 0x5101d8
cmp dword [ebp - 0xc], 2
jne 0x510272
mov eax, dword [ebp + 0xc]
push eax
push 0
mov al, byte [ebp - 0x19]
push eax
mov ecx, dword [ebp + 0x10]
mov edx, 4
mov eax, dword [ebp - 4]
call fcn.004fa1d8
mov eax, dword [ebp - 4]
mov byte [eax + 0x37f], 1
lea eax, [ebp - 0x18]
mov edx, 0x510458
call fcn.00405514
cmp byte [ebp - 0x19], 0
je 0x510247
push dword [ebp - 0x18]
push 0x510470
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x654]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x3c]
call fcn.0040a6d4
mov edx, dword [ebp - 0x3c]
lea eax, [ebp - 0x38]
call fcn.0040567c
push dword [ebp - 0x38]
lea eax, [ebp - 0x18]
mov edx, 3
call fcn.00405778
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3b0]
call fcn.004b1734
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jl 0x510272
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3b0]
mov ecx, dword [eax]
call dword [ecx + 0x4c]
cmp dword [ebp - 8], 1
jne 0x510326
cmp dword [ebp - 0xc], 0
je 0x51028c
cmp dword [ebp - 0xc], 2
jne 0x510326
mov eax, dword [ebp + 0xc]
push eax
push 0
mov al, byte [ebp - 0x19]
push eax
mov ecx, dword [ebp + 0x10]
mov edx, 0x10
mov eax, dword [ebp - 4]
call fcn.004fa1d8
mov eax, dword [ebp - 4]
mov byte [eax + 0x37f], 0
lea eax, [ebp - 0x18]
mov edx, 0x510478
call fcn.00405514
cmp byte [ebp - 0x19], 0
je 0x5102fb
push dword [ebp - 0x18]
push 0x510470
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x654]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x44]
call fcn.0040a6d4
mov edx, dword [ebp - 0x44]
lea eax, [ebp - 0x40]
call fcn.0040567c
push dword [ebp - 0x40]
lea eax, [ebp - 0x18]
mov edx, 3
call fcn.00405778
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3b0]
call fcn.004b1734
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jl 0x510326
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3b0]
mov ecx, dword [eax]
call dword [ecx + 0x4c]
cmp dword [ebp - 8], 2
jne 0x5103d0
cmp dword [ebp - 0xc], 0
je 0x510340
cmp dword [ebp - 0xc], 2
jne 0x5103d0
mov eax, dword [ebp + 0xc]
push eax
push 0
mov al, byte [ebp - 0x19]
push eax
mov ecx, dword [ebp + 0x10]
mov edx, 0x40
mov eax, dword [ebp - 4]
call fcn.004fa1d8
lea eax, [ebp - 0x18]
mov edx, 0x510490
call fcn.00405514
cmp byte [ebp - 0x19], 0
je 0x5103a5
push dword [ebp - 0x18]
push 0x510470
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x654]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x4c]
call fcn.0040a6d4
mov edx, dword [ebp - 0x4c]
lea eax, [ebp - 0x48]
call fcn.0040567c
push dword [ebp - 0x48]
lea eax, [ebp - 0x18]
mov edx, 3
call fcn.00405778
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3b0]
call fcn.004b1734
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jl 0x5103d0
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3b0]
mov ecx, dword [eax]
call dword [ecx + 0x4c]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51044d
lea eax, [ebp - 0x4c]
call fcn.00404c88
lea eax, [ebp - 0x48]
call fcn.004054b0
lea eax, [ebp - 0x44]
call fcn.00404c88
lea eax, [ebp - 0x40]
call fcn.004054b0
lea eax, [ebp - 0x3c]
call fcn.00404c88
lea eax, [ebp - 0x38]
call fcn.004054b0
lea eax, [ebp - 0x34]
call fcn.00404c88
lea eax, [ebp - 0x30]
call fcn.004054b0
lea eax, [ebp - 0x2c]
call fcn.00404c88
lea eax, [ebp - 0x28]
call fcn.004054b0
lea eax, [ebp - 0x24]
call fcn.00404c88
lea eax, [ebp - 0x20]
call fcn.004054b0
lea eax, [ebp - 0x18]
call fcn.004054b0
ret