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

Disassembly:
mov al, byte [esp + 4]
sub esp, 0x28
test al, al
jne 0x40c169
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x40c169
xor eax, eax
add esp, 0x28
ret
push ebx
mov ebx, dword [esp + 0x40]
test ebx, ebx
jle 0x40c703
mov cl, byte [esp + 0x3c]
xor eax, eax
test cl, 0xc0
je 0x40c186
mov eax, 8
test cl, 0xc
je 0x40c18e
or eax, 1
test cl, 0x30
je 0x40c196
or eax, 4
test cl, 3
je 0x40c19e
or eax, 2
mov ecx, dword [esp + 0x38]
push ebp
push esi
mov esi, dword [sym.imp.USER32.dll_GetKeyState]
or eax, ecx
test ebx, ebx
push edi
mov edi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
mov ebp, eax
jle 0x40c4a2
mov dword [esp + 0x18], ebx
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
sub eax, dword [0x45ef34]
cmp eax, 5
jbe 0x40c20e
push 0
push 0
push 0
push 0
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x40c203
push 0
push 0xffffffffffffffff
mov byte [0x45b056], 0
call fcn.00401650
add esp, 8
mov byte [0x45b056], 1
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov dword [0x45ef34], eax
mov al, byte [esp + 0x54]
test al, al
jne 0x40c470
mov eax, dword [0x45d800]
test eax, eax
je 0x40c22e
mov cl, byte [0x45d6fc]
jmp 0x40c459
mov al, byte [0x45f111]
xor bl, bl
test al, al
mov byte [esp + 0x13], bl
jne 0x40c2ce
mov al, byte [0x45f112]
test al, al
jne 0x40c2ce
push 0xa0
call esi
test ah, ah
jns 0x40c25f
mov bl, 0x10
mov byte [esp + 0x13], bl
push 0xa1
call esi
test ah, ah
jns 0x40c271
or bl, 0x20
mov byte [esp + 0x13], bl
push 0xa2
call esi
test ah, ah
jns 0x40c283
or bl, 1
mov byte [esp + 0x13], bl
push 0xa3
call esi
test ah, ah
jns 0x40c295
or bl, 2
mov byte [esp + 0x13], bl
push 0xa4
call esi
test ah, ah
jns 0x40c2a7
or bl, 4
mov byte [esp + 0x13], bl
push 0xa5
call esi
test ah, ah
jns 0x40c2b9
or bl, 8
mov byte [esp + 0x13], bl
push 0x5b
call esi
test ah, ah
jns 0x40c340
or bl, 0x40
mov byte [esp + 0x13], bl
jmp 0x40c340
push 0x10
call edi
movsx edx, ax
test edx, edx
js 0x40c2e1
push 0x10
call esi
test ah, ah
jns 0x40c2e7
mov bl, 0x10
mov byte [esp + 0x13], bl
push 0x11
call edi
movsx eax, ax
test eax, eax
js 0x40c2fa
push 0x11
call esi
test ah, ah
jns 0x40c301
or bl, 1
mov byte [esp + 0x13], bl
push 0x12
call edi
movsx ecx, ax
test ecx, ecx
js 0x40c314
push 0x12
call esi
test ah, ah
jns 0x40c31b
or bl, 4
mov byte [esp + 0x13], bl
push 0x5b
call edi
movsx edx, ax
test edx, edx
js 0x40c32e
push 0x5b
call esi
test ah, ah
jns 0x40c335
or bl, 0x40
mov byte [esp + 0x13], bl
push 0x5c
call edi
movsx eax, ax
test eax, eax
js 0x40c348
push 0x5c
call esi
test ah, ah
jns 0x40c34f
or bl, 0x80
mov byte [esp + 0x13], bl
mov eax, dword [0x45d800]
test eax, eax
je 0x40c451
mov al, byte [0x45d6fc]
mov cl, bl
not cl
and cl, al
je 0x40c451
mov bl, byte [0x45d6fc]
mov al, byte [0x45d6fe]
mov dl, byte [0x45d6fd]
not cl
and bl, cl
mov byte [0x45d6fc], bl
and al, cl
mov bl, al
shl bl, 7
mov byte [0x45d7a2], bl
mov bl, al
and bl, 0xfe
shl bl, 6
mov byte [0x45d7a3], bl
mov bl, al
and bl, 0xfc
shl bl, 5
mov byte [0x45d7a4], bl
and dl, cl
mov bl, al
and bl, 0xf8
shl bl, 4
mov byte [0x45d6fd], dl
mov byte [0x45d7a5], bl
mov cl, al
mov dl, al
mov bl, al
and cl, 0xf0
and dl, 0xe0
and bl, 0xc0
shl cl, 3
mov byte [0x45d6fe], al
shl dl, 2
shl bl, 1
and al, 0x80
test cl, cl
mov byte [0x45d7a0], cl
mov byte [0x45d7a1], dl
mov byte [0x45d75b], bl
mov byte [0x45d75c], al
jne 0x40c40a
test dl, dl
mov byte [0x45d710], cl
je 0x40c411
mov byte [0x45d710], 0x80
mov al, byte [0x45d7a2]
test al, al
jne 0x40c42a
mov al, byte [0x45d7a3]
test al, al
mov byte [0x45d711], 0
je 0x40c431
mov byte [0x45d711], 0x80
mov al, byte [0x45d7a4]
test al, al
jne 0x40c44a
mov al, byte [0x45d7a5]
test al, al
mov byte [0x45d712], 0
je 0x40c451
mov byte [0x45d712], 0x80
mov cl, byte [esp + 0x13]
mov ebx, dword [esp + 0x4c]
mov byte [esp + 0x14], cl
mov edx, dword [esp + 0x14]
push 0xffc3d44f
push edx
push ebp
call fcn.0040c080
add esp, 0xc
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x3c]
push 0xffc3d44d
push 1
push eax
mov eax, dword [esp + 0x5c]
push ecx
push edx
push eax
call fcn.0040aeb0
mov eax, dword [esp + 0x30]
add esp, 0x18
dec eax
mov dword [esp + 0x18], eax
jne 0x40c1c1
mov al, byte [esp + 0x54]
test al, al
jne 0x40c700
mov eax, dword [0x45d800]
test eax, eax
je 0x40c4c2
mov cl, byte [0x45d6fc]
jmp 0x40c6e5
mov al, byte [0x45f111]
xor bl, bl
test al, al
mov byte [esp + 0x3c], bl
jne 0x40c562
mov al, byte [0x45f112]
test al, al
jne 0x40c562
push 0xa0
call esi
test ah, ah
jns 0x40c4f3
mov bl, 0x10
mov byte [esp + 0x3c], bl
push 0xa1
call esi
test ah, ah
jns 0x40c505
or bl, 0x20
mov byte [esp + 0x3c], bl
push 0xa2
call esi
test ah, ah
jns 0x40c517
or bl, 1
mov byte [esp + 0x3c], bl
push 0xa3
call esi
test ah, ah
jns 0x40c529
or bl, 2
mov byte [esp + 0x3c], bl
push 0xa4
call esi
test ah, ah
jns 0x40c53b
or bl, 4
mov byte [esp + 0x3c], bl
push 0xa5
call esi
test ah, ah
jns 0x40c54d
or bl, 8
mov byte [esp + 0x3c], bl
push 0x5b
call esi
test ah, ah
jns 0x40c5d4
or bl, 0x40
mov byte [esp + 0x3c], bl
jmp 0x40c5d4
push 0x10
call edi
movsx edx, ax
test edx, edx
js 0x40c575
push 0x10
call esi
test ah, ah
jns 0x40c57b
mov bl, 0x10
mov byte [esp + 0x3c], bl
push 0x11
call edi
movsx eax, ax
test eax, eax
js 0x40c58e
push 0x11
call esi
test ah, ah
jns 0x40c595
or bl, 1
mov byte [esp + 0x3c], bl
push 0x12
call edi
movsx ecx, ax
test ecx, ecx
js 0x40c5a8
push 0x12
call esi
test ah, ah
jns 0x40c5af
or bl, 4
mov byte [esp + 0x3c], bl
push 0x5b
call edi
movsx edx, ax
test edx, edx
js 0x40c5c2
push 0x5b
call esi
test ah, ah
jns 0x40c5c9
or bl, 0x40
mov byte [esp + 0x3c], bl
push 0x5c
call edi
movsx eax, ax
test eax, eax
js 0x40c5dc
push 0x5c
call esi
test ah, ah
jns 0x40c5e3
or bl, 0x80
mov byte [esp + 0x3c], bl
mov eax, dword [0x45d800]
test eax, eax
je 0x40c6dd
mov al, byte [0x45d6fc]
mov cl, bl
not cl
and cl, al
je 0x40c6dd
mov bl, byte [0x45d6fd]
mov al, byte [0x45d6fe]
not cl
and bl, cl
mov byte [0x45d6fd], bl
and al, cl
mov dl, byte [0x45d6fc]
mov bl, al
shl bl, 7
mov byte [0x45d7a2], bl
mov bl, al
and bl, 0xfe
shl bl, 6
mov byte [0x45d7a3], bl
mov bl, al
and bl, 0xfc
shl bl, 5
mov byte [0x45d7a4], bl
mov bl, al
and bl, 0xf8
shl bl, 4
mov byte [0x45d7a5], bl
and dl, cl
mov bl, al
and bl, 0xc0
shl bl, 1
mov byte [0x45d6fc], dl
mov cl, al
mov dl, al
mov byte [0x45d75b], bl
mov byte [0x45d6fe], al
mov bl, 0x80
and al, bl
and cl, 0xf0
and dl, 0xe0
shl cl, 3
mov byte [0x45d75c], al
shl dl, 2
xor al, al
cmp cl, al
mov byte [0x45d7a0], cl
mov byte [0x45d7a1], dl
jne 0x40c6a1
cmp dl, al
mov byte [0x45d710], al
je 0x40c6a7
mov byte [0x45d710], bl
cmp byte [0x45d7a2], al
jne 0x40c6bc
cmp byte [0x45d7a3], al
mov byte [0x45d711], al
je 0x40c6c2
mov byte [0x45d711], bl
cmp byte [0x45d7a4], al
jne 0x40c6d7
cmp byte [0x45d7a5], al
mov byte [0x45d712], al
je 0x40c6dd
mov byte [0x45d712], bl
mov cl, byte [esp + 0x3c]
mov ebx, dword [esp + 0x4c]
mov eax, dword [esp + 0x48]
mov byte [esp + 0x3c], cl
mov edx, dword [esp + 0x3c]
push 0xffc3d44d
push edx
push eax
call fcn.0040b420
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x28
ret