Function at 0x312d9c7c
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc4
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov edi, edx
mov ebx, eax
test edi, edi
je 0x312d9c99
cmp edi, 0xffffffff
jne 0x312d9d48
mov eax, dword [ebx + 0x90]
test eax, eax
je 0x312d9ce0
cmp byte [eax + 0x1eb], 0
je 0x312d9ce0
cmp dword [eax + 0x1c8], 0
je 0x312d9ce0
lea ecx, [ebp - 0x24]
mov eax, dword [eax + 0x1c8]
mov edx, ebx
mov esi, dword [eax]
call dword [esi + 0x14]
push 2
lea eax, [ebp - 0x24]
push eax
push 0
mov eax, dword [ebx + 0x90]
call fcn.312e1c94
push eax
call sub.user32.dll_GetKeyState
jmp 0x312d9d0c
mov eax, dword [ebx + 0x40]
mov dword [ebp - 0x24], eax
mov eax, dword [ebx + 0x44]
mov dword [ebp - 0x20], eax
mov esi, dword [ebx + 0x34]
test esi, esi
je 0x312d9d0c
lea ecx, [ebp - 0x2c]
lea edx, [ebp - 0x24]
mov eax, esi
call fcn.312d8748
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x20], eax
mov eax, ebx
call fcn.312d8cd8
push eax
lea eax, [ebp - 0x3c]
push eax
mov eax, ebx
call fcn.312d8cec
mov ecx, eax
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x24]
call fcn.3123ab3c
lea esi, [ebp - 0x3c]
lea edi, [ebp - 0x24]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea edx, [ebp - 0x24]
mov eax, ebx
call fcn.312d9e68
mov byte [ebp - 5], al
jmp 0x312d9e59
mov eax, ebx
call fcn.312da2c0
cmp dword [ebx + 0x90], 0
je 0x312d9d73
mov eax, dword [ebx + 0x90]
mov ecx, ebx
mov edx, edi
mov si, 0xffbd
call fcn.31235348
test al, al
jne 0x312d9d73
xor eax, eax
jmp 0x312d9d75
mov al, 1
mov byte [ebp - 5], al
cmp byte [ebp - 5], 0
je 0x312d9e59
mov ecx, ebx
mov dl, 1
mov eax, dword [0x312caa18]
call fcn.312d5e70
mov dword [ebp - 0xc], eax
xor edx, edx
push ebp
push 0x312d9e52
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebx + 0x90]
test eax, eax
je 0x312d9db4
call fcn.312e1c94
mov esi, eax
jmp 0x312d9db6
xor esi, esi
lea edx, [ebp - 0x24]
mov eax, ebx
call fcn.312d85dc
test esi, esi
je 0x312d9dd2
push 2
lea eax, [ebp - 0x24]
push eax
push 0
push esi
call sub.user32.dll_GetKeyState
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x14], edi
mov eax, dword [ebp - 0xc]
movzx edx, byte [ebp + 8]
mov byte [eax + 0x5c], dl
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
mov dword [eax + 0x60], edx
mov eax, dword [ebp - 0xc]
push edi
lea edi, [eax + 0x4c]
lea esi, [ebp - 0x24]
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 edi
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x10], eax
push 1
lea eax, [ebp - 0x14]
push eax
mov eax, edi
call fcn.312e1c94
push eax
push 0
call sub.user32.dll_GetKeyState
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0xc]
mov eax, edi
mov si, 0xffb5
call fcn.31235348
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x312d9e59
mov eax, dword [ebp - 0xc]
call fcn.312350bc
ret
movzx eax, byte [ebp - 5]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4