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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x15c
push ebx
mov bl, dl
mov dword [esp + 0x18], edx
push esi
mov esi, dword [ebp + 8]
movzx eax, bl
or ax, si
push edi
mov edi, ecx
je 0x41abc6
mov eax, dword [ebp + 0x14]
mov ecx, 0xffc3d44d
test eax, eax
cmovne ecx, eax
mov dword [esp + 0x1c], ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, dword [0x4fc3f4]
sete bh
cmp dword [0x4fe348], 0
je 0x41a638
mov byte [esp + 0x12], 1
test bh, bh
je 0x41a63d
mov byte [esp + 0x12], 0
cmp dword [0x4fe348], 1
je 0x41a64a
test bh, bh
je 0x41a64e
mov byte [ebp + 0x10], 0
test bl, bl
jne 0x41a664
mov ecx, esi
call fcn.0041e2b0
mov edx, dword [ebp + 8]
mov bl, al
mov byte [esp + 0x20], bl
jmp 0x41a67b
mov edx, dword [ebp + 8]
test dx, dx
jne 0x41a67b
xor dl, dl
mov cl, bl
call fcn.0041de90
movzx edx, ax
mov dword [ebp + 8], edx
mov eax, edx
mov byte [esp + 0x28], dl
xor ecx, ecx
shr eax, 8
test al, al
setne cl
cmp dword [0x4fe348], 2
mov dword [esp + 0x2c], ecx
jne case.default.0x41a6a5
movzx eax, bl
add eax, 0xffffff60
cmp eax, 5
ja case.default.0x41a6a5
jmp dword [eax*4 + 0x41abd0]
mov bl, 0x11
jmp 0x41a6b6
mov bl, 0x10
jmp 0x41a6b6
mov bl, 0x12
mov byte [esp + 0x20], bl
cmp dword [ebp + 0xc], 0
je 0x41a7e8
push 0
mov cl, bl
call fcn.0041d290
add esp, 4
test al, al
je 0x41a784
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardState]
test edi, edi
jne 0x41a6f1
movzx eax, bl
or byte [esp + eax + 0x38], 0x80
jmp 0x41a6fe
cmp edi, 1
jne 0x41a6fe
movzx eax, bl
and byte [esp + eax + 0x38], 0x7f
movzx eax, bl
add eax, 0xffffff60
cmp eax, 5
ja case.default.0x41a70b
jmp dword [eax*4 + 0x41abe8]
test byte [esp + 0xda], 0x80
jne 0x41a72d
test byte [esp + 0xdb], 0x80
jne 0x41a72d
and byte [esp + 0x49], 0x7f
jmp case.default.0x41a70b
or byte [esp + 0x49], 0x80
jmp case.default.0x41a70b
test byte [esp + 0xd8], 0x80
jne 0x41a74f
test byte [esp + 0xd9], 0x80
jne 0x41a74f
and byte [esp + 0x48], 0x7f
jmp case.default.0x41a70b
or byte [esp + 0x48], 0x80
jmp case.default.0x41a70b
test byte [esp + 0xdc], 0x80
jne 0x41a771
test byte [esp + 0xdd], 0x80
jne 0x41a771
and byte [esp + 0x4a], 0x7f
jmp case.default.0x41a70b
or byte [esp + 0x4a], 0x80
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
movzx esi, dx
shl esi, 0x10
cmp edi, 1
je 0x41a7a7
mov eax, esi
or eax, 1
push eax
movzx eax, bl
push eax
push 0x100
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_PostMessageA]
cmp byte [ebp + 0x10], 0
je 0x41a7c2
cmp edi, 2
jne 0x41a7c2
mov ecx, dword [0x4f898c]
mov ecx, dword [ecx + 0x64]
call fcn.0041c540
jmp 0x41a7ca
test edi, edi
je 0x41ab9b
or esi, 0xc0000001
movzx eax, bl
push esi
push eax
push 0x101
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_PostMessageA]
jmp 0x41ab9b
cmp byte [0x4fba00], 0
mov dword [0x4fe2d0], edi
mov byte [0x4fe2d4], bl
je 0x41a828
cmp bl, 0x12
je 0x41a80c
cmp bl, 0xa4
je 0x41a80c
cmp bl, 0xa5
jne 0x41a828
test bh, bh
jne 0x41a828
push 0
mov byte [esp + 0x1b], 1
call dword [sym.imp.USER32.dll_BlockInput]
mov edx, dword [ebp + 8]
mov byte [0x4fba00], bh
jmp 0x41a82d
mov byte [esp + 0x17], 0
test bh, bh
lea esi, [esp + 0x34]
mov eax, 0x4fe32c
cmove esi, eax
mov al, byte [esp + 0x12]
mov dword [esp + 0x30], esi
cmp bl, 0xa5
jne 0x41a91d
test al, al
jne 0x41a91d
cmp dword [0x4fb988], 0
je 0x41a91d
mov byte [esp + 0x16], 1
mov byte [esp + 0x13], 1
test bh, bh
jne 0x41a87a
mov eax, dword [0x4fe328]
mov dword [esp + 0x24], eax
jmp 0x41a8e2
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov ecx, eax
xor eax, eax
test ecx, ecx
je 0x41a8cc
push eax
push ecx
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
lea ecx, [esp + 0x138]
mov dword [esp + 0x18], eax
push ecx
push eax
mov dword [esp + 0x140], 0x30
call dword [sym.imp.USER32.dll_GetGUIThreadInfo]
test eax, eax
je 0x41a8c8
mov eax, dword [esp + 0x144]
test eax, eax
je 0x41a8c8
push 0
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
jmp 0x41a8cc
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
xor edx, edx
mov dword [esp + 0x24], eax
mov ecx, eax
call fcn.0041d560
mov dword [esi], eax
cmp dword [esi], 0
je 0x41a8f6
mov cl, byte [esp + 0x11]
mov byte [esp + 0x13], 0
mov byte [esp + 0x14], cl
jmp 0x41a969
push 0xa2
mov byte [esp + 0x18], 0xa2
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
shr eax, 0xf
and eax, 0xffffff01
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x1c]
mov dword [0x4fc2d0], eax
jmp 0x41a971
mov byte [esp + 0x16], 0
mov byte [esp + 0x13], 0
test al, al
je 0x41a959
push 0
mov cl, bl
call fcn.0041d290
mov ecx, dword [esp + 0x2c]
add esp, 4
mov dword [esp + 0x24], ecx
mov cl, byte [esp + 0x11]
mov byte [esp + 0x15], al
mov al, byte [esp + 0x11]
mov byte [esp + 0x14], cl
mov cl, byte [esp + 0x15]
mov dword [esp + 0x18], eax
jmp 0x41a97a
mov eax, dword [esp + 0x28]
mov dword [esp + 0x24], eax
mov al, byte [esp + 0x11]
mov byte [esp + 0x14], al
mov al, byte [esp + 0x11]
mov dword [esp + 0x18], eax
mov edx, dword [ebp + 8]
xor cl, cl
mov byte [esp + 0x15], cl
test bh, bh
jne 0x41a99d
mov eax, dword [0x4fe348]
cmp eax, 2
je 0x41a99d
cmp dword [0x4fb988], 0
je 0x41a996
cmp eax, 1
jne 0x41a99d
mov byte [esp + 0x11], 1
jmp 0x41a9a2
mov byte [esp + 0x11], 0
mov bh, byte [esp + 0x12]
cmp edi, 1
je 0x41aa73
test bh, bh
je 0x41a9cb
push dword [esp + 0x1c]
push dword [esp + 0x30]
push edx
mov dl, bl
call fcn.0041bf40
add esp, 0xc
jmp 0x41aa5a
cmp byte [esp + 0x16], 0
je 0x41a9e4
mov eax, dword [0x4fc2cc]
cmp dword [esi], 3
cmove eax, dword [esp + 0x1c]
mov dword [0x4fc2cc], eax
push dword [esp + 0x1c]
push dword [esp + 0x30]
push dword [esp + 0x30]
push dword [esp + 0x2c]
call dword [sym.imp.USER32.dll_keybd_event]
cmp byte [esp + 0x13], 0
mov dword [0x4fc2cc], 0
je 0x41aa5a
cmp dword [0x4fc2d0], 0
mov byte [esp + 0x13], 0
je 0x41aa2a
mov dword [0x4fc2d0], 0
mov edx, 4
jmp 0x41aa4f
cmp byte [esp + 0x18], 0
jne 0x41aa5a
movzx eax, byte [esp + 0x14]
push eax
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
mov ecx, 0x8000
and ax, cx
movzx edx, ax
neg edx
sbb edx, edx
add edx, 4
mov ecx, dword [esp + 0x24]
call fcn.0041d560
mov dword [esi], eax
cmp byte [esp + 0x11], 0
mov esi, dword [ebp + 8]
je 0x41aa76
push esi
mov dl, bl
xor cl, cl
call fcn.0041c750
add esp, 4
jmp 0x41aa76
mov esi, dword [ebp + 8]
cmp byte [ebp + 0x10], 0
je 0x41aaa2
cmp edi, 2
jne 0x41aaa2
mov eax, dword [0x4f898c]
cmp dword [0x4fe348], edi
jne 0x41aa98
mov ecx, dword [eax + 0x68]
call fcn.0041c540
jmp 0x41aaaa
mov ecx, dword [eax + 0x64]
call fcn.0041c540
jmp 0x41aaaa
test edi, edi
je 0x41ab85
mov ecx, dword [esp + 0x2c]
or ecx, 2
test bh, bh
je 0x41aad2
push dword [esp + 0x1c]
mov dl, bl
push ecx
mov cl, byte [esp + 0x1d]
push esi
call fcn.0041bf40
mov edi, dword [esp + 0x3c]
add esp, 0xc
jmp 0x41ab5b
cmp byte [esp + 0x16], 0
mov edi, dword [esp + 0x30]
je 0x41aaef
mov eax, dword [0x4fc2c8]
cmp dword [edi], 3
cmove eax, dword [esp + 0x1c]
mov dword [0x4fc2c8], eax
push dword [esp + 0x1c]
push ecx
push dword [esp + 0x30]
push dword [esp + 0x2c]
call dword [sym.imp.USER32.dll_keybd_event]
cmp byte [esp + 0x13], 0
mov dword [0x4fc2c8], 0
je 0x41ab5b
cmp dword [0x4fc2d0], 0
je 0x41ab2d
mov dword [0x4fc2d0], 0
mov edx, 4
jmp 0x41ab50
cmp byte [esp + 0x18], 0
je 0x41ab5b
movzx eax, byte [esp + 0x14]
push eax
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
bt ax, 0xf
mov edx, 0
setb dl
add edx, 3
mov ecx, dword [esp + 0x24]
call fcn.0041d560
mov dword [edi], eax
cmp dword [edi], 0
je 0x41ab71
mov eax, 0x138
cmp si, ax
jne 0x41ab71
and byte [0x4fe33c], 0xfe
cmp byte [esp + 0x11], 0
je 0x41ab85
push esi
mov dl, bl
mov cl, 1
call fcn.0041c750
add esp, 4
cmp byte [esp + 0x17], 0
je 0x41ab9b
push 1
call dword [sym.imp.USER32.dll_BlockInput]
mov byte [0x4fba00], 1
cmp byte [ebp + 0x10], 0
je 0x41abc6
cmp dword [0x4fe348], 2
mov eax, dword [0x4f898c]
jne 0x41abbe
mov ecx, dword [eax + 0x60]
call fcn.0041c540
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [eax + 0x5c]
call fcn.0041c540
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret