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

Disassembly:
sub esp, 0x28
mov dl, byte [esp + 0x34]
push ebx
mov ebx, dword [esp + 0x30]
or al, dl
push ebp
mov ebp, dword [esp + 0x40]
mov byte [esp + 0x10], al
lea eax, [ebx - 1]
push esi
push edi
cmp al, 5
ja 0x4105a5
cmp bl, 3
jne 0x4105ac
lea eax, [ebx + 0x66]
cmp al, 5
ja 0x4105b3
mov byte [esp + 0x13], 1
jmp 0x4105b8
mov byte [esp + 0x13], 0
mov esi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
test ecx, ecx
jle 0x410840
mov dword [esp + 0x14], ecx
cmp dword [0x4aeb5c], 0
jne 0x41062d
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call edi
sub eax, dword [0x4af8b4]
mov ecx, dword [0x4aa988]
cmp eax, dword [ecx + 0xb8]
jbe 0x41062d
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 0x410626
push 1
push 0xffffffffffffffff
mov dword [0x4aa8fc], 0
call fcn.00401420
add esp, 8
mov dword [0x4aa8fc], 1
call edi
mov dword [0x4af8b4], eax
cmp byte [esp + 0x4c], 0
jne 0x4107ce
mov eax, dword [0x4aa988]
mov al, byte [eax + 0xd6]
test al, al
je 0x410653
movzx ecx, al
mov edi, 0xffc3d44d
sub edi, ecx
jmp 0x410658
mov edi, 0xffc3d44f
cmp dword [0x4aeb5c], 0
je 0x41066b
mov al, byte [0x4ad1ed]
jmp 0x4107b5
cmp dword [0x4ae408], 0
je 0x41067e
mov al, byte [0x4ae2d5]
jmp 0x4107b5
push 0xa0
mov byte [esp + 0x16], 0
call esi
mov edx, 0x8000
test dx, ax
je 0x410699
mov byte [esp + 0x12], 0x10
push 0xa1
call esi
mov ecx, 0x8000
test cx, ax
je 0x4106af
or byte [esp + 0x12], 0x20
push 0xa2
call esi
mov edx, 0x8000
test dx, ax
je 0x4106c5
or byte [esp + 0x12], 1
push 0xa3
call esi
mov ecx, 0x8000
test cx, ax
je 0x4106db
or byte [esp + 0x12], 2
push 0xa4
call esi
mov edx, 0x8000
test dx, ax
je 0x4106f1
or byte [esp + 0x12], 4
push 0xa5
call esi
mov ecx, 0x8000
test cx, ax
je 0x410707
or byte [esp + 0x12], 8
push 0x5b
call esi
mov edx, 0x8000
test dx, ax
je 0x41071a
or byte [esp + 0x12], 0x40
push 0x5c
call esi
mov ecx, 0x8000
test cx, ax
je 0x41072d
or byte [esp + 0x12], 0x80
cmp dword [0x4ae408], 0
je 0x4107b0
mov bl, byte [esp + 0x12]
not bl
and bl, byte [0x4ae2d5]
cmp byte [0x4ae2fa], 0
je 0x410766
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [0x4ad1c0]
cmp eax, 0x14
jae 0x410766
mov dl, byte [0x4ae2fa]
not dl
and bl, dl
test bl, bl
je 0x4107ac
mov cl, byte [0x4ae2d7]
mov al, bl
not al
and byte [0x4ae2d5], al
and byte [0x4ae2d6], al
and cl, al
mov al, cl
mov byte [0x4ae2d7], cl
mov ecx, 0x4ae300
call fcn.004135a0
mov eax, dword [0x4ad1e0]
test eax, eax
je 0x4107ac
test byte [eax + 8], bl
je 0x4107ac
mov dword [0x4ad1e0], 0
mov ebx, dword [esp + 0x3c]
movzx eax, byte [esp + 0x12]
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x18]
push 1
push 0
push ecx
push eax
push edx
mov eax, edi
call fcn.00412d90
add esp, 0x14
cmp byte [esp + 0x13], 0
je 0x410807
cmp dword [esp + 0x50], 0
jne 0x410807
mov eax, dword [esp + 0x5c]
mov edx, dword [esp + 0x58]
mov ecx, dword [0x4aa988]
movzx ecx, byte [ecx + 0xcf]
push eax
mov eax, dword [esp + 0x58]
push ebp
push 1
push edx
push eax
mov al, bl
call fcn.00411e70
add esp, 0x14
jmp 0x410832
mov ecx, dword [0x4aa988]
movzx edx, byte [ecx + 0xd6]
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.00410f50
add esp, 0x18
dec dword [esp + 0x14]
jne 0x4105ca
mov dl, byte [esp + 0x44]
cmp byte [esp + 0x4c], 0
jne 0x4109d0
cmp dword [0x4aeb5c], 0
je 0x41085e
mov al, byte [0x4ad1ed]
jmp 0x4109a6
cmp dword [0x4ae408], 0
je 0x410871
mov al, byte [0x4ae2d5]
jmp 0x4109a6
push 0xa0
mov byte [esp + 0x50], 0
call esi
mov ecx, 0x8000
test cx, ax
je 0x41088c
mov byte [esp + 0x4c], 0x10
push 0xa1
call esi
mov edx, 0x8000
test dx, ax
je 0x4108a2
or byte [esp + 0x4c], 0x20
push 0xa2
call esi
mov ecx, 0x8000
test cx, ax
je 0x4108b8
or byte [esp + 0x4c], 1
push 0xa3
call esi
mov edx, 0x8000
test dx, ax
je 0x4108ce
or byte [esp + 0x4c], 2
push 0xa4
call esi
mov ecx, 0x8000
test cx, ax
je 0x4108e4
or byte [esp + 0x4c], 4
push 0xa5
call esi
mov edx, 0x8000
test dx, ax
je 0x4108fa
or byte [esp + 0x4c], 8
push 0x5b
call esi
mov ecx, 0x8000
test cx, ax
je 0x41090d
or byte [esp + 0x4c], 0x40
push 0x5c
call esi
mov edx, 0x8000
test dx, ax
je 0x410920
or byte [esp + 0x4c], 0x80
cmp dword [0x4ae408], 0
je 0x41099e
mov bl, byte [esp + 0x4c]
not bl
and bl, byte [0x4ae2d5]
cmp byte [0x4ae2fa], 0
je 0x410958
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [0x4ad1c0]
cmp eax, 0x14
jae 0x410958
mov al, byte [0x4ae2fa]
not al
and bl, al
test bl, bl
je 0x41099e
mov cl, byte [0x4ae2d7]
mov al, bl
not al
and byte [0x4ae2d5], al
and byte [0x4ae2d6], al
and cl, al
mov al, cl
mov byte [0x4ae2d7], cl
mov ecx, 0x4ae300
call fcn.004135a0
mov eax, dword [0x4ad1e0]
test eax, eax
je 0x41099e
test byte [eax + 8], bl
je 0x41099e
mov dword [0x4ad1e0], 0
mov al, byte [esp + 0x4c]
mov dl, byte [esp + 0x44]
not dl
and dl, al
and dl, 0xcc
mov byte [esp + 0x44], dl
je 0x4109d0
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x44]
push 0
push 1
push ecx
push edx
push 0
mov eax, 0xffc3d44d
call fcn.00412d90
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret