Function at 0x41c230
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 + 0x20], ecx
je 0x41c93f
test edx, edx
mov eax, 0xffc3d44d
cmovne eax, edx
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, dword [0x4fc50c]
sete bh
cmp dword [0x4fe93c], 0
je 0x41c2a4
mov byte [esp + 0x12], 1
test bh, bh
je 0x41c2a9
mov byte [esp + 0x12], 0
cmp dword [0x4fe93c], 1
je 0x41c2b6
test bh, bh
je 0x41c2ba
mov byte [ebp + 0x10], 0
test bl, bl
jne 0x41c2d0
mov ecx, edi
call fcn.0041fea0
mov edx, dword [ebp + 8]
mov bl, al
mov byte [esp + 0x24], bl
jmp 0x41c2e7
mov edx, dword [ebp + 8]
test dx, dx
jne 0x41c2e7
xor dl, dl
mov cl, bl
call fcn.0041fa80
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 [0x4fe93c], 2
mov dword [esp + 0x2c], ecx
jne case.default.0x41c311
movzx eax, bl
add eax, 0xffffff60
cmp eax, 5
ja case.default.0x41c311
jmp dword [eax*4 + 0x41c948]
mov bl, 0x11
jmp 0x41c322
mov bl, 0x10
jmp 0x41c322
mov bl, 0x12
mov byte [esp + 0x24], bl
cmp dword [ebp + 0xc], 0
je 0x41c4ab
push 0
mov cl, bl
call fcn.0041ed50
add esp, 4
test al, al
je 0x41c444
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardState]
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x41c361
movzx eax, bl
or byte [esp + eax + 0x38], 0x80
jmp 0x41c36e
cmp eax, 1
jne 0x41c36e
movzx eax, bl
and byte [esp + eax + 0x38], 0x7f
movzx edi, bl
lea eax, [edi - 0xa0]
cmp eax, 5
ja case.default.0x41c380
jmp dword [eax*4 + 0x41c960]
test byte [esp + 0xda], 0x80
jne 0x41c3b3
test byte [esp + 0xdb], 0x80
jne 0x41c3b3
and byte [esp + 0x49], 0x7f
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
jmp 0x41c447
or byte [esp + 0x49], 0x80
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
jmp 0x41c447
test byte [esp + 0xd8], 0x80
jne 0x41c3f1
test byte [esp + 0xd9], 0x80
jne 0x41c3f1
and byte [esp + 0x48], 0x7f
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
jmp 0x41c447
or byte [esp + 0x48], 0x80
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
jmp 0x41c447
test byte [esp + 0xdc], 0x80
jne 0x41c42f
test byte [esp + 0xdd], 0x80
jne 0x41c42f
and byte [esp + 0x4a], 0x7f
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
jmp 0x41c447
or byte [esp + 0x4a], 0x80
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
jmp 0x41c447
movzx edi, bl
mov eax, dword [esp + 0x20]
mov ebx, dword [sym.imp.USER32.dll_PostMessageW]
movzx esi, dx
shl esi, 0x10
cmp eax, 1
je 0x41c471
mov eax, esi
or eax, 1
push eax
push edi
push 0x100
push dword [ebp + 0xc]
call ebx
mov eax, dword [esp + 0x20]
cmp byte [ebp + 0x10], 0
je 0x41c48c
cmp eax, 2
jne 0x41c48c
mov ecx, dword [0x4f90f4]
mov ecx, dword [ecx + 0x64]
call fcn.0041dfd0
jmp 0x41c494
test eax, eax
je 0x41c81d
or esi, 0xc0000001
push esi
push edi
push 0x101
push dword [ebp + 0xc]
call ebx
jmp 0x41c81d
cmp byte [0x4fb8c6], 0
mov eax, dword [esp + 0x20]
mov dword [0x4fe8c8], eax
mov byte [0x4fdb8c], bl
je 0x41c4ee
cmp bl, 0x12
je 0x41c4d2
cmp bl, 0xa4
je 0x41c4d2
cmp bl, 0xa5
jne 0x41c4ee
test bh, bh
jne 0x41c4ee
push 0
mov byte [esp + 0x19], 1
call dword [sym.imp.USER32.dll_BlockInput]
mov edx, dword [ebp + 8]
mov byte [0x4fb8c6], bh
jmp 0x41c4f3
mov byte [esp + 0x15], 0
mov ch, byte [esp + 0x12]
lea edi, [esp + 0x34]
test bh, bh
mov eax, 0x4fe924
cmove edi, eax
mov dword [esp + 0x1c], edi
cmp bl, 0xa5
jne 0x41c612
test ch, ch
jne 0x41c612
cmp dword [0x4fba18], 0
je 0x41c612
mov al, 1
mov byte [esp + 0x10], al
mov byte [esp + 0x11], al
test bh, bh
jne 0x41c53d
mov esi, dword [0x4fe920]
jmp 0x41c59d
call dword [sym.imp.USER32.dll_GetForegroundWindow]
xor esi, esi
test eax, eax
je 0x41c589
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 0x41c585
mov eax, dword [esp + 0x144]
test eax, eax
je 0x41c585
push 0
push eax
call edi
mov esi, eax
mov edi, dword [esp + 0x1c]
push esi
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov esi, eax
xor edx, edx
mov ecx, esi
call fcn.0041f090
mov dword [edi], eax
cmp dword [edi], 0
je 0x41c5e3
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 0x41c66d
mov eax, dword [0x4fe93c]
cmp eax, 2
je 0x41c66d
cmp dword [0x4fba18], 0
je 0x41c5dc
cmp eax, 1
jne 0x41c66d
mov bh, 1
jmp 0x41c66f
push 0xa2
mov byte [esp + 0x17], 0xa2
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
mov cl, byte [esp + 0x10]
shr eax, 0xf
and eax, 0xffffff01
mov byte [esp + 0x10], cl
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x18]
mov dword [0x4fc3f0], eax
jmp 0x41c5ab
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 0x41c5ab
push 0
mov cl, bl
call fcn.0041ed50
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 0x41c5b4
xor bh, bh
mov eax, dword [esp + 0x20]
cmp eax, 1
je 0x41c7a3
cmp byte [esp + 0x12], 0
je 0x41c69d
push dword [esp + 0x18]
mov cl, ch
push dword [esp + 0x30]
push edx
mov dl, bl
call fcn.0041d9d0
add esp, 0xc
jmp 0x41c768
mov eax, dword [esp + 0x18]
test cl, cl
je 0x41c6af
cmp dword [edi], 3
jne 0x41c6af
mov dword [0x4fc3ec], eax
push eax
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 [0x4fc3ec], 0
je 0x41c768
cmp dword [0x4fc3f0], 0
mov byte [esp + 0x11], 0
je 0x41c743
mov dword [0x4fc3f0], 0
xor ecx, ecx
mov eax, dword [ecx*8 + 0x4fe8d0]
test eax, eax
je 0x41c706
cmp eax, esi
je 0x41c72a
inc ecx
cmp ecx, 0xa
jl 0x41c6f1
cmp ecx, 0xa
mov eax, 9
cmovl eax, ecx
mov dword [eax*8 + 0x4fe8d0], esi
mov dword [eax*8 + 0x4fe8d4], 4
mov eax, 4
jmp 0x41c766
mov eax, dword [ecx*8 + 0x4fe8d4]
test eax, eax
jne 0x41c766
mov eax, 4
mov dword [ecx*8 + 0x4fe8d4], eax
jmp 0x41c766
cmp byte [esp + 0x28], 0
jne 0x41c768
movzx eax, byte [esp + 0x13]
push eax
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
movsx edx, ax
mov ecx, esi
sar edx, 0xf
add edx, 4
call fcn.0041f090
mov dword [edi], eax
mov edi, dword [ebp + 8]
test bh, bh
je 0x41c77c
push edi
mov dl, bl
xor cl, cl
call fcn.0041e1e0
add esp, 4
mov eax, dword [esp + 0x20]
cmp byte [ebp + 0x10], 0
je 0x41c7b2
cmp eax, 2
jne 0x41c7b2
cmp dword [0x4fe93c], 2
mov eax, dword [0x4f90f4]
jne 0x41c7a8
mov ecx, dword [eax + 0x68]
call fcn.0041dfd0
jmp 0x41c7b6
mov edi, dword [ebp + 8]
jmp 0x41c780
mov ecx, dword [eax + 0x64]
call fcn.0041dfd0
jmp 0x41c7b6
test eax, eax
je 0x41c807
mov ecx, dword [esp + 0x2c]
or ecx, 2
cmp byte [esp + 0x12], 0
je 0x41c848
push dword [esp + 0x18]
mov dl, bl
push ecx
mov cl, byte [esp + 0x1c]
push edi
call fcn.0041d9d0
add esp, 0xc
mov edx, dword [esp + 0x1c]
cmp dword [edx], 0
je 0x41c7f6
mov eax, 0x138
cmp di, ax
jne 0x41c7f6
and byte [0x4fe70c], 0xfe
test bh, bh
je 0x41c807
push edi
mov dl, bl
mov cl, 1
call fcn.0041e1e0
add esp, 4
cmp byte [esp + 0x15], 0
je 0x41c81d
push 1
call dword [sym.imp.USER32.dll_BlockInput]
mov byte [0x4fb8c6], 1
cmp byte [ebp + 0x10], 0
je 0x41c93f
cmp dword [0x4fe93c], 2
mov eax, dword [0x4f90f4]
jne 0x41c937
mov ecx, dword [eax + 0x60]
call fcn.0041dfd0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esp + 0x10], 0
je 0x41c863
mov eax, dword [esp + 0x1c]
cmp dword [eax], 3
mov eax, dword [esp + 0x18]
jne 0x41c867
mov dword [0x4fc3e8], eax
jmp 0x41c867
mov eax, dword [esp + 0x18]
push eax
push ecx
push dword [esp + 0x38]
push dword [esp + 0x30]
call dword [sym.imp.USER32.dll_keybd_event]
cmp byte [esp + 0x11], 0
mov dword [0x4fc3e8], 0
je 0x41c7dc
cmp dword [0x4fc3f0], 0
je 0x41c905
mov dword [0x4fc3f0], 0
xor eax, eax
mov ecx, dword [eax*8 + 0x4fe8d0]
test ecx, ecx
je 0x41c8b6
cmp ecx, esi
je 0x41c8e3
inc eax
cmp eax, 0xa
jl 0x41c8a1
cmp eax, 0xa
mov ecx, 9
cmovl ecx, eax
mov dword [ecx*8 + 0x4fe8d0], esi
mov dword [ecx*8 + 0x4fe8d4], 4
mov ecx, 4
mov edx, dword [esp + 0x1c]
mov dword [edx], ecx
jmp 0x41c7e0
mov ecx, dword [eax*8 + 0x4fe8d4]
test ecx, ecx
jne 0x41c8d8
mov edx, dword [esp + 0x1c]
mov ecx, 4
mov dword [eax*8 + 0x4fe8d4], ecx
mov dword [edx], ecx
jmp 0x41c7e0
cmp byte [esp + 0x28], 0
je 0x41c7dc
movzx eax, byte [esp + 0x13]
push eax
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
sar eax, 0xf
mov ecx, esi
and eax, 1
lea edx, [eax + 3]
call fcn.0041f090
mov edx, dword [esp + 0x1c]
mov dword [edx], eax
jmp 0x41c7e0
mov ecx, dword [eax + 0x5c]
call fcn.0041dfd0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret