Function at 0x40e610
Capabilities:
Check for time delay via gettickcount
Log keystrokes via polling

Disassembly:
sub esp, 0x28
or al, byte [esp + 0x34]
push ebx
mov ebx, dword [esp + 0x30]
push ebp
mov ebp, dword [esp + 0x40]
mov byte [esp + 0x10], al
lea eax, [ebx - 1]
push esi
push edi
cmp al, 5
ja 0x40e633
cmp bl, 3
jne 0x40e63b
lea edx, [ebx + 0x66]
cmp dl, 5
ja 0x40e642
mov byte [esp + 0x13], 1
jmp 0x40e647
mov byte [esp + 0x13], 0
mov edi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
test ecx, ecx
jle 0x40e864
mov dword [esp + 0x14], ecx
cmp dword [0x4ab678], 0
jne 0x40e6bc
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
sub eax, dword [0x4ac39c]
mov ecx, dword [0x4a6440]
cmp eax, dword [ecx + 0xb4]
jbe 0x40e6bc
push 0
push 0
push 0
push 0
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x40e6b5
push 1
push 0xffffffffffffffff
mov dword [0x4a63a4], 0
call fcn.00401330
add esp, 8
mov dword [0x4a63a4], 1
call esi
mov dword [0x4ac39c], eax
cmp byte [esp + 0x4c], 0
jne 0x40e7f6
cmp dword [0x4ab678], 0
je 0x40e6da
mov al, byte [0x4a8c3d]
jmp 0x40e7cb
cmp dword [0x4a9e50], 0
je 0x40e6ed
mov al, byte [0x4a9d1d]
jmp 0x40e7cb
push 0xa0
xor bl, bl
call edi
mov ecx, 0x8000
test cx, ax
je 0x40e702
mov bl, 0x10
push 0xa1
call edi
mov edx, 0x8000
test dx, ax
je 0x40e716
or bl, 0x20
push 0xa2
call edi
mov ecx, 0x8000
test cx, ax
je 0x40e72a
or bl, 1
push 0xa3
call edi
mov edx, 0x8000
test dx, ax
je 0x40e73e
or bl, 2
push 0xa4
call edi
mov ecx, 0x8000
test cx, ax
je 0x40e752
or bl, 4
push 0xa5
call edi
mov edx, 0x8000
test dx, ax
je 0x40e766
or bl, 8
push 0x5b
call edi
mov ecx, 0x8000
test cx, ax
je 0x40e777
or bl, 0x40
push 0x5c
call edi
mov edx, 0x8000
test dx, ax
je 0x40e788
or bl, 0x80
cmp dword [0x4a9e50], 0
je 0x40e7c5
mov al, bl
not al
and al, byte [0x4a9d1d]
je 0x40e7c5
mov cl, byte [0x4a9d1f]
not al
and byte [0x4a9d1d], al
and byte [0x4a9d1e], al
and cl, al
mov al, cl
mov byte [0x4a9d1f], cl
mov ecx, 0x4a9d40
call fcn.00411500
mov al, bl
mov ebx, dword [esp + 0x3c]
mov ecx, dword [0x4a6440]
movzx edx, byte [ecx + 0xd2]
mov ecx, dword [esp + 0x50]
push 1
push 0
push ecx
mov esi, 0xffc3d44d
sub esi, edx
mov edx, dword [esp + 0x24]
push eax
push edx
call fcn.00410d00
add esp, 0x14
cmp byte [esp + 0x13], 0
je 0x40e82f
cmp dword [esp + 0x50], 0
jne 0x40e82f
mov eax, dword [esp + 0x5c]
mov edx, dword [esp + 0x58]
mov ecx, dword [0x4a6440]
movzx ecx, byte [ecx + 0xcb]
push eax
mov eax, dword [esp + 0x58]
push ebp
push 1
push edx
push eax
mov al, bl
call fcn.0040fdd0
add esp, 0x14
jmp 0x40e85a
mov ecx, dword [0x4a6440]
movzx edx, byte [ecx + 0xd2]
mov ecx, dword [esp + 0x50]
mov eax, 0xffc3d44d
sub eax, edx
mov edx, dword [esp + 0x40]
push eax
push 1
push ecx
push edx
push ebx
push ebp
call fcn.0040ee80
add esp, 0x18
dec dword [esp + 0x14]
jne 0x40e659
cmp byte [esp + 0x4c], 0
jne 0x40e9a4
cmp dword [0x4ab678], 0
je 0x40e883
mov bl, byte [0x4a8c3d]
jmp 0x40e96f
cmp dword [0x4a9e50], 0
je 0x40e897
mov bl, byte [0x4a9d1d]
jmp 0x40e96f
push 0xa0
xor bl, bl
call edi
mov ecx, 0x8000
test cx, ax
je 0x40e8ac
mov bl, 0x10
push 0xa1
call edi
mov edx, 0x8000
test dx, ax
je 0x40e8c0
or bl, 0x20
push 0xa2
call edi
mov ecx, 0x8000
test cx, ax
je 0x40e8d4
or bl, 1
push 0xa3
call edi
mov edx, 0x8000
test dx, ax
je 0x40e8e8
or bl, 2
push 0xa4
call edi
mov ecx, 0x8000
test cx, ax
je 0x40e8fc
or bl, 4
push 0xa5
call edi
mov edx, 0x8000
test dx, ax
je 0x40e910
or bl, 8
push 0x5b
call edi
mov ecx, 0x8000
test cx, ax
je 0x40e921
or bl, 0x40
push 0x5c
call edi
mov edx, 0x8000
test dx, ax
je 0x40e932
or bl, 0x80
cmp dword [0x4a9e50], 0
je 0x40e96f
mov al, bl
not al
and al, byte [0x4a9d1d]
je 0x40e96f
mov cl, byte [0x4a9d1f]
not al
and byte [0x4a9d1d], al
and byte [0x4a9d1e], al
and cl, al
mov al, cl
mov byte [0x4a9d1f], cl
mov ecx, 0x4a9d40
call fcn.00411500
mov cl, bl
mov al, cl
xor al, byte [esp + 0x44]
mov byte [esp + 0x4c], cl
and al, cl
and al, 0xcc
je 0x40e9a4
mov edx, dword [esp + 0x50]
push 0
not al
push 1
push edx
mov edx, dword [esp + 0x58]
and al, cl
movzx eax, al
push edx
push eax
mov esi, 0xffc3d44d
call fcn.00410d00
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret