Function at 0x40dd40
Capabilities:
Get keyboard layout
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x459962
mov eax, dword fs:[0]
push eax
sub esp, 0x358
mov eax, dword [0x46f080]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push 0x200
mov dword [ebp - 0x35c], eax
mov dword [ebp - 0x360], eax
lea eax, [ebp - 0x310]
push 0
push eax
mov dword [ebp - 0x364], 0
call fcn.00435b30
push 0x100
lea eax, [ebp - 0x110]
push 0
push eax
call fcn.00435b30
add esp, 0x18
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardState]
push 0
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
push 0
push 0x100
lea eax, [ebp - 0x310]
push eax
lea eax, [ebp - 0x110]
push eax
push 0
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_ToUnicodeEx]
xorps xmm0, xmm0
mov dword [ebp - 0x318], 0
lea ecx, [ebp - 0x310]
mov dword [ebp - 0x314], 0
movups xmmword [ebp - 0x328], xmm0
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40de20
sub ecx, edx
lea eax, [ebp - 0x310]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x328]
call fcn.004061a0
cmp dword [ebp - 0x314], 7
lea edi, [ebp - 0x328]
mov esi, dword [ebp - 0x318]
cmova edi, dword [ebp - 0x328]
mov dword [ebp - 4], 0
cmp esi, 1
jne 0x40dec4
mov edx, 0x45dad8
test esi, esi
je 0x40de87
sub edi, edx
movzx ecx, word [edi + edx]
movzx eax, word [edx]
cmp cx, ax
jne 0x40dec4
add edx, 2
sub esi, 1
jne 0x40de73
push 2
xorps xmm0, xmm0
mov dword [ebp - 0x330], 0
push 0x45dacc
lea ecx, [ebp - 0x340]
mov dword [ebp - 0x32c], 0
movups xmmword [ebp - 0x340], xmm0
call fcn.004061a0
lea ecx, [ebp - 0x340]
mov eax, 1
jmp 0x40dedd
lea eax, [ebp - 0x328]
push eax
lea ecx, [ebp - 0x358]
call fcn.00407580
mov ecx, eax
mov eax, 2
mov edi, dword [ebp - 0x35c]
xorps xmm0, xmm0
mov esi, dword [ebp - 0x328]
xor edx, edx
or eax, 4
movups xmmword [edi], xmm0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
movups xmm0, xmmword [ecx]
movups xmmword [edi], xmm0
movq xmm0, qword [ecx + 0x10]
movq qword [edi + 0x10], xmm0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 7
mov word [ecx], dx
test al, 2
je 0x40df41
and eax, 0xfffffffd
lea ecx, [ebp - 0x358]
mov dword [ebp - 0x35c], eax
call fcn.00409120
mov eax, dword [ebp - 0x35c]
test al, 1
je 0x40df81
mov ecx, dword [ebp - 0x32c]
cmp ecx, 7
jbe 0x40df81
mov edx, dword [ebp - 0x340]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40df77
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dfd6
push ecx
push edx
call fcn.00433d61
add esp, 8
mov eax, dword [ebp - 0x314]
cmp eax, 7
jbe 0x40dfb7
lea ecx, [eax*2 + 2]
mov eax, esi
cmp ecx, 0x1000
jb 0x40dfad
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dfdb
push ecx
push esi
call fcn.00433d61
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00433fc5
mov esp, ebp
pop ebp
ret 8
call fcn.00438c9f
call fcn.00438c9f
int3