Function at 0x493660
Capabilities:
Log keystrokes via polling

Disassembly:
mov al, byte [0x64c460]
sub esp, 0xf8
test al, al
je 0x493990
mov ecx, dword [0x64c668]
push ebx
push ebp
xor eax, eax
cmp ecx, eax
push esi
push edi
mov byte [0x64c461], 0
mov word [0x64c562], ax
mov word [0x64c564], ax
je 0x4937ef
mov ebp, 1
mov dword [esp + 0x10], ebp
mov eax, 0x64c488
mov edx, 0x6d
lea ecx, [ecx]
cmp byte [eax + 0x6d], 1
jne 0x4936bb
mov byte [eax], 0
jmp 0x4936d4
mov cl, byte [eax]
test cl, cl
jbe 0x4936d4
movzx ecx, cl
inc ecx
cmp ecx, 0xff
jle 0x4936d2
mov ecx, 0xff
mov byte [eax], cl
inc eax
dec edx
jne 0x4936b0
mov ecx, 0x1b
xor eax, eax
mov edi, 0x64c4f5
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov edi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
mov bl, 2
nop
mov eax, dword [0x64c668]
mov ecx, dword [eax]
push 0
lea edx, [esp + 0x14]
push edx
lea edx, [esp + 0x1c]
push edx
push 0x14
push eax
call dword [ecx + 0x28]
test eax, eax
jg 0x4937ae
je 0x49373a
cmp eax, 0x8007000c
je 0x493725
cmp eax, 0x8007001e
jne 0x4937b3
mov eax, dword [0x64c668]
mov dword [esp + 0x10], 0
mov ecx, dword [eax]
push eax
call dword [ecx + 0x1c]
jmp 0x4937a2
cmp dword [esp + 0x10], ebp
jne 0x4937ef
mov edx, dword [esp + 0x14]
mov si, word [edx*2 + 0x5fa378]
cmp si, 0xffff
je 0x4936f0
cmp si, 0x1e
jne 0x49376d
push 0x12
call edi
test ah, ah
jns 0x49376d
mov byte [0x64c4a6], 0
jmp 0x4937a2
mov al, byte [esp + 0x18]
test al, al
movsx eax, si
jns 0x493781
mov byte [eax + 0x64c488], 1
jmp 0x4937a2
cmp byte [eax + 0x64c488], 1
jne 0x49379b
test byte [0x6ad4aa], bl
jne 0x49379b
mov byte [eax + 0x64c4f5], 1
jmp 0x4937a2
mov byte [eax + 0x64c488], 0
cmp dword [esp + 0x10], ebp
je 0x4936f0
jmp 0x4937ef
mov ecx, eax
dec ecx
je 0x4937c3
push str.IDirectInputDevice_GetDeviceData__mouse_
push eax
call fcn.00495040
add esp, 8
jmp 0x4937ef
push str.keyboard_buffer_overflow
push ebp
call fcn.00495040
mov eax, dword [0x64c668]
add esp, 8
push 0
lea edx, [esp + 0x14]
push edx
push 0
push 0x14
mov dword [esp + 0x20], 0xffffffff
mov ecx, dword [eax]
push eax
call dword [ecx + 0x28]
mov eax, dword [0x64c66c]
test eax, eax
je 0x49388b
mov ecx, dword [0x6b46a0]
test ecx, ecx
jne 0x49388b
mov ecx, dword [eax]
lea edx, [esp + 0x14]
push edx
push 0x14
push eax
call dword [ecx + 0x24]
mov esi, eax
cmp esi, 0x8007000c
je 0x493850
cmp esi, 0x8007001e
je 0x493850
test esi, esi
je 0x49383d
push str.GetDeviceState__mouse_
push esi
call fcn.00495040
add esp, 8
jmp 0x49385b
push 0x64c674
lea ecx, [esp + 0x18]
call fcn.00494ab0
add esp, 4
jmp 0x49388b
mov eax, dword [0x64c66c]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x1c]
test esi, esi
jge 0x49388b
xor edx, edx
mov dword [0x64c674], edx
mov dword [0x64c678], edx
mov dword [0x64c67c], edx
mov dword [0x64c680], edx
mov dword [0x64c684], edx
mov dword [0x64c688], edx
mov dword [0x64c68c], edx
mov eax, dword [0x6b46a0]
xor ebp, ebp
test eax, eax
jne 0x49398c
mov ebx, 0x64c6d0
nop
cmp ebx, 0x64d8d0
jge 0x49398c
mov ecx, dword [0x64c6ac]
movsx eax, bp
cmp eax, ecx
jge 0x493978
lea eax, [eax + eax*8]
shl eax, 6
cmp dword [eax + 0x64c900], 0xffffffff
setne al
test al, al
je 0x493978
mov eax, dword [ebp*4 + 0x64c6b0]
test eax, eax
je 0x493978
mov ecx, dword [eax]
mov edi, dword [ebx + 0x230]
push eax
call dword [ecx + 0x64]
mov esi, eax
test esi, esi
jl 0x49390f
mov eax, dword [ebp*4 + 0x64c6b0]
mov edx, dword [eax]
lea ecx, [esp + 0x28]
push ecx
push 0xe0
push eax
call dword [edx + 0x24]
mov esi, eax
cmp esi, 0x8007000c
je 0x49394f
cmp esi, 0x8007001e
je 0x49394f
test esi, esi
je 0x493933
push str.Poll_GetDeviceState__gamepad_
push esi
call fcn.00495040
add esp, 8
jmp 0x49395c
lea edx, [edi + edi*4]
shl edx, 5
add edx, 0x64d8d0
push edx
lea eax, [esp + 0x2c]
push eax
call fcn.00494ec0
add esp, 8
jmp 0x493978
mov eax, dword [ebp*4 + 0x64c6b0]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x1c]
test esi, esi
jge 0x493978
lea edi, [edi + edi*4]
shl edi, 5
add edi, 0x64d8d0
mov ecx, 0x28
mov esi, 0x64db60
rep movsd dword es:[edi], dword [esi]
mov eax, dword [0x6b46a0]
inc ebp
add ebx, 0x240
test eax, eax
je 0x4938a0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xf8
ret