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

Disassembly:
sub esp, 0x17c
push ebx
push ebp
push esi
push edi
mov edi, dword [0x4e7cc0]
xor al, al
mov dword [esp + 0x14], ecx
mov bh, dl
mov dword [esp + 0x10], eax
test edi, edi
je 0x410c97
mov ebp, dword [esp + 0x190]
nop dword [eax + eax]
cmp dword [edi], 1
jne 0x410c8c
mov bl, byte [edi + 0x3c]
test bl, bl
je 0x410bfc
mov eax, dword [ecx + 0x10]
dec bl
mov esi, 0xffc3d44d
mov ecx, 0x65
sub esi, eax
lea edx, [eax + 0x3c2c17]
movzx eax, bl
cmp edx, 0x66
cmovbe ecx, esi
cmp ecx, eax
mov eax, dword [esp + 0x10]
jle 0x410c88
cmp byte [esp + 0x194], 0
je 0x410c75
mov eax, dword [edi + 8]
test eax, eax
je 0x410c50
cmp dword [eax + 0x374], 0
je 0x410c50
movzx ecx, bp
movzx esi, bh
mov al, byte [ecx + edi + 0x154]
mov dl, byte [esi + edi + 0x54]
or al, dl
test al, 0x20
jne 0x410c38
cmp byte [edi + 0x42], 0
je 0x410c50
test dl, 0x40
jne 0x410c50
shl ecx, 0x10
or ecx, esi
push ecx
push edi
push 0x41e
push dword [0x4e7ccc]
call dword [sym.imp.USER32.dll_PostMessageW]
movzx ecx, bp
mov al, byte [ecx + edi + 0x154]
test al, al
js 0x410d69
movzx ecx, bh
mov al, byte [ecx + edi + 0x54]
test al, al
js 0x410d56
mov eax, dword [esp + 0x10]
cmp byte [edi + 0x3f], 0
mov ecx, 1
movzx eax, al
cmovne eax, ecx
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x14]
mov edi, dword [edi + 4]
test edi, edi
jne 0x410bc0
cmp byte [esp + 0x194], 0
jne 0x41111c
mov dl, byte [0x4e8005]
mov bl, 1
test dl, 0xcf
je 0x410cca
test al, al
jne 0x410cca
test dl, 0xc
setne cl
test dl, 3
setne al
and cl, al
neg cl
sbb cl, cl
and bl, cl
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov ebp, eax
xor esi, esi
test ebp, ebp
je 0x410d0b
mov edi, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
push esi
push ebp
call edi
mov esi, eax
mov dword [esp + 0x24], 0x30
lea eax, [esp + 0x24]
push eax
push esi
call dword [sym.imp.USER32.dll_GetGUIThreadInfo]
test eax, eax
je 0x410d0b
mov eax, dword [esp + 0x30]
test eax, eax
je 0x410d0b
push 0
push eax
call edi
mov esi, eax
push esi
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov dword [esp + 0x10], eax
cmp dword [0x4e98c4], ebp
je 0x410d7f
push 0x1c
lea eax, [esp + 0x158]
mov dword [0x4e98c4], ebp
push eax
push ebp
call dword [sym.imp.USER32.dll_GetClassNameW]
lea eax, [esp + 0x154]
push str.ApplicationFrameWindow
push eax
call fcn.0049eae1
add esp, 8
test eax, eax
sete al
mov byte [0x4e98c1], al
jmp 0x410d84
and al, 0x7f
mov byte [ecx + edi + 0x54], al
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x17c
ret
and al, 0x7f
mov byte [ecx + edi + 0x154], al
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x17c
ret
mov al, byte [0x4e98c1]
xor ecx, ecx
lea edi, [esp + 0x54]
cmp byte [0x4e98c0], 0
mov esi, 0x4e7f00
mov dword [esp + 0x18], ecx
mov word [esp + 0x1c], cx
mov ecx, 0x40
rep movsd dword es:[edi], dword [esi]
mov esi, dword [sym.imp.USER32.dll_ToUnicodeEx]
je 0x410e2d
test al, al
je 0x410e2d
cmp bh, 0xe7
je 0x410e2d
mov dl, byte [0x4e98be]
lea ecx, [esp + 0x54]
mov al, byte [0x4e98bf]
neg dl
sbb dl, dl
and dl, 0x20
neg al
sbb al, al
and al, 9
or dl, al
call fcn.0041c2a0
mov edi, dword [esp + 0x10]
lea eax, [esp + 0x18]
push edi
push 0
push 2
push eax
lea eax, [esp + 0x64]
push eax
movzx eax, word [0x4e98bc]
push eax
movzx eax, byte [0x4e98c0]
push eax
call esi
test eax, eax
jle 0x410e24
push edi
push 0
push 2
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x64]
push eax
movzx eax, word [0x4e98bc]
push eax
movzx eax, byte [0x4e98c0]
push eax
call esi
mov byte [0x4e98c0], 0
jmp 0x410e31
mov edi, dword [esp + 0x10]
mov dl, byte [0x4e8005]
lea ecx, [esp + 0x54]
call fcn.0041c2a0
push 0x14
call dword [sym.imp.USER32.dll_GetKeyState]
test al, 1
je 0x410e53
or byte [esp + 0x68], 1
jmp 0x410e58
and byte [esp + 0x68], 0xfe
cmp bh, 0xe7
jne 0x410e71
mov eax, dword [esp + 0x14]
mov esi, 1
mov ax, word [eax + 4]
mov word [esp + 0x18], ax
jmp 0x410ee7
test bl, bl
je 0x410ec7
xor eax, eax
cmp dword [0x4e7ca4], eax
push edi
setne al
push eax
push 2
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x64]
push eax
mov eax, dword [esp + 0x28]
push dword [eax + 4]
movzx eax, bh
push eax
call esi
test byte [0x4e8005], 3
mov esi, eax
jne 0x410ec9
cmp word [esp + 0x18], 0xd
mov eax, 0xa
jne 0x410eb8
mov word [esp + 0x18], ax
cmp word [esp + 0x1a], 0xd
jne 0x410ec9
mov word [esp + 0x1a], ax
jmp 0x410ec9
xor esi, esi
cmp bh, 8
jne 0x410ee7
test esi, esi
je 0x410ee7
cmp byte [0x4e98c1], 0
je 0x410ee6
xor esi, esi
mov byte [0x4e98c0], 0
jmp 0x410ee7
dec esi
push ecx
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push esi
push eax
push dword [esp + 0x19c]
mov dl, bh
call fcn.00411560
add esp, 0x10
test al, al
je 0x410d72
cmp byte [0x4e98c0], 0
je 0x410f52
test esi, esi
jle 0x410f52
mov bl, 1
cmp dword [0x4e8054], 0
je 0x41103a
cmp byte [esp + 0x198], 0
jne 0x41103a
movzx eax, bh
add eax, 0xfffffff8
cmp eax, 0x20
ja case.0x410f4b.9
movzx eax, byte [eax + 0x411138]
jmp dword [eax*4 + 0x41112c]
xor bl, bl
test esi, esi
jns 0x410f1a
mov eax, dword [esp + 0x190]
mov word [0x4e98bc], ax
mov al, byte [0x4e8005]
test al, 0x30
mov byte [0x4e98c0], bh
push edi
setne byte [0x4e98be]
test al, 0xc
setne cl
test al, 3
setne al
and cl, al
xor eax, eax
cmp dword [0x4e7ca4], eax
mov byte [0x4e98bf], cl
setne al
push eax
push 2
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x64]
push eax
mov eax, dword [esp + 0x28]
push dword [eax + 4]
movzx eax, bh
mov ebx, dword [sym.imp.USER32.dll_ToUnicodeEx]
push eax
call ebx
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x17c
ret
cmp dword [0x4e7db4], 0
je case.0x410f4b.9
xor eax, eax
mov word [0x4e7db8], ax
jmp 0x410ff4
cmp byte [0x4e8005], 0
jne case.0x410f4b.9
mov eax, dword [0x4e7db4]
test eax, eax
je case.0x410f4b.9
dec eax
xor ecx, ecx
mov word [eax*2 + 0x4e7db8], cx
mov dword [0x4e7db4], eax
test esi, esi
jle 0x41103a
push dword [esp + 0x1a4]
lea edx, [esp + 0x1c]
push dword [esp + 0x1a4]
push dword [esp + 0x1a4]
push ebp
mov ebp, dword [esp + 0x24]
mov ecx, ebp
push esi
call fcn.00411160
add esp, 0x14
test al, al
jne 0x41103e
pop edi
pop esi
pop ebp
mov byte [0x4e98c0], al
pop ebx
add esp, 0x17c
ret
mov ebp, dword [esp + 0x14]
test bl, bl
je 0x41111c
xor eax, eax
movzx ecx, bh
cmp dword [0x4e7ca4], eax
mov ebx, dword [sym.imp.USER32.dll_ToUnicodeEx]
push edi
setne al
mov dword [esp + 0x24], ecx
push eax
push 2
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x64]
push eax
push dword [ebp + 4]
push ecx
call ebx
mov ebp, eax
test ebp, ebp
jns 0x41109e
xor ecx, ecx
lea eax, [esp + 0x10]
cmp dword [0x4e7ca4], ecx
push edi
setne cl
push ecx
push 2
push eax
lea eax, [esp + 0x64]
push eax
mov eax, dword [esp + 0x28]
push dword [eax + 4]
push dword [esp + 0x38]
call ebx
cmp ebp, esi
jne 0x4110bd
mov eax, dword [esp + 0x10]
mov ecx, 0xa
cmp ax, 0xd
je 0x4110b4
movzx ecx, ax
movzx eax, word [esp + 0x18]
cmp eax, ecx
je 0x41111c
push 0x100
lea eax, [esp + 0x58]
push 0
push eax
call fcn.0049d3f0
mov dl, byte [0x4e98be]
lea ecx, [esp + 0x60]
mov al, byte [0x4e98bf]
add esp, 0xc
neg dl
sbb dl, dl
and dl, 0x20
neg al
sbb al, al
and al, 9
or dl, al
call fcn.0041c2a0
push edi
push 0
push 2
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x64]
push eax
movzx eax, word [0x4e98bc]
push eax
movzx eax, byte [0x4e98c0]
push eax
call ebx
mov byte [0x4e98c0], 0
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x17c
ret