Function at 0x51ce10
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffac
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x51d679
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.0047947c
mov eax, dword [ebp - 8]
cmp dword [eax + 0xc], 0
jne 0x51d65b
mov byte [ebp - 0x27], 0
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x278]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x274]
mov eax, dword [ebp - 4]
call fcn.0049d0a4
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0x3ad]
mov ebx, dword [ebp - 0x10]
cmp eax, ebx
jg 0x51d65b
cmp dword [ebp - 0xc], 0
jl 0x51d65b
mov edx, ebx
mov eax, dword [ebp - 4]
call fcn.00508e40
mov edx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2a8]
call fcn.00507134
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x118]
dec eax
mov esi, dword [ebp - 0xc]
cmp eax, esi
jne 0x51cf31
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xb8]
cmp dword [eax + 0x1c], 0
je 0x51cf31
mov ebx, dword [ebp - 0x10]
mov edx, ebx
mov eax, dword [ebp - 4]
call fcn.00508e40
mov edx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2a8]
call fcn.00507134
mov eax, dword [eax + 0xb8]
mov eax, dword [eax + 0x1c]
lea edx, [ebp - 0x3c]
call fcn.004741bc
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
add eax, 0x38
call fcn.004043d4
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
mov edx, ebx
mov eax, dword [ebp - 4]
call fcn.0051b7a4
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
lea esi, [ebp - 0x4c]
lea edi, [eax + 0x18]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
jmp 0x51d65b
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x118]
dec eax
cmp eax, dword [ebp - 0xc]
jne 0x51cf54
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xb8]
call fcn.00503548
test al, al
jne 0x51cf8a
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0x3ae]
cmp eax, dword [ebp - 0xc]
jg 0x51d65b
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2b0]
cmp byte [eax + 0x15], 0
je 0x51d65b
mov eax, dword [ebp - 0x14]
call fcn.005063a4
test al, al
je 0x51d65b
mov eax, dword [0x5608a8]
mov eax, dword [eax]
call fcn.004823b8
test eax, eax
jne 0x51d65b
push 0x11
call sub.user32.dll_GetKeyState
test ax, ax
jl 0x51d65b
lea eax, [ebp - 0x37]
push eax
mov ebx, dword [ebp - 0xc]
mov ecx, ebx
mov esi, dword [ebp - 0x10]
mov edx, esi
mov eax, dword [ebp - 4]
call fcn.0051b7a4
mov eax, dword [ebp - 4]
mov edi, dword [eax + 0x274]
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
call dword [edx + 0x6c]
test al, al
je 0x51d006
mov eax, dword [ebp - 4]
call fcn.00476b1c
mov edx, eax
sub edx, dword [ebp - 0x2f]
sub edx, dword [ebp - 0x37]
lea eax, [ebp - 0x37]
xor ecx, ecx
call fcn.00406a80
mov eax, dword [ebp - 4]
call fcn.00476b1c
mov edi, eax
mov eax, dword [ebp - 4]
sub edi, dword [eax + 0x274]
mov eax, dword [ebp - 0x14]
call fcn.00504464
add eax, dword [ebp - 0x37]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x118]
dec eax
cmp ebx, eax
jne 0x51d195
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xb8]
call fcn.0050357c
cmp eax, 2
jle 0x51d063
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xb8]
call fcn.0050357c
sub eax, 2
sub dword [ebp - 0x2f], eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xb8]
call fcn.0050357c
sub eax, 2
sub dword [ebp - 0x1c], eax
mov eax, dword [ebp - 4]
cmp byte [eax + 0x4b6], 1
jne 0x51d0c6
mov edx, esi
mov eax, dword [ebp - 4]
call fcn.00508e40
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x434]
mov eax, dword [edx + eax*8]
mov edx, dword [eax + 0x20]
lea eax, [ebp - 0x24]
call fcn.00404418
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0x3ad]
sub esi, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x434]
mov eax, dword [eax + esi*8]
push dword [eax + 0x10]
mov eax, dword [ebp - 0x2b]
pop edx
sub eax, edx
inc eax
mov dword [ebp - 0x33], eax
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x278]
jg 0x51d65b
jmp 0x51d0d7
lea edx, [ebp - 0x24]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xb8]
call fcn.00502e4c
mov eax, dword [ebp - 4]
cmp byte [eax + 0x4b6], 1
je 0x51d0ff
mov eax, dword [ebp - 4]
call fcn.005141d8
test eax, eax
jne 0x51d0ff
mov eax, dword [ebp - 4]
call fcn.005141f8
test eax, eax
jne 0x51d0ff
xor eax, eax
jmp 0x51d101
mov al, 1
mov byte [ebp - 0x25], al
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xb8]
call fcn.00502e24
mov byte [ebp - 0x26], al
mov eax, dword [ebp - 4]
cmp dword [eax + 0x2d8], 0
jne 0x51d136
mov dl, 1
mov eax, dword [0x428be0]
call fcn.0042a354
mov edx, dword [ebp - 4]
mov dword [edx + 0x2d8], eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xb8]
call fcn.00502e74
mov edx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2d8]
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2d8]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x208]
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xb8]
call fcn.0050379c
cmp al, 1
jne 0x51d4af
mov byte [ebp - 0x25], 0
lea eax, [ebp - 0x37]
call fcn.004fc024
jmp 0x51d4af
mov eax, dword [ebp - 4]
call fcn.0051ee10
mov edx, dword [ebp - 4]
movzx esi, byte [edx + 0x3ae]
add eax, esi
cmp ebx, eax
jge 0x51d3d0
mov byte [ebp - 0x27], 1
mov edx, ebx
sub edx, esi
mov eax, dword [ebp - 4]
call fcn.005172ec
xor eax, eax
push ebp
push 0x51d3c9
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0x24]
mov eax, dword [ebp - 0x14]
call fcn.0051cd40
mov eax, dword [ebp - 0x14]
call fcn.00506428
test al, al
je 0x51d21d
mov eax, dword [ebp - 0x14]
call fcn.00504464
mov ebx, eax
add ebx, dword [ebp - 0x37]
mov eax, dword [ebp - 0x14]
call fcn.00506a7c
sub ebx, eax
mov dword [ebp - 0x1c], ebx
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x2f]
jge 0x51d20e
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x2f], eax
cmp edi, dword [ebp - 0x2f]
jle 0x51d22b
lea eax, [ebp - 0x24]
call fcn.00404380
jmp 0x51d22b
mov eax, dword [ebp - 0x14]
call fcn.00504464
add eax, dword [ebp - 0x37]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4b8]
xor edx, edx
call fcn.005204b4
cmp eax, dword [ebp - 0x14]
jne 0x51d24b
mov eax, dword [ebp - 4]
call fcn.005198c8
add dword [ebp - 0x37], eax
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0x50], 0
je 0x51d26f
mov eax, dword [ebp - 0x14]
call fcn.00506f1c
test al, al
je 0x51d26f
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x50]
mov eax, dword [eax + 0x34]
add eax, 5
add dword [ebp - 0x37], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
mov eax, dword [eax + 0x28]
cmp eax, dword [ebp - 0x37]
jge 0x51d285
lea eax, [ebp - 0x24]
call fcn.00404380
mov eax, dword [ebp - 0x14]
call fcn.005041a4
mov byte [ebp - 0x26], al
mov eax, dword [ebp - 0x14]
call fcn.00504f6c
add al, 0xfc
sub al, 2
jae 0x51d2a2
mov byte [ebp - 0x26], 0
mov eax, dword [ebp - 0x14]
call fcn.00504c98
test al, al
je 0x51d2ba
mov eax, dword [ebp - 4]
cmp byte [eax + 0x3f1], 0
jne 0x51d2be
xor eax, eax
jmp 0x51d2c0
mov al, 1
mov byte [ebp - 0x25], al
mov eax, dword [ebp - 4]
cmp dword [eax + 0x2d8], 0
jne 0x51d2e4
mov dl, 1
mov eax, dword [0x428be0]
call fcn.0042a354
mov edx, dword [ebp - 4]
mov dword [edx + 0x2d8], eax
mov eax, dword [ebp - 0x14]
call fcn.0050433c
mov edx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2d8]
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x3f8]
mov eax, dword [ebp - 0x14]
call fcn.00506724
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x3f8]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x208]
mov eax, dword [eax + 0x14]
call fcn.0042ad0c
mov dword [ebx + 8], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2d8]
mov dword [ebx + 0x14], eax
mov al, byte [0x51d688]
mov byte [ebx + 0x24], al
mov al, byte [ebp - 0x26]
mov byte [ebx + 4], al
lea eax, [ebx + 0x28]
mov edx, dword [ebp - 0x24]
call fcn.004043d4
mov eax, dword [ebp - 0x10]
mov dword [ebx + 0x10], eax
mov eax, dword [ebp - 0xc]
mov dword [ebx + 0x20], eax
lea eax, [ebx + 8]
push eax
mov al, byte [ebx + 0x24]
push eax
mov ecx, dword [ebx + 0x14]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
mov si, 0xff91
call fcn.004036ec
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x3f8]
xor edx, edx
mov eax, dword [ebp - 0x14]
mov esi, dword [eax]
call dword [esi + 0x70]
lea eax, [ebp - 0x24]
mov edx, dword [ebx + 0x28]
call fcn.00404418
mov al, byte [ebx + 4]
mov byte [ebp - 0x26], al
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2d8]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x208]
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
call dword [ecx + 8]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51d4af
mov eax, dword [ebp - 4]
call fcn.00517330
ret
mov eax, dword [ebp - 4]
call fcn.005141a8
test eax, eax
jle 0x51d65b
mov eax, dword [ebp - 4]
call fcn.005141a8
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x24c]
sub edx, eax
dec edx
cmp edx, dword [ebp - 0xc]
jge 0x51d65b
mov eax, dword [ebp - 4]
call fcn.005141a8
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x24c]
sub edx, eax
push edx
mov edx, dword [ebp - 0xc]
pop eax
sub edx, eax
mov eax, dword [ebp - 0x14]
call fcn.00506400
mov ebx, eax
mov eax, dword [ebp - 4]
cmp dword [eax + 0x2d8], 0
jne 0x51d442
mov dl, 1
mov eax, dword [0x428be0]
call fcn.0042a354
mov edx, dword [ebp - 4]
mov dword [edx + 0x2d8], eax
mov eax, ebx
call fcn.0051fc14
mov edx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2d8]
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2d8]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x208]
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
call dword [ecx + 8]
mov al, byte [ebx + 0x31]
mov byte [ebp - 0x25], al
mov eax, ebx
call fcn.0051fbf4
mov byte [ebp - 0x26], al
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 4]
call fcn.005141a8
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x24c]
sub edx, eax
push edx
mov edx, dword [ebp - 0xc]
pop eax
sub edx, eax
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0x190]
cmp byte [ebp - 0x25], 0
je 0x51d4bc
mov ebx, 2
jmp 0x51d4be
xor ebx, ebx
cmp byte [ebp - 0x27], 0
je 0x51d4d6
mov eax, dword [ebp - 0x14]
call fcn.00504f6c
add al, 0xfc
sub al, 2
jae 0x51d4d6
mov al, 1
jmp 0x51d50c
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2e4]
push eax
mov eax, dword [ebp - 0x24]
push eax
lea eax, [ebp - 0x37]
push eax
mov al, byte [ebp - 0x25]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 4]
call fcn.00479450
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x208]
mov ecx, ebx
call fcn.004fc03c
mov edx, dword [ebp - 4]
cmp byte [edx + 0x2cc], 0
je 0x51d51f
mov esi, 2
jmp 0x51d524
mov esi, 1
mov edx, dword [ebp - 8]
mov edx, dword [edx + 8]
mov ebx, edx
test al, al
jne 0x51d549
cmp byte [ebp - 0x26], 1
jne 0x51d653
mov eax, dword [ebp - 0x1c]
sub eax, 2
cmp eax, dword [ebp - 0x2f]
jle 0x51d653
lea eax, [ebx + 0x38]
mov edx, dword [ebp - 0x24]
call fcn.004043d4
push esi
lea edi, [ebx + 0x18]
lea esi, [ebp - 0x37]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop esi
mov al, byte [ebp - 0x26]
sub al, 1
jb 0x51d572
je 0x51d591
dec al
je 0x51d5b6
jmp 0x51d5f7
lea ecx, [ebp - 0x54]
mov edx, dword [ebp - 0x33]
sub edx, esi
mov eax, dword [ebp - 0x37]
dec eax
call fcn.0040696c
mov eax, dword [ebp - 0x54]
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x50]
mov dword [ebx + 0xc], eax
jmp 0x51d5f7
lea ecx, [ebp - 0x54]
mov edx, dword [ebp - 0x33]
sub edx, esi
mov eax, dword [ebp - 0x1c]
inc eax
sub eax, dword [ebp - 0x18]
sub eax, 7
call fcn.0040696c
mov eax, dword [ebp - 0x54]
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x50]
mov dword [ebx + 0xc], eax
jmp 0x51d5f7
mov eax, dword [ebp - 0x1c]
inc eax
sub eax, dword [ebp - 0x18]
sub eax, 6
mov edx, dword [ebp - 0x18]
sar edx, 1
jns 0x51d5ca
adc edx, 0
add eax, edx
mov edx, dword [ebp - 0x1c]
sub edx, dword [ebp - 0x37]
sub edx, 4
sar edx, 1
jns 0x51d5dc
adc edx, 0
sub eax, edx
lea ecx, [ebp - 0x54]
mov edx, dword [ebp - 0x33]
sub edx, esi
call fcn.0040696c
mov eax, dword [ebp - 0x54]
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x50]
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
call dword [edx + 0x6c]
test al, al
je 0x51d611
mov eax, dword [ebp - 4]
call fcn.00476b1c
sub eax, dword [ebx + 8]
mov dword [ebx + 8], eax
lea ecx, [ebp - 0x54]
lea edx, [ebx + 8]
mov eax, dword [ebp - 4]
call fcn.00476c30
mov eax, dword [ebp - 0x54]
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x50]
mov dword [ebx + 0xc], eax
mov eax, dword [0x5076c8]
mov dword [ebx + 4], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2d8]
mov dword [ebx + 0x3c], eax
cmp byte [ebp - 0x25], 0
je 0x51d65b
mov eax, dword [ebp - 0x2f]
sub eax, dword [ebp - 0x37]
sub eax, 4
mov dword [ebx + 0x10], eax
jmp 0x51d65b
lea eax, [ebx + 0x38]
call fcn.00404380
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51d680
lea eax, [ebp - 0x3c]
call fcn.00404380
lea eax, [ebp - 0x24]
call fcn.00404380
ret