Function at 0x50c470
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffbc
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x2c], ecx
mov byte [ebp - 1], dl
mov esi, eax
xor eax, eax
push ebp
push 0x50c766
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [0x51e16c], 0x7fffffff
mov byte [ebp - 9], 0
mov byte [ebp - 2], 0
mov byte [ebp - 3], 0
mov byte [ebp - 4], 0
mov byte [ebp - 5], 0
xor ebx, ebx
mov eax, esi
call fcn.00409f50
mov edi, eax
cmp edi, dword [0x51e16c]
jle 0x50c4c8
mov edi, dword [0x51e16c]
test edi, edi
je 0x50c750
cmp edi, ebx
jle 0x50c745
xor eax, eax
mov al, byte [esi + ebx]
cmp eax, 0x2b
jg 0x50c4f6
je 0x50c542
sub eax, 0x25
je 0x50c529
sub eax, 3
je 0x50c50e
dec eax
je 0x50c518
jmp 0x50c703
sub eax, 0x5e
je 0x50c55b
sub eax, 0x1d
je 0x50c574
sub eax, 3
je 0x50c6ea
jmp 0x50c703
mov byte [ebp - 2], 1
inc ebx
jmp 0x50c73d
mov byte [ebp - 2], 0
push ebp
call fcn.0050c40c
pop ecx
inc ebx
jmp 0x50c73d
mov byte [ebp - 5], 1
push ebp
xor ecx, ecx
mov dx, 1
mov al, 0x12
call fcn.0050c110
pop ecx
inc ebx
jmp 0x50c73d
mov byte [ebp - 3], 1
push ebp
xor ecx, ecx
mov dx, 1
mov al, 0x10
call fcn.0050c110
pop ecx
inc ebx
jmp 0x50c73d
mov byte [ebp - 4], 1
push ebp
xor ecx, ecx
mov dx, 1
mov al, 0x11
call fcn.0050c110
pop ecx
inc ebx
jmp 0x50c73d
mov word [ebp - 0xe], 1
cmp byte [esi + ebx + 1], 0x7b
jne 0x50c5b1
mov word [ebp - 8], 0xdb
lea eax, [ebp - 7]
mov dl, 1
call fcn.0050c0c0
push ebp
mov cl, 1
mov dx, 1
mov ax, word [ebp - 8]
call fcn.0050c244
pop ecx
push ebp
call fcn.0050c40c
pop ecx
add ebx, 3
jmp 0x50c73d
mov byte [ebp - 0x23], 0
mov byte [ebp - 0xa], 0
cmp edi, ebx
jl 0x50c5ef
inc ebx
cmp byte [esi + ebx], 0x7d
jne 0x50c5cb
mov byte [ebp - 0xa], 1
inc ebx
jmp 0x50c5ef
mov al, byte [esi + ebx]
call fcn.00402bd4
mov edx, eax
lea eax, [ebp - 0x28]
mov byte [eax + 1], dl
mov byte [eax], 1
lea edx, [ebp - 0x28]
lea eax, [ebp - 0x23]
mov cl, 0x14
call fcn.00403090
cmp edi, ebx
jge 0x50c5bd
cmp byte [ebp - 0xa], 0
jne 0x50c604
mov eax, 0x50c778
call fcn.0050c09c
jmp 0x50c750
cmp byte [esi + ebx], 0x7d
jne 0x50c638
mov word [ebp - 8], 0xdd
lea eax, [ebp - 7]
mov dl, 1
call fcn.0050c0c0
push ebp
mov cl, 1
mov dx, 1
mov ax, word [ebp - 8]
call fcn.0050c244
pop ecx
push ebp
call fcn.0050c40c
pop ecx
inc ebx
jmp 0x50c73d
lea edx, [ebp - 0x23]
mov eax, 0x50c784
call fcn.00402b90
mov byte [ebp - 0xb], al
cmp byte [ebp - 0xb], 0
je 0x50c6a7
lea eax, [ebp - 0x44]
push eax
xor ecx, ecx
mov cl, byte [ebp - 0x23]
xor eax, eax
mov al, byte [ebp - 0xb]
sub ecx, eax
xor edx, edx
mov dl, byte [ebp - 0xb]
inc edx
lea eax, [ebp - 0x23]
call fcn.004029a0
lea edx, [ebp - 0x44]
lea eax, [ebp - 0x2c]
call fcn.00404cb0
mov eax, dword [ebp - 0x2c]
call fcn.00409850
mov word [ebp - 0xe], ax
lea eax, [ebp - 0x44]
push eax
xor ecx, ecx
mov cl, byte [ebp - 0xb]
dec ecx
mov edx, 1
lea eax, [ebp - 0x23]
call fcn.004029a0
lea edx, [ebp - 0x44]
lea eax, [ebp - 0x23]
mov cl, 0x14
call fcn.004030cc
cmp byte [ebp - 0x23], 1
jne 0x50c6bc
mov al, byte [ebp - 0x22]
push eax
call sub.user32.dll_VkKeyScanA
mov word [ebp - 8], ax
jmp 0x50c6c8
lea eax, [ebp - 0x23]
call fcn.0050c31c
mov word [ebp - 8], ax
cmp word [ebp - 8], 0xffff
je 0x50c73d
push ebp
mov cl, 1
mov dx, word [ebp - 0xe]
mov ax, word [ebp - 8]
call fcn.0050c244
pop ecx
push ebp
call fcn.0050c40c
pop ecx
jmp 0x50c73d
push ebp
mov cl, 1
mov dx, 1
mov al, 0xd
call fcn.0050c110
pop ecx
push ebp
call fcn.0050c40c
pop ecx
inc ebx
jmp 0x50c73d
mov al, byte [esi + ebx]
push eax
call sub.user32.dll_VkKeyScanA
mov word [ebp - 8], ax
cmp word [ebp - 8], 0xffff
je 0x50c732
push ebp
mov cl, 1
mov dx, 1
mov ax, word [ebp - 8]
call fcn.0050c244
pop ecx
push ebp
call fcn.0050c40c
pop ecx
jmp 0x50c73c
mov eax, 0x50c788
call fcn.0050c09c
inc ebx
cmp edi, ebx
jg 0x50c4d8
mov byte [ebp - 9], 1
push ebp
call fcn.0050c40c
pop ecx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50c76d
lea eax, [ebp - 0x2c]
call fcn.00404a4c
ret