Function at 0x41b1b0
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
mov dword [esp + 0x14], ecx
push edi
je 0x41b865
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 [0x51f5ec]
sete bh
cmp dword [0x521a18], 0
je 0x41b20a
mov byte [esp + 0x12], 1
test bh, bh
je 0x41b20f
mov byte [esp + 0x12], 0
cmp dword [0x521a18], 1
je 0x41b21c
test bh, bh
je 0x41b220
mov byte [ebp + 0x10], 0
test bl, bl
jne 0x41b236
mov ecx, esi
call fcn.0041ed70
mov edx, dword [ebp + 8]
mov bl, al
mov byte [esp + 0x20], bl
jmp 0x41b24d
mov edx, dword [ebp + 8]
test dx, dx
jne 0x41b24d
xor dl, dl
mov cl, bl
call fcn.0041e950
movzx edx, ax
mov dword [ebp + 8], edx
mov eax, edx
mov byte [esp + 0x2c], dl
xor ecx, ecx
shr eax, 8
test al, al
setne cl
cmp dword [0x521a18], 2
mov dword [esp + 0x30], ecx
jne case.default.0x41b277
movzx eax, bl
add eax, 0xffffff60
cmp eax, 5
ja case.default.0x41b277
jmp dword [eax*4 + 0x41b86c]
mov bl, 0x11
jmp 0x41b288
mov bl, 0x10
jmp 0x41b288
mov bl, 0x12
mov byte [esp + 0x20], bl
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x41b3c3
push 0
mov cl, bl
call fcn.0041dc50
add esp, 4
test al, al
je 0x41b35b
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardState]
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x41b2c8
movzx eax, bl
or byte [esp + eax + 0x38], 0x80
jmp 0x41b2d5
cmp eax, 1
jne 0x41b2d5
movzx eax, bl
and byte [esp + eax + 0x38], 0x7f
movzx eax, bl
add eax, 0xffffff60
cmp eax, 5
ja case.default.0x41b2e2
jmp dword [eax*4 + 0x41b884]
test byte [esp + 0xda], 0x80
jne 0x41b304
test byte [esp + 0xdb], 0x80
jne 0x41b304
and byte [esp + 0x49], 0x7f
jmp case.default.0x41b2e2
or byte [esp + 0x49], 0x80
jmp case.default.0x41b2e2
test byte [esp + 0xd8], 0x80
jne 0x41b326
test byte [esp + 0xd9], 0x80
jne 0x41b326
and byte [esp + 0x48], 0x7f
jmp case.default.0x41b2e2
or byte [esp + 0x48], 0x80
jmp case.default.0x41b2e2
test byte [esp + 0xdc], 0x80
jne 0x41b348
test byte [esp + 0xdd], 0x80
jne 0x41b348
and byte [esp + 0x4a], 0x7f
jmp case.default.0x41b2e2
or byte [esp + 0x4a], 0x80
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
mov eax, dword [esp + 0x18]
movzx esi, dx
shl esi, 0x10
cmp eax, 1
je 0x41b384
mov eax, esi
or eax, 1
push eax
movzx eax, bl
push eax
push 0x100
push edi
call dword [sym.imp.USER32.dll_PostMessageW]
mov eax, dword [esp + 0x18]
cmp byte [ebp + 0x10], 0
je 0x41b39f
cmp eax, 2
jne 0x41b39f
mov ecx, dword [0x51b98c]
mov ecx, dword [ecx + 0x64]
call fcn.0041cee0
jmp 0x41b3a7
test eax, eax
je 0x41b738
or esi, 0xc0000001
movzx eax, bl
push esi
push eax
push 0x101
push edi
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x41b738
cmp byte [0x51eb5e], 0
mov eax, dword [esp + 0x18]
mov dword [0x5219a0], eax
mov byte [0x5219a4], bl
je 0x41b406
cmp bl, 0x12
je 0x41b3ea
cmp bl, 0xa4
je 0x41b3ea
cmp bl, 0xa5
jne 0x41b406
test bh, bh
jne 0x41b406
push 0
mov byte [esp + 0x1b], 1
call dword [sym.imp.USER32.dll_BlockInput]
mov edx, dword [ebp + 8]
mov byte [0x51eb5e], bh
jmp 0x41b40b
mov byte [esp + 0x17], 0
test bh, bh
lea esi, [esp + 0x34]
mov eax, 0x5219fc
cmove esi, eax
mov al, byte [esp + 0x12]
mov dword [esp + 0x24], esi
cmp bl, 0xa5
jne 0x41b4f0
test al, al
jne 0x41b4f0
cmp dword [0x51eaf8], 0
je 0x41b4f0
mov byte [esp + 0x15], 1
mov byte [esp + 0x13], 1
test bh, bh
jne 0x41b455
mov edi, dword [0x5219f8]
jmp 0x41b4b5
call dword [sym.imp.USER32.dll_GetForegroundWindow]
xor esi, esi
test eax, eax
je 0x41b49d
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 0x41b49d
mov eax, dword [esp + 0x144]
test eax, eax
je 0x41b49d
push 0
push eax
call edi
mov esi, eax
push esi
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov edi, eax
xor edx, edx
mov ecx, edi
call fcn.0041df80
mov esi, dword [esp + 0x24]
mov dword [esi], eax
cmp dword [esi], 0
je 0x41b4c9
mov cl, byte [esp + 0x11]
mov byte [esp + 0x13], 0
mov byte [esp + 0x14], cl
jmp 0x41b532
push 0xa2
mov byte [esp + 0x18], 0xa2
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
shr eax, 0xf
and eax, 0xffffff01
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x1c]
mov dword [0x51f4c8], eax
jmp 0x41b53a
mov byte [esp + 0x15], 0
mov byte [esp + 0x13], 0
test al, al
je 0x41b526
push 0
mov cl, bl
call fcn.0041dc50
mov cl, byte [esp + 0x15]
mov ch, al
mov edi, dword [esp + 0x30]
add esp, 4
mov byte [esp + 0x16], al
mov al, byte [esp + 0x11]
mov byte [esp + 0x14], cl
mov dword [esp + 0x28], eax
jmp 0x41b543
mov al, byte [esp + 0x11]
mov edi, dword [esp + 0x2c]
mov byte [esp + 0x14], al
mov al, byte [esp + 0x11]
mov dword [esp + 0x28], eax
mov edx, dword [ebp + 8]
xor ch, ch
mov byte [esp + 0x16], ch
test bh, bh
jne 0x41b566
mov eax, dword [0x521a18]
cmp eax, 2
je 0x41b566
cmp dword [0x51eaf8], 0
je 0x41b55f
cmp eax, 1
jne 0x41b566
mov byte [esp + 0x11], 1
jmp 0x41b56b
mov byte [esp + 0x11], 0
mov eax, dword [esp + 0x18]
mov bh, byte [esp + 0x12]
cmp eax, 1
je 0x41b6be
test bh, bh
je 0x41b59a
push dword [esp + 0x1c]
mov cl, ch
push dword [esp + 0x34]
push edx
mov dl, bl
call fcn.0041c8e0
add esp, 0xc
jmp 0x41b680
cmp byte [esp + 0x15], 0
je 0x41b5b3
mov eax, dword [0x51f4c4]
cmp dword [esi], 3
cmove eax, dword [esp + 0x1c]
mov dword [0x51f4c4], eax
push dword [esp + 0x1c]
push dword [esp + 0x34]
push dword [esp + 0x34]
push dword [esp + 0x2c]
call dword [sym.imp.USER32.dll_keybd_event]
cmp byte [esp + 0x13], 0
mov dword [0x51f4c4], 0
je 0x41b680
cmp dword [0x51f4c8], 0
mov byte [esp + 0x13], 0
je 0x41b652
mov dword [0x51f4c8], 0
xor ecx, ecx
nop dword [eax + eax]
mov eax, dword [ecx*8 + 0x5219a8]
test eax, eax
je 0x41b615
cmp eax, edi
je 0x41b639
inc ecx
cmp ecx, 0xa
jl 0x41b600
cmp ecx, 0xa
mov eax, 9
cmovl eax, ecx
mov dword [eax*8 + 0x5219a8], edi
mov dword [eax*8 + 0x5219ac], 4
mov eax, 4
jmp 0x41b67e
mov eax, dword [ecx*8 + 0x5219ac]
test eax, eax
jne 0x41b67e
mov eax, 4
mov dword [ecx*8 + 0x5219ac], eax
jmp 0x41b67e
cmp byte [esp + 0x28], 0
jne 0x41b680
movzx eax, byte [esp + 0x14]
push eax
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
mov ecx, 0x8000
and ax, cx
mov ecx, edi
movzx edx, ax
neg edx
sbb edx, edx
add edx, 4
call fcn.0041df80
mov dword [esi], eax
cmp byte [esp + 0x11], 0
mov esi, dword [ebp + 8]
je 0x41b697
push esi
mov dl, bl
xor cl, cl
call fcn.0041d0f0
add esp, 4
mov eax, dword [esp + 0x18]
cmp byte [ebp + 0x10], 0
je 0x41b6cd
cmp eax, 2
jne 0x41b6cd
cmp dword [0x521a18], 2
mov eax, dword [0x51b98c]
jne 0x41b6c3
mov ecx, dword [eax + 0x68]
call fcn.0041cee0
jmp 0x41b6d1
mov esi, dword [ebp + 8]
jmp 0x41b69b
mov ecx, dword [eax + 0x64]
call fcn.0041cee0
jmp 0x41b6d1
test eax, eax
je 0x41b722
mov edx, dword [esp + 0x30]
or edx, 2
test bh, bh
je 0x41b763
push dword [esp + 0x1c]
mov cl, byte [esp + 0x1a]
push edx
push esi
mov dl, bl
call fcn.0041c8e0
add esp, 0xc
mov edx, dword [esp + 0x24]
cmp dword [edx], 0
je 0x41b70e
mov eax, 0x138
cmp si, ax
jne 0x41b70e
and byte [0x521a0c], 0xfe
cmp byte [esp + 0x11], 0
je 0x41b722
push esi
mov dl, bl
mov cl, 1
call fcn.0041d0f0
add esp, 4
cmp byte [esp + 0x17], 0
je 0x41b738
push 1
call dword [sym.imp.USER32.dll_BlockInput]
mov byte [0x51eb5e], 1
cmp byte [ebp + 0x10], 0
je 0x41b865
cmp dword [0x521a18], 2
mov eax, dword [0x51b98c]
jne 0x41b85d
mov ecx, dword [eax + 0x60]
call fcn.0041cee0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esp + 0x15], 0
je 0x41b780
mov ecx, dword [esp + 0x24]
mov eax, dword [0x51f4c0]
cmp dword [ecx], 3
cmove eax, dword [esp + 0x1c]
mov dword [0x51f4c0], eax
push dword [esp + 0x1c]
push edx
push dword [esp + 0x34]
push dword [esp + 0x2c]
call dword [sym.imp.USER32.dll_keybd_event]
cmp byte [esp + 0x13], 0
mov dword [0x51f4c0], 0
je 0x41b6f4
cmp dword [0x51f4c8], 0
je 0x41b824
mov dword [0x51f4c8], 0
xor eax, eax
nop dword [eax]
mov ecx, dword [eax*8 + 0x5219a8]
test ecx, ecx
je 0x41b7d5
cmp ecx, edi
je 0x41b802
inc eax
cmp eax, 0xa
jl 0x41b7c0
cmp eax, 0xa
mov ecx, 9
cmovl ecx, eax
mov dword [ecx*8 + 0x5219a8], edi
mov dword [ecx*8 + 0x5219ac], 4
mov ecx, 4
mov edx, dword [esp + 0x24]
mov dword [edx], ecx
jmp 0x41b6f8
mov ecx, dword [eax*8 + 0x5219ac]
test ecx, ecx
jne 0x41b7f7
mov edx, dword [esp + 0x24]
mov ecx, 4
mov dword [eax*8 + 0x5219ac], ecx
mov dword [edx], ecx
jmp 0x41b6f8
cmp byte [esp + 0x28], 0
je 0x41b6f4
movzx eax, byte [esp + 0x14]
push eax
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
bt ax, 0xf
mov edx, 0
mov ecx, edi
setb dl
add edx, 3
call fcn.0041df80
mov edx, dword [esp + 0x24]
mov dword [edx], eax
jmp 0x41b6f8
mov ecx, dword [eax + 0x5c]
call fcn.0041cee0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret