Function at 0x413e60
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x124
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 0x414491
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 [0x4dc228]
sete bh
cmp dword [0x4dd21c], 0
je 0x413eba
mov byte [esp + 0xe], 1
test bh, bh
je 0x413ebf
mov byte [esp + 0xe], 0
cmp dword [0x4dd21c], 1
je 0x413ecc
test bh, bh
je 0x413ed0
mov byte [ebp + 0x10], 0
test bl, bl
jne 0x413ee3
mov ecx, esi
call fcn.004175f0
mov bl, al
mov byte [esp + 0x20], bl
jmp 0x413ef4
test si, si
jne 0x413ef4
xor dl, dl
mov cl, bl
call fcn.004172e0
movzx esi, ax
mov eax, esi
xor ecx, ecx
shr eax, 8
test al, al
setne cl
cmp dword [0x4dd21c], 2
mov dword [esp + 0x28], ecx
jne case.default.0x413f1a
movzx eax, bl
add eax, 0xffffff60
cmp eax, 5
ja case.default.0x413f1a
jmp dword [eax*4 + 0x414498]
mov bl, 0x11
jmp 0x413f2b
mov bl, 0x10
jmp 0x413f2b
mov bl, 0x12
mov byte [esp + 0x20], bl
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x414065
push 0
mov edx, esi
mov cl, bl
call fcn.004164f0
add esp, 4
test al, al
je 0x413ffd
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardState]
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x413f6d
movzx eax, bl
or byte [esp + eax + 0x30], 0x80
jmp 0x413f7a
cmp eax, 1
jne 0x413f7a
movzx eax, bl
and byte [esp + eax + 0x30], 0x7f
movzx eax, bl
add eax, 0xffffff60
cmp eax, 5
ja case.default.0x413f87
jmp dword [eax*4 + 0x4144b0]
test byte [esp + 0xd2], 0x80
jne 0x413fa9
test byte [esp + 0xd3], 0x80
jne 0x413fa9
and byte [esp + 0x41], 0x7f
jmp case.default.0x413f87
or byte [esp + 0x41], 0x80
jmp case.default.0x413f87
test byte [esp + 0xd0], 0x80
jne 0x413fcb
test byte [esp + 0xd1], 0x80
jne 0x413fcb
and byte [esp + 0x40], 0x7f
jmp case.default.0x413f87
or byte [esp + 0x40], 0x80
jmp case.default.0x413f87
test byte [esp + 0xd4], 0x80
jne 0x413fed
test byte [esp + 0xd5], 0x80
jne 0x413fed
and byte [esp + 0x42], 0x7f
jmp case.default.0x413f87
or byte [esp + 0x42], 0x80
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov eax, dword [esp + 0x18]
movzx esi, si
shl esi, 0x10
cmp eax, 1
je 0x414026
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 0x414041
cmp eax, 2
jne 0x414041
mov ecx, dword [0x4d89c0]
mov ecx, dword [ecx + 0x64]
call fcn.004159f0
jmp 0x414049
test eax, eax
je 0x414466
or esi, 0xc0000001
movzx eax, bl
push esi
push eax
push 0x101
push edi
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x414466
cmp byte [0x4db7d4], 0
mov eax, dword [esp + 0x18]
mov dword [0x4dee04], eax
mov byte [0x4dd227], bl
je 0x41409e
cmp bl, 0x12
je 0x41408c
cmp bl, 0xa4
je 0x41408c
cmp bl, 0xa5
jne 0x41409e
test bh, bh
jne 0x41409e
xor cl, cl
mov byte [esp + 0x13], 1
call fcn.00434cc0
jmp 0x4140a3
mov byte [esp + 0x13], 0
test bh, bh
lea eax, [esp + 0x2c]
mov ecx, 0x4dee0c
cmove eax, ecx
mov cl, byte [esp + 0xe]
mov dword [esp + 0x14], eax
cmp bl, 0xa5
jne 0x41413c
test cl, cl
jne 0x41413c
cmp dword [0x4db79c], 0
je 0x41413c
mov cl, 1
mov byte [esp + 0x11], cl
mov byte [esp + 0xf], cl
test bh, bh
jne 0x4140e1
mov edi, dword [0x4dee08]
jmp 0x414101
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov ecx, eax
call fcn.00416910
mov edi, eax
xor edx, edx
mov ecx, edi
call fcn.004169f0
mov ecx, dword [esp + 0x14]
mov dword [ecx], eax
mov eax, ecx
cmp dword [eax], 0
je 0x414115
mov cl, byte [esp + 0xd]
mov byte [esp + 0xf], 0
mov byte [esp + 0x10], cl
jmp 0x41417c
push 0xa2
mov byte [esp + 0x14], 0xa2
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
shr eax, 0xf
and eax, 0xffffff01
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x1c]
mov dword [0x4dc10c], eax
jmp 0x414184
mov byte [esp + 0x11], 0
mov byte [esp + 0xf], 0
test cl, cl
je 0x414170
push 0
mov edx, esi
mov cl, bl
call fcn.004164f0
mov cl, byte [esp + 0x11]
mov ch, al
mov al, byte [esp + 0x11]
add esp, 4
mov edi, dword [esp + 0x28]
mov byte [esp + 0x10], cl
mov dword [esp + 0x24], eax
jmp 0x414186
mov al, byte [esp + 0xd]
mov edi, dword [esp + 0x28]
mov byte [esp + 0x10], al
mov al, byte [esp + 0xd]
mov dword [esp + 0x24], eax
xor ch, ch
mov byte [esp + 0x12], ch
test bh, bh
jne 0x4141ad
mov eax, dword [0x4dd21c]
cmp eax, 2
je 0x4141ad
cmp dword [0x4db79c], 0
je 0x4141a6
cmp eax, 1
jne 0x4141ad
mov byte [esp + 0xd], 1
jmp 0x4141b2
mov byte [esp + 0xd], 0
mov eax, dword [esp + 0x18]
mov bh, byte [esp + 0xe]
cmp eax, 1
je 0x4142ed
test bh, bh
je 0x4141e1
push dword [esp + 0x1c]
mov dl, bl
mov cl, ch
push dword [esp + 0x2c]
push esi
call fcn.004154b0
add esp, 0xc
jmp 0x4142d5
cmp byte [esp + 0x11], 0
je 0x4141fe
mov ecx, dword [esp + 0x14]
mov eax, dword [0x4dc108]
cmp dword [ecx], 3
cmove eax, dword [esp + 0x1c]
mov dword [0x4dc108], eax
push dword [esp + 0x1c]
push dword [esp + 0x2c]
push esi
push dword [esp + 0x2c]
call dword [sym.imp.USER32.dll_keybd_event]
cmp byte [esp + 0xf], 0
mov dword [0x4dc108], 0
je 0x4142d5
cmp dword [0x4dc10c], 0
mov byte [esp + 0xf], 0
je 0x4142a3
mov dword [0x4dc10c], 0
xor ecx, ecx
mov eax, dword [ecx*8 + 0x4dd228]
test eax, eax
je 0x414255
cmp eax, edi
je 0x41427f
inc ecx
cmp ecx, 0xa
jl 0x414240
cmp ecx, 0xa
mov eax, 9
cmovl eax, ecx
mov ecx, 4
mov dword [eax*8 + 0x4dd228], edi
mov dword [eax*8 + 0x4dd22c], 4
mov eax, dword [esp + 0x14]
mov dword [eax], ecx
jmp 0x4142d5
cmp dword [ecx*8 + 0x4dd22c], 0
jne 0x414294
mov dword [ecx*8 + 0x4dd22c], 4
mov eax, dword [esp + 0x14]
mov ecx, dword [ecx*8 + 0x4dd22c]
mov dword [eax], ecx
jmp 0x4142d5
cmp byte [esp + 0x24], 0
jne 0x4142d5
movzx eax, byte [esp + 0x10]
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.004169f0
mov ecx, dword [esp + 0x14]
mov dword [ecx], eax
cmp byte [esp + 0xd], 0
je 0x4142e9
push esi
mov dl, bl
xor cl, cl
call fcn.00415ac0
add esp, 4
mov eax, dword [esp + 0x18]
cmp byte [ebp + 0x10], 0
je 0x41431a
cmp eax, 2
jne 0x41431a
cmp dword [0x4dd21c], 2
mov eax, dword [0x4d89c0]
jne 0x414310
mov ecx, dword [eax + 0x68]
call fcn.004159f0
jmp 0x414322
mov ecx, dword [eax + 0x64]
call fcn.004159f0
jmp 0x414322
test eax, eax
je 0x414458
mov edx, dword [esp + 0x28]
or edx, 2
test bh, bh
je 0x414346
push dword [esp + 0x1c]
mov cl, byte [esp + 0x16]
push edx
push esi
mov dl, bl
call fcn.004154b0
add esp, 0xc
jmp 0x41442a
cmp byte [esp + 0x11], 0
je 0x414363
mov ecx, dword [esp + 0x14]
mov eax, dword [0x4dc104]
cmp dword [ecx], 3
cmove eax, dword [esp + 0x1c]
mov dword [0x4dc104], eax
push dword [esp + 0x1c]
push edx
push esi
push dword [esp + 0x2c]
call dword [sym.imp.USER32.dll_keybd_event]
cmp byte [esp + 0xf], 0
mov dword [0x4dc104], 0
je 0x41442a
cmp dword [0x4dc10c], 0
je 0x4143f7
mov dword [0x4dc10c], 0
xor eax, eax
nop dword [eax]
mov ecx, dword [eax*8 + 0x4dd228]
test ecx, ecx
je 0x4143b5
cmp ecx, edi
je 0x4143d9
inc eax
cmp eax, 0xa
jl 0x4143a0
cmp eax, 0xa
mov ecx, 9
cmovl ecx, eax
mov eax, 4
mov dword [ecx*8 + 0x4dd228], edi
mov dword [ecx*8 + 0x4dd22c], 4
jmp 0x414424
cmp dword [eax*8 + 0x4dd22c], 0
jne 0x4143ee
mov dword [eax*8 + 0x4dd22c], 4
mov eax, dword [eax*8 + 0x4dd22c]
jmp 0x414424
cmp byte [esp + 0x24], 0
je 0x41442a
movzx eax, byte [esp + 0x10]
push eax
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
mov ecx, 0x8000
mov edx, 0
test cx, ax
mov ecx, edi
setne dl
add edx, 3
call fcn.004169f0
mov ecx, dword [esp + 0x14]
mov dword [ecx], eax
mov eax, dword [esp + 0x14]
cmp dword [eax], 0
je 0x414444
mov eax, 0x138
cmp si, ax
jne 0x414444
and byte [0x4dee03], 0xfe
cmp byte [esp + 0xd], 0
je 0x414458
push esi
mov dl, bl
mov cl, 1
call fcn.00415ac0
add esp, 4
cmp byte [esp + 0x13], 0
je 0x414466
mov cl, 1
call fcn.00434cc0
cmp byte [ebp + 0x10], 0
je 0x414491
cmp dword [0x4dd21c], 2
mov eax, dword [0x4d89c0]
jne 0x414489
mov ecx, dword [eax + 0x60]
call fcn.004159f0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [eax + 0x5c]
call fcn.004159f0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret