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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x15c
mov al, byte [esp + 9]
push ebx
mov dword [esp + 0x20], eax
mov byte [esp + 0xf], al
mov al, byte [esp + 0xb]
mov dword [esp + 0x1c], edx
mov bl, byte [esp + 0x1c]
mov edx, dword [ebp + 0x14]
push esi
mov esi, dword [esp + 0x2c]
mov byte [esp + 0x12], al
push edi
mov edi, dword [ebp + 8]
movzx eax, bl
or ax, di
mov dword [esp + 0x1c], ecx
je 0x41c975
test edx, edx
mov eax, 0xffc3d44d
cmovne eax, edx
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, dword [0x4fc4fc]
sete bh
cmp dword [0x4fe928], 0
je 0x41c2b4
mov byte [esp + 0x12], 1
test bh, bh
je 0x41c2b9
mov byte [esp + 0x12], 0
cmp dword [0x4fe928], 1
je 0x41c2c6
test bh, bh
je 0x41c2ca
mov byte [ebp + 0x10], 0
test bl, bl
jne 0x41c2e0
mov ecx, edi
call fcn.0041fed0
mov edx, dword [ebp + 8]
mov bl, al
mov byte [esp + 0x24], bl
jmp 0x41c2f7
mov edx, dword [ebp + 8]
test dx, dx
jne 0x41c2f7
xor dl, dl
mov cl, bl
call fcn.0041fab0
movzx edx, ax
mov dword [ebp + 8], edx
mov eax, edx
mov byte [esp + 0x30], dl
xor ecx, ecx
shr eax, 8
test al, al
setne cl
cmp dword [0x4fe928], 2
mov dword [esp + 0x2c], ecx
jne case.default.0x41c321
movzx eax, bl
add eax, 0xffffff60
cmp eax, 5
ja case.default.0x41c321
jmp dword [eax*4 + 0x41c97c]
mov bl, 0x11
jmp 0x41c332
mov bl, 0x10
jmp 0x41c332
mov bl, 0x12
mov byte [esp + 0x24], bl
cmp dword [ebp + 0xc], 0
je 0x41c4bb
push 0
mov cl, bl
call fcn.0041ed80
add esp, 4
test al, al
je 0x41c454
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardState]
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x41c371
movzx eax, bl
or byte [esp + eax + 0x38], 0x80
jmp 0x41c37e
cmp eax, 1
jne 0x41c37e
movzx eax, bl
and byte [esp + eax + 0x38], 0x7f
movzx edi, bl
lea eax, [edi - 0xa0]
cmp eax, 5
ja case.default.0x41c390
jmp dword [eax*4 + 0x41c994]
test byte [esp + 0xda], 0x80
jne 0x41c3c3
test byte [esp + 0xdb], 0x80
jne 0x41c3c3
and byte [esp + 0x49], 0x7f
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
jmp 0x41c457
or byte [esp + 0x49], 0x80
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
jmp 0x41c457
test byte [esp + 0xd8], 0x80
jne 0x41c401
test byte [esp + 0xd9], 0x80
jne 0x41c401
and byte [esp + 0x48], 0x7f
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
jmp 0x41c457
or byte [esp + 0x48], 0x80
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
jmp 0x41c457
test byte [esp + 0xdc], 0x80
jne 0x41c43f
test byte [esp + 0xdd], 0x80
jne 0x41c43f
and byte [esp + 0x4a], 0x7f
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
jmp 0x41c457
or byte [esp + 0x4a], 0x80
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
jmp 0x41c457
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 0x41c481
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 0x41c49c
cmp eax, 2
jne 0x41c49c
mov ecx, dword [0x4f90f4]
mov ecx, dword [ecx + 0x64]
call fcn.0041e000
jmp 0x41c4a4
test eax, eax
je 0x41c845
or esi, 0xc0000001
push esi
push edi
push 0x101
push dword [ebp + 0xc]
call ebx
jmp 0x41c845
cmp byte [0x4fba6e], 0
mov eax, dword [esp + 0x1c]
mov dword [0x4fe8b0], eax
mov byte [0x4fe8b4], bl
je 0x41c4fe
cmp bl, 0x12
je 0x41c4e2
cmp bl, 0xa4
je 0x41c4e2
cmp bl, 0xa5
jne 0x41c4fe
test bh, bh
jne 0x41c4fe
push 0
mov byte [esp + 0x19], 1
call dword [sym.imp.USER32.dll_BlockInput]
mov edx, dword [ebp + 8]
mov byte [0x4fba6e], bh
jmp 0x41c503
mov byte [esp + 0x15], 0
mov ch, byte [esp + 0x12]
lea edi, [esp + 0x34]
test bh, bh
mov eax, 0x4fe90c
cmove edi, eax
mov dword [esp + 0x18], edi
cmp bl, 0xa5
jne 0x41c626
test ch, ch
jne 0x41c626
cmp dword [0x4fba08], 0
je 0x41c626
mov byte [esp + 0x10], 1
mov byte [esp + 0x11], 1
test bh, bh
jne 0x41c54d
mov esi, dword [0x4fe908]
jmp 0x41c5ad
call dword [sym.imp.USER32.dll_GetForegroundWindow]
xor esi, esi
test eax, eax
je 0x41c599
mov edi, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
push esi
push eax
call edi
mov esi, eax
mov dword [esp + 0x138], 0x30
lea eax, [esp + 0x138]
push eax
push esi
call dword [sym.imp.USER32.dll_GetGUIThreadInfo]
test eax, eax
je 0x41c595
mov eax, dword [esp + 0x144]
test eax, eax
je 0x41c595
push 0
push eax
call edi
mov esi, eax
mov edi, dword [esp + 0x18]
push esi
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov esi, eax
xor edx, edx
mov ecx, esi
call fcn.0041f0c0
mov dword [edi], eax
cmp dword [edi], 0
je 0x41c5f3
mov cl, byte [esp + 0x10]
mov byte [esp + 0x11], 0
mov edx, dword [ebp + 8]
xor ch, ch
mov byte [esp + 0x14], ch
test bh, bh
jne 0x41c681
mov eax, dword [0x4fe928]
cmp eax, 2
je 0x41c681
cmp dword [0x4fba08], 0
je 0x41c5ec
cmp eax, 1
jne 0x41c681
mov bh, 1
jmp 0x41c683
push 0xa2
mov byte [esp + 0x17], 0xa2
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
movzx ecx, ax
mov eax, dword [esp + 0x20]
shr ecx, 0xf
and ecx, 0xffffff01
mov dword [0x4fc3d8], eax
mov dword [esp + 0x28], ecx
mov cl, byte [esp + 0x10]
mov byte [esp + 0x10], cl
jmp 0x41c5bb
mov al, byte [esp + 0x16]
xor cl, cl
mov byte [esp + 0x13], al
mov al, byte [esp + 0x17]
mov byte [esp + 0x10], cl
mov byte [esp + 0x11], cl
mov dword [esp + 0x28], eax
test ch, ch
je 0x41c5bb
push 0
mov cl, bl
call fcn.0041ed80
mov ch, byte [esp + 0x15]
add esp, 4
mov cl, byte [esp + 0x10]
mov byte [esp + 0x14], al
mov al, byte [esp + 0x16]
mov byte [esp + 0x13], al
mov al, byte [esp + 0x17]
mov byte [esp + 0x11], ch
mov ch, byte [esp + 0x14]
mov dword [esp + 0x28], eax
mov byte [esp + 0x10], cl
jmp 0x41c5c4
xor bh, bh
mov eax, dword [esp + 0x1c]
cmp eax, 1
je 0x41c7cb
cmp byte [esp + 0x12], 0
je 0x41c6b1
push dword [esp + 0x20]
mov cl, ch
push dword [esp + 0x30]
push edx
mov dl, bl
call fcn.0041da00
add esp, 0xc
jmp 0x41c790
test cl, cl
je 0x41c6c7
mov eax, dword [0x4fc3d4]
cmp dword [edi], 3
cmove eax, dword [esp + 0x20]
mov dword [0x4fc3d4], eax
push dword [esp + 0x20]
push dword [esp + 0x30]
push dword [esp + 0x38]
push dword [esp + 0x30]
call dword [sym.imp.USER32.dll_keybd_event]
cmp byte [esp + 0x11], 0
mov dword [0x4fc3d4], 0
je 0x41c790
cmp dword [0x4fc3d8], 0
mov byte [esp + 0x11], 0
je 0x41c762
mov dword [0x4fc3d8], 0
xor ecx, ecx
nop dword [eax]
mov eax, dword [ecx*8 + 0x4fe8b8]
test eax, eax
je 0x41c725
cmp eax, esi
je 0x41c749
inc ecx
cmp ecx, 0xa
jl 0x41c710
cmp ecx, 0xa
mov eax, 9
cmovl eax, ecx
mov dword [eax*8 + 0x4fe8b8], esi
mov dword [eax*8 + 0x4fe8bc], 4
mov eax, 4
jmp 0x41c78e
mov eax, dword [ecx*8 + 0x4fe8bc]
test eax, eax
jne 0x41c78e
mov eax, 4
mov dword [ecx*8 + 0x4fe8bc], eax
jmp 0x41c78e
cmp byte [esp + 0x28], 0
jne 0x41c790
movzx eax, byte [esp + 0x13]
push eax
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
mov ecx, 0x8000
and ax, cx
mov ecx, esi
movzx edx, ax
neg edx
sbb edx, edx
add edx, 4
call fcn.0041f0c0
mov dword [edi], eax
mov edi, dword [ebp + 8]
test bh, bh
je 0x41c7a4
push edi
mov dl, bl
xor cl, cl
call fcn.0041e210
add esp, 4
mov eax, dword [esp + 0x1c]
cmp byte [ebp + 0x10], 0
je 0x41c7da
cmp eax, 2
jne 0x41c7da
cmp dword [0x4fe928], 2
mov eax, dword [0x4f90f4]
jne 0x41c7d0
mov ecx, dword [eax + 0x68]
call fcn.0041e000
jmp 0x41c7de
mov edi, dword [ebp + 8]
jmp 0x41c7a8
mov ecx, dword [eax + 0x64]
call fcn.0041e000
jmp 0x41c7de
test eax, eax
je 0x41c82f
mov edx, dword [esp + 0x2c]
or edx, 2
cmp byte [esp + 0x12], 0
je 0x41c870
push dword [esp + 0x20]
mov cl, byte [esp + 0x18]
push edx
push edi
mov dl, bl
call fcn.0041da00
add esp, 0xc
mov edx, dword [esp + 0x18]
cmp dword [edx], 0
je 0x41c81e
mov eax, 0x138
cmp di, ax
jne 0x41c81e
and byte [0x4fe91c], 0xfe
test bh, bh
je 0x41c82f
push edi
mov dl, bl
mov cl, 1
call fcn.0041e210
add esp, 4
cmp byte [esp + 0x15], 0
je 0x41c845
push 1
call dword [sym.imp.USER32.dll_BlockInput]
mov byte [0x4fba6e], 1
cmp byte [ebp + 0x10], 0
je 0x41c975
cmp dword [0x4fe928], 2
mov eax, dword [0x4f90f4]
jne 0x41c96d
mov ecx, dword [eax + 0x60]
call fcn.0041e000
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esp + 0x10], 0
je 0x41c88d
mov ecx, dword [esp + 0x18]
mov eax, dword [0x4fc3d0]
cmp dword [ecx], 3
cmove eax, dword [esp + 0x20]
mov dword [0x4fc3d0], eax
push dword [esp + 0x20]
push edx
push dword [esp + 0x38]
push dword [esp + 0x30]
call dword [sym.imp.USER32.dll_keybd_event]
cmp byte [esp + 0x11], 0
mov dword [0x4fc3d0], 0
je 0x41c804
cmp dword [0x4fc3d8], 0
je 0x41c934
mov dword [0x4fc3d8], 0
xor eax, eax
nop word [eax + eax]
mov ecx, dword [eax*8 + 0x4fe8b8]
test ecx, ecx
je 0x41c8e5
cmp ecx, esi
je 0x41c912
inc eax
cmp eax, 0xa
jl 0x41c8d0
cmp eax, 0xa
mov ecx, 9
cmovl ecx, eax
mov dword [ecx*8 + 0x4fe8b8], esi
mov dword [ecx*8 + 0x4fe8bc], 4
mov ecx, 4
mov edx, dword [esp + 0x18]
mov dword [edx], ecx
jmp 0x41c808
mov ecx, dword [eax*8 + 0x4fe8bc]
test ecx, ecx
jne 0x41c907
mov edx, dword [esp + 0x18]
mov ecx, 4
mov dword [eax*8 + 0x4fe8bc], ecx
mov dword [edx], ecx
jmp 0x41c808
cmp byte [esp + 0x28], 0
je 0x41c804
movzx eax, byte [esp + 0x13]
push eax
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
bt ax, 0xf
mov edx, 0
mov ecx, esi
setb dl
add edx, 3
call fcn.0041f0c0
mov edx, dword [esp + 0x18]
mov dword [edx], eax
jmp 0x41c808
mov ecx, dword [eax + 0x5c]
call fcn.0041e000
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret