Function at 0x41bd60
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 0x41c46f
test edx, edx
mov eax, 0xffc3d44d
cmovne eax, edx
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, dword [0x4fb58c]
sete bh
cmp dword [0x4fd9bc], 0
je 0x41bdd4
mov byte [esp + 0x12], 1
test bh, bh
je 0x41bdd9
mov byte [esp + 0x12], 0
cmp dword [0x4fd9bc], 1
je 0x41bde6
test bh, bh
je 0x41bdea
mov byte [ebp + 0x10], 0
test bl, bl
jne 0x41be00
mov ecx, edi
call fcn.0041f9b0
mov edx, dword [ebp + 8]
mov bl, al
mov byte [esp + 0x24], bl
jmp 0x41be17
mov edx, dword [ebp + 8]
test dx, dx
jne 0x41be17
xor dl, dl
mov cl, bl
call fcn.0041f590
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 [0x4fd9bc], 2
mov dword [esp + 0x2c], ecx
jne case.default.0x41be41
movzx eax, bl
add eax, 0xffffff60
cmp eax, 5
ja case.default.0x41be41
jmp dword [eax*4 + 0x41c478]
mov bl, 0x11
jmp 0x41be52
mov bl, 0x10
jmp 0x41be52
mov bl, 0x12
mov byte [esp + 0x24], bl
cmp dword [ebp + 0xc], 0
je 0x41bfdb
push 0
mov cl, bl
call fcn.0041e860
add esp, 4
test al, al
je 0x41bf74
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardState]
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x41be91
movzx eax, bl
or byte [esp + eax + 0x38], 0x80
jmp 0x41be9e
cmp eax, 1
jne 0x41be9e
movzx eax, bl
and byte [esp + eax + 0x38], 0x7f
movzx edi, bl
lea eax, [edi - 0xa0]
cmp eax, 5
ja case.default.0x41beb0
jmp dword [eax*4 + 0x41c490]
test byte [esp + 0xda], 0x80
jne 0x41bee3
test byte [esp + 0xdb], 0x80
jne 0x41bee3
and byte [esp + 0x49], 0x7f
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
jmp 0x41bf77
or byte [esp + 0x49], 0x80
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
jmp 0x41bf77
test byte [esp + 0xd8], 0x80
jne 0x41bf21
test byte [esp + 0xd9], 0x80
jne 0x41bf21
and byte [esp + 0x48], 0x7f
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
jmp 0x41bf77
or byte [esp + 0x48], 0x80
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
jmp 0x41bf77
test byte [esp + 0xdc], 0x80
jne 0x41bf5f
test byte [esp + 0xdd], 0x80
jne 0x41bf5f
and byte [esp + 0x4a], 0x7f
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
jmp 0x41bf77
or byte [esp + 0x4a], 0x80
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov edx, dword [ebp + 8]
jmp 0x41bf77
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 0x41bfa1
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 0x41bfbc
cmp eax, 2
jne 0x41bfbc
mov ecx, dword [0x4f8174]
mov ecx, dword [ecx + 0x64]
call fcn.0041dae0
jmp 0x41bfc4
test eax, eax
je 0x41c34d
or esi, 0xc0000001
push esi
push edi
push 0x101
push dword [ebp + 0xc]
call ebx
jmp 0x41c34d
cmp byte [0x4fa946], 0
mov eax, dword [esp + 0x20]
mov dword [0x4fd948], eax
mov byte [0x4fcc0c], bl
je 0x41c01e
cmp bl, 0x12
je 0x41c002
cmp bl, 0xa4
je 0x41c002
cmp bl, 0xa5
jne 0x41c01e
test bh, bh
jne 0x41c01e
push 0
mov byte [esp + 0x19], 1
call dword [sym.imp.USER32.dll_BlockInput]
mov edx, dword [ebp + 8]
mov byte [0x4fa946], bh
jmp 0x41c023
mov byte [esp + 0x15], 0
mov ch, byte [esp + 0x12]
lea edi, [esp + 0x34]
test bh, bh
mov eax, 0x4fd9a4
cmove edi, eax
mov dword [esp + 0x1c], edi
cmp bl, 0xa5
jne 0x41c142
test ch, ch
jne 0x41c142
cmp dword [0x4faa98], 0
je 0x41c142
mov al, 1
mov byte [esp + 0x10], al
mov byte [esp + 0x11], al
test bh, bh
jne 0x41c06d
mov esi, dword [0x4fd9a0]
jmp 0x41c0cd
call dword [sym.imp.USER32.dll_GetForegroundWindow]
xor esi, esi
test eax, eax
je 0x41c0b9
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 0x41c0b5
mov eax, dword [esp + 0x144]
test eax, eax
je 0x41c0b5
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.0041eba0
mov dword [edi], eax
cmp dword [edi], 0
je 0x41c113
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 0x41c19d
mov eax, dword [0x4fd9bc]
cmp eax, 2
je 0x41c19d
cmp dword [0x4faa98], 0
je 0x41c10c
cmp eax, 1
jne 0x41c19d
mov bh, 1
jmp 0x41c19f
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 [0x4fb470], eax
jmp 0x41c0db
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 0x41c0db
push 0
mov cl, bl
call fcn.0041e860
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 0x41c0e4
xor bh, bh
mov eax, dword [esp + 0x20]
cmp eax, 1
je 0x41c2d3
cmp byte [esp + 0x12], 0
je 0x41c1cd
push dword [esp + 0x18]
mov cl, ch
push dword [esp + 0x30]
push edx
mov dl, bl
call fcn.0041d4f0
add esp, 0xc
jmp 0x41c298
mov eax, dword [esp + 0x18]
test cl, cl
je 0x41c1df
cmp dword [edi], 3
jne 0x41c1df
mov dword [0x4fb46c], 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 [0x4fb46c], 0
je 0x41c298
cmp dword [0x4fb470], 0
mov byte [esp + 0x11], 0
je 0x41c273
mov dword [0x4fb470], 0
xor ecx, ecx
mov eax, dword [ecx*8 + 0x4fd950]
test eax, eax
je 0x41c236
cmp eax, esi
je 0x41c25a
inc ecx
cmp ecx, 0xa
jl 0x41c221
cmp ecx, 0xa
mov eax, 9
cmovl eax, ecx
mov dword [eax*8 + 0x4fd950], esi
mov dword [eax*8 + 0x4fd954], 4
mov eax, 4
jmp 0x41c296
mov eax, dword [ecx*8 + 0x4fd954]
test eax, eax
jne 0x41c296
mov eax, 4
mov dword [ecx*8 + 0x4fd954], eax
jmp 0x41c296
cmp byte [esp + 0x28], 0
jne 0x41c298
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.0041eba0
mov dword [edi], eax
mov edi, dword [ebp + 8]
test bh, bh
je 0x41c2ac
push edi
mov dl, bl
xor cl, cl
call fcn.0041dcf0
add esp, 4
mov eax, dword [esp + 0x20]
cmp byte [ebp + 0x10], 0
je 0x41c2e2
cmp eax, 2
jne 0x41c2e2
cmp dword [0x4fd9bc], 2
mov eax, dword [0x4f8174]
jne 0x41c2d8
mov ecx, dword [eax + 0x68]
call fcn.0041dae0
jmp 0x41c2e6
mov edi, dword [ebp + 8]
jmp 0x41c2b0
mov ecx, dword [eax + 0x64]
call fcn.0041dae0
jmp 0x41c2e6
test eax, eax
je 0x41c337
mov ecx, dword [esp + 0x2c]
or ecx, 2
cmp byte [esp + 0x12], 0
je 0x41c378
push dword [esp + 0x18]
mov dl, bl
push ecx
mov cl, byte [esp + 0x1c]
push edi
call fcn.0041d4f0
add esp, 0xc
mov edx, dword [esp + 0x1c]
cmp dword [edx], 0
je 0x41c326
mov eax, 0x138
cmp di, ax
jne 0x41c326
and byte [0x4fd78c], 0xfe
test bh, bh
je 0x41c337
push edi
mov dl, bl
mov cl, 1
call fcn.0041dcf0
add esp, 4
cmp byte [esp + 0x15], 0
je 0x41c34d
push 1
call dword [sym.imp.USER32.dll_BlockInput]
mov byte [0x4fa946], 1
cmp byte [ebp + 0x10], 0
je 0x41c46f
cmp dword [0x4fd9bc], 2
mov eax, dword [0x4f8174]
jne 0x41c467
mov ecx, dword [eax + 0x60]
call fcn.0041dae0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esp + 0x10], 0
je 0x41c393
mov eax, dword [esp + 0x1c]
cmp dword [eax], 3
mov eax, dword [esp + 0x18]
jne 0x41c397
mov dword [0x4fb468], eax
jmp 0x41c397
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 [0x4fb468], 0
je 0x41c30c
cmp dword [0x4fb470], 0
je 0x41c435
mov dword [0x4fb470], 0
xor eax, eax
mov ecx, dword [eax*8 + 0x4fd950]
test ecx, ecx
je 0x41c3e6
cmp ecx, esi
je 0x41c413
inc eax
cmp eax, 0xa
jl 0x41c3d1
cmp eax, 0xa
mov ecx, 9
cmovl ecx, eax
mov dword [ecx*8 + 0x4fd950], esi
mov dword [ecx*8 + 0x4fd954], 4
mov ecx, 4
mov edx, dword [esp + 0x1c]
mov dword [edx], ecx
jmp 0x41c310
mov ecx, dword [eax*8 + 0x4fd954]
test ecx, ecx
jne 0x41c408
mov edx, dword [esp + 0x1c]
mov ecx, 4
mov dword [eax*8 + 0x4fd954], ecx
mov dword [edx], ecx
jmp 0x41c310
cmp byte [esp + 0x28], 0
je 0x41c30c
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.0041eba0
mov edx, dword [esp + 0x1c]
mov dword [edx], eax
jmp 0x41c310
mov ecx, dword [eax + 0x5c]
call fcn.0041dae0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret