Function at 0x1012935
Capabilities:
Log keystrokes
Log keystrokes via polling

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x30
push edi
mov edi, dword [ebp + 8]
test edi, edi
je 0x1012cc4
push esi
mov esi, dword [ebp + 0xc]
mov eax, 0x2000
mov dword [ebp - 0xc], eax
cmp esi, eax
ja 0x101295c
mov dword [ebp - 0xc], esi
mov ecx, dword [ebp - 0xc]
mov eax, dword fs:[0x18]
imul ecx, ecx, 0xa0
mov eax, dword [eax + 0x30]
push ebx
push ecx
push dword [0x1038030]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov ebx, eax
mov dword [ebp - 0x30], ebx
test ebx, ebx
je 0x1012cc2
and dword [ebp - 0x10], 0
mov dword [ebp - 0x18], edi
test esi, esi
jbe 0x1012cad
mov eax, esi
sub eax, dword [ebp - 0x10]
cmp dword [ebp - 0xc], eax
jbe 0x10129a8
mov dword [ebp - 0xc], eax
xor ecx, ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 8], ecx
cmp dword [ebp - 0xc], ecx
ja 0x10129bc
jmp 0x1012c8d
xor ecx, ecx
mov eax, dword [ebp - 0x18]
movzx eax, word [eax]
mov dword [ebp - 0x14], eax
cmp ax, 0xa
jne 0x10129e3
cmp dword [ebp - 0x1c], ecx
jne 0x10129d5
cmp dword [ebp - 0x10], ecx
je 0x10129e3
mov edx, dword [ebp - 0x18]
cmp word [edx - 2], 0xd
je 0x1012c73
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x28], ecx
cmp ax, cx
je 0x1012c8a
push eax
call dword [sym.imp.USER32.dll_VkKeyScanW]
xor esi, esi
inc esi
cmp byte [section..data], 0
movzx ecx, ax
je 0x1012a46
cmp cx, 0xffff
jne 0x1012b3b
lea eax, [ebp - 0x2c]
push eax
push esi
lea eax, [ebp - 0x14]
push eax
push 4
call dword [sym.imp.KERNEL32.dll_GetStringTypeW]
test dword [ebp - 0x2c], 0x8000
jne 0x1012a44
push dword [ebp - 0x14]
push dword [0x1038334]
push dword [0x1038268]
call fcn.0100a3b1
test eax, eax
je 0x1012a50
xor ecx, ecx
cmp cx, 0xffff
jne 0x1012b3b
push esi
lea eax, [ebp - 1]
push eax
push esi
lea eax, [ebp - 0x14]
push eax
push dword [0x1038334]
call fcn.0101c260
push 0xa
lea eax, [ebp - 0x20]
push eax
movzx eax, byte [ebp - 1]
push eax
call dword [sym.imp.msvcrt.dll__itoa]
add esp, 0xc
inc dword [ebp - 8]
mov eax, esi
mov word [ebx], ax
mov word [ebx + 8], ax
xor eax, eax
mov word [ebx + 0xe], ax
push 0x12
pop eax
mov word [ebx + 0xa], ax
push 0x38
pop eax
mov word [ebx + 0xc], ax
lea eax, [ebp - 0x20]
mov dword [ebx + 4], esi
mov dword [ebx + 0x10], 2
mov dword [ebp + 8], eax
mov al, byte [ebp - 0x20]
add ebx, 0x14
jmp 0x1012b18
cbw
add ax, 0x30
movzx edi, ax
movzx eax, di
push 0
push eax
call dword [sym.imp.USER32.dll_MapVirtualKeyW]
mov ecx, esi
mov word [ebx], cx
mov word [ebx + 8], cx
mov dword [ebx + 4], esi
mov word [ebx + 0xa], di
movzx eax, ax
mov word [ebx + 0xc], ax
xor ecx, ecx
mov word [ebx + 0xe], cx
add ebx, 0x14
push 2
pop ecx
add dword [ebp - 8], ecx
mov dword [ebx - 4], ecx
and dword [ebx + 4], 0
mov edx, esi
mov word [ebx], dx
mov word [ebx + 8], dx
xor edx, edx
mov word [ebx + 0xc], ax
mov word [ebx + 0xe], dx
mov word [ebx + 0xa], di
mov dword [ebx + 0x10], ecx
add ebx, 0x14
inc dword [ebp + 8]
mov eax, dword [ebp + 8]
mov al, byte [eax]
test al, al
jne 0x1012ab1
and dword [ebx + 4], 0
mov eax, esi
mov word [ebx], ax
mov word [ebx + 8], si
mov ax, word [ebp - 0x14]
push 0x12
mov word [ebx + 0xe], ax
pop eax
push 0x38
jmp 0x1012c60
mov eax, ecx
shr eax, 8
mov dl, al
and dl, 6
mov byte [ebp + 0xb], al
cmp dl, 6
jne 0x1012b76
mov eax, esi
mov word [ebx], ax
mov word [ebx + 8], ax
xor eax, eax
push 0x12
mov word [ebx + 0xe], ax
pop eax
push 0x38
mov word [ebx + 0xa], ax
pop eax
mov dword [ebp - 0x24], esi
mov word [ebx + 0xc], ax
mov dword [ebx + 0x10], 0x109
jmp 0x1012b9f
test al, 1
je 0x1012ba8
mov eax, esi
mov word [ebx], ax
mov word [ebx + 8], ax
xor eax, eax
push 0x10
mov word [ebx + 0xe], ax
pop eax
mov edx, eax
push 0x2a
mov word [ebx + 0xa], dx
pop edx
mov dword [ebp - 0x28], esi
mov word [ebx + 0xc], dx
mov dword [ebx + 0x10], eax
inc dword [ebp - 8]
mov dword [ebx + 4], esi
add ebx, 0x14
inc dword [ebp - 8]
mov eax, esi
mov word [ebx], ax
mov word [ebx + 8], ax
mov dword [ebx + 4], esi
mov ax, word [ebp - 0x14]
mov word [ebx + 0xe], ax
movzx ax, cl
mov word [ebx + 0xa], ax
movzx eax, ax
push 0
push eax
call dword [sym.imp.USER32.dll_MapVirtualKeyW]
mov word [ebx + 0xc], ax
lea eax, [ebx + 0x10]
and dword [eax], 0
test byte [ebp + 0xb], 1
je 0x1012be9
mov dword [eax], 0x10
test byte [ebp + 0xb], 2
je 0x1012bf2
or dword [eax], 8
test byte [ebp + 0xb], 4
je 0x1012bfa
or dword [eax], esi
add ebx, 0x14
inc dword [ebp - 8]
push 5
lea esi, [ebx - 0x14]
mov edi, ebx
pop ecx
xor eax, eax
rep movsd dword es:[edi], dword [esi]
mov dword [ebx + 4], eax
add ebx, 0x14
cmp dword [ebp - 0x24], eax
je 0x1012c42
mov dword [ebx + 4], eax
inc eax
xor ecx, ecx
mov word [ebx + 8], ax
inc ecx
xor eax, eax
push 0x12
mov word [ebx + 0xe], ax
pop eax
push 0x38
mov word [ebx + 0xa], ax
pop eax
mov word [ebx], cx
mov word [ebx + 0xc], ax
mov dword [ebx + 0x10], 0x100
jmp 0x1012c6d
cmp dword [ebp - 0x28], eax
je 0x1012c73
and dword [ebx + 4], 0
xor eax, eax
inc eax
mov word [ebx], ax
mov word [ebx + 8], ax
xor eax, eax
push 0x10
mov word [ebx + 0xe], ax
pop eax
push 0x2a
mov word [ebx + 0xa], ax
pop eax
mov word [ebx + 0xc], ax
and dword [ebx + 0x10], 0
inc dword [ebp - 8]
add ebx, 0x14
add dword [ebp - 0x18], 2
inc dword [ebp - 0x1c]
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp + 0xc]
cmp eax, dword [ebp - 0xc]
jae 0x1012c8d
jmp 0x10129ba
mov dword [ebp - 0x10], esi
push dword [ebp - 8]
mov ebx, dword [ebp - 0x30]
push ebx
push 0x10381e0
call fcn.01004647
mov eax, dword [ebp - 0xc]
add dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], esi
jb 0x101299b
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push ebx
push 0
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
pop ebx
pop esi
pop edi
leave
ret 8