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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14c
push ebx
mov dword [esp + 0xc], edx
mov bl, byte [esp + 0xc]
mov edx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 8]
push edi
movzx eax, bl
mov edi, ecx
or ax, si
mov dword [esp + 0x1c], edi
je 0x41a20a
test edx, edx
mov eax, 0xffc3d44d
cmovne eax, edx
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, dword [0x4ef148]
sete bh
cmp dword [0x4f09b0], 0
je 0x419dbe
mov byte [esp + 0x11], 1
test bh, bh
je 0x419dc3
mov byte [esp + 0x11], 0
cmp dword [0x4f09b0], 1
je 0x419dd0
test bh, bh
je 0x419dd4
mov byte [ebp + 0x10], 0
mov edx, dword [ebp + 8]
test bl, bl
jne 0x419e24
movzx ecx, dx
movzx eax, dx
sub ecx, 0x45
je 0x419e1c
sub ecx, 0xf1
je 0x419df3
sub ecx, 0xf
jne 0x419df6
movzx eax, dl
test eax, 0x100
je 0x419e05
movzx eax, al
or eax, 0xe000
push 3
movzx eax, ax
push eax
call dword [sym.imp.USER32.dll_MapVirtualKeyW]
mov edx, dword [ebp + 8]
mov bl, al
mov byte [esp + 0x14], bl
jmp 0x419e38
mov bl, 0x13
mov byte [esp + 0x14], bl
jmp 0x419e38
test dx, dx
jne 0x419e38
xor dl, dl
mov cl, bl
call fcn.0041d3f0
movzx edx, ax
mov dword [ebp + 8], edx
mov eax, edx
mov byte [esp + 0x24], dl
xor ecx, ecx
shr eax, 8
test al, al
setne cl
cmp dword [0x4f09b0], 2
mov dword [esp + 0x20], ecx
jne case.default.0x419e62
movzx eax, bl
add eax, 0xffffff60
cmp eax, 5
ja case.default.0x419e62
jmp dword [eax*4 + 0x41a214]
mov bl, 0x11
jmp 0x419e73
mov bl, 0x10
jmp 0x419e73
mov bl, 0x12
mov byte [esp + 0x14], bl
cmp dword [ebp + 0xc], 0
je 0x419ff8
push 0
mov cl, bl
call fcn.0041c6d0
add esp, 4
test al, al
je 0x419f91
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardState]
test edi, edi
jne 0x419eae
movzx eax, bl
or byte [esp + eax + 0x28], 0x80
jmp 0x419ebb
cmp edi, 1
jne 0x419ebb
movzx eax, bl
and byte [esp + eax + 0x28], 0x7f
movzx edi, bl
lea eax, [edi - 0xa0]
cmp eax, 5
ja case.default.0x419ecd
jmp dword [eax*4 + 0x41a22c]
test byte [esp + 0xca], 0x80
jne 0x419f00
test byte [esp + 0xcb], 0x80
jne 0x419f00
and byte [esp + 0x39], 0x7f
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
jmp 0x419f94
or byte [esp + 0x39], 0x80
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
jmp 0x419f94
test byte [esp + 0xc8], 0x80
jne 0x419f3e
test byte [esp + 0xc9], 0x80
jne 0x419f3e
and byte [esp + 0x38], 0x7f
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
jmp 0x419f94
or byte [esp + 0x38], 0x80
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
jmp 0x419f94
test byte [esp + 0xcc], 0x80
jne 0x419f7c
test byte [esp + 0xcd], 0x80
jne 0x419f7c
and byte [esp + 0x3a], 0x7f
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
jmp 0x419f94
or byte [esp + 0x3a], 0x80
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
jmp 0x419f94
movzx edi, bl
mov eax, dword [esp + 0x1c]
mov ebx, dword [sym.imp.USER32.dll_PostMessageW]
movzx esi, dx
shl esi, 0x10
cmp eax, 1
je 0x419fbe
mov eax, esi
or eax, 1
push eax
push edi
push 0x100
push dword [ebp + 0xc]
call ebx
mov eax, dword [esp + 0x1c]
cmp byte [ebp + 0x10], 0
je 0x419fd9
cmp eax, 2
jne 0x419fd9
mov ecx, dword [0x4ea828]
mov ecx, dword [ecx + 0x6c]
call fcn.0041b900
jmp 0x419fe1
test eax, eax
je 0x41a1df
or esi, 0xc0000001
push esi
push edi
push 0x101
push dword [ebp + 0xc]
call ebx
jmp 0x41a1df
mov dword [0x4f0938], edi
mov byte [0x4f093c], bl
test bh, bh
je 0x41a065
call dword [sym.imp.USER32.dll_GetForegroundWindow]
xor esi, esi
test eax, eax
je 0x41a052
push esi
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov esi, eax
mov dword [esp + 0x128], 0x30
lea eax, [esp + 0x128]
push eax
push esi
call dword [sym.imp.USER32.dll_GetGUIThreadInfo]
test eax, eax
je 0x41a052
mov eax, dword [esp + 0x134]
test eax, eax
je 0x41a052
push 0
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov esi, eax
push esi
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov ecx, eax
call fcn.0041ca10
mov edx, dword [ebp + 8]
jmp 0x41a06a
mov eax, dword [0x4f0994]
mov esi, dword [0x4ef014]
mov dword [esp + 0x1c], eax
cmp bl, 0xa5
jne 0x41a0b0
cmp eax, 3
mov al, byte [esp + 0x11]
jne 0x41a0b4
test al, al
jne 0x41a0b4
test esi, esi
je 0x41a0b4
mov byte [esp + 0x12], 1
xor cl, cl
mov byte [esp + 0x13], cl
test bh, bh
jne 0x41a0d1
mov eax, dword [0x4f09b0]
cmp eax, 2
je 0x41a0d1
test esi, esi
je 0x41a0ac
cmp eax, 1
jne 0x41a0d1
mov bh, 1
jmp 0x41a0d3
mov al, byte [esp + 0x11]
mov byte [esp + 0x12], 0
test al, al
je 0x41a08f
push 0
mov cl, bl
call fcn.0041c6d0
add esp, 4
mov byte [esp + 0x13], al
mov cl, al
jmp 0x41a095
xor bh, bh
cmp edi, 1
je 0x41a137
cmp byte [esp + 0x11], 0
je 0x41a0f4
push dword [esp + 0x18]
push dword [esp + 0x24]
push edx
mov dl, bl
call fcn.0041b3a0
add esp, 0xc
jmp 0x41a121
cmp byte [esp + 0x12], 0
mov eax, dword [esp + 0x18]
je 0x41a104
mov dword [0x4ef018], eax
push eax
push dword [esp + 0x24]
push dword [esp + 0x2c]
push dword [esp + 0x20]
call dword [sym.imp.USER32.dll_keybd_event]
mov dword [0x4ef018], 0
mov esi, dword [ebp + 8]
test bh, bh
je 0x41a13a
push esi
mov dl, bl
xor cl, cl
call fcn.0041bad0
add esp, 4
jmp 0x41a13a
mov esi, dword [ebp + 8]
cmp byte [ebp + 0x10], 0
je 0x41a166
cmp edi, 2
jne 0x41a166
mov eax, dword [0x4ea828]
cmp dword [0x4f09b0], edi
jne 0x41a15c
mov ecx, dword [eax + 0x70]
call fcn.0041b900
jmp 0x41a16a
mov ecx, dword [eax + 0x6c]
call fcn.0041b900
jmp 0x41a16a
test edi, edi
je 0x41a1df
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
or eax, 2
cmp byte [esp + 0x11], 0
je 0x41a18f
push ecx
mov cl, byte [esp + 0x17]
mov dl, bl
push eax
push esi
call fcn.0041b3a0
add esp, 0xc
jmp 0x41a1b6
cmp byte [esp + 0x12], 0
je 0x41a19c
mov dword [0x4ef018], ecx
push ecx
push eax
push dword [esp + 0x2c]
push dword [esp + 0x20]
call dword [sym.imp.USER32.dll_keybd_event]
mov dword [0x4ef018], 0
cmp dword [esp + 0x1c], 3
jne 0x41a1ce
mov eax, 0x138
cmp si, ax
jne 0x41a1ce
and byte [0x4f09a4], 0xfe
test bh, bh
je 0x41a1df
push esi
mov dl, bl
mov cl, 1
call fcn.0041bad0
add esp, 4
cmp byte [ebp + 0x10], 0
je 0x41a20a
cmp dword [0x4f09b0], 2
mov eax, dword [0x4ea828]
jne 0x41a202
mov ecx, dword [eax + 0x68]
call fcn.0041b900
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [eax + 0x64]
call fcn.0041b900
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret