Function at 0x640b10
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0xc], eax
xor edx, edx
push ebp
push 0x640f9e
push dword fs:[edx]
mov dword fs:[edx], esp
cmp dword [ebp + 8], 3
jne 0x640b3c
call fcn.00404b54
jmp 0x640fa5
cmp byte [0x74e848], 0
je 0x640b56
mov dword [ebp - 0xc], 1
call fcn.00404b54
jmp 0x640fa5
cmp dword [ebp + 0xc], 0xe5
jne 0x640b69
call fcn.00404b54
jmp 0x640fa5
cmp dword [ebp + 8], 0
jl 0x640f60
cmp byte [0x74e880], 0
je 0x640ba9
mov eax, dword [ebp + 0xc]
cmp eax, dword [0x74e884]
jne 0x640ba9
mov eax, dword [ebp + 0x10]
shr eax, 0x1f
test al, 1
je 0x640ba9
mov byte [0x74e880], 0
mov dword [ebp - 0xc], 1
call fcn.00404b54
jmp 0x640fa5
call fcn.00639fe4
test eax, eax
je 0x640ca6
call fcn.00639fe4
call fcn.006536a4
cmp byte [eax + 0x52], 0
jne 0x640ca6
call fcn.00639fe4
mov edx, dword [eax]
call dword [edx + 0xf4]
test al, al
jne 0x640c75
call fcn.00639fe4
mov edi, eax
mov esi, dword [edi + 0x25c]
mov eax, esi
mov edx, dword [0x6380b8]
call fcn.0040439c
test al, al
je 0x640c07
cmp byte [esi + 0x2c], 0
jne 0x640ca6
mov eax, dword [ebp + 0x10]
shr eax, 0x1f
test al, 1
sete bl
test bl, bl
je 0x640c25
mov byte [0x74e880], 1
mov eax, dword [ebp + 0xc]
mov dword [0x74e884], eax
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 0xc]
push eax
xor eax, eax
mov al, bl
mov eax, dword [eax*4 + 0x74856c]
push eax
mov eax, edi
call fcn.004a0e60
push eax
call sub.user32.dll_SendMessageA
call fcn.00639fe4
test eax, eax
jne 0x640c5d
mov eax, dword [ebp + 0xc]
push eax
call sub.user32.dll_GetAsyncKeyState
test ax, ax
jl 0x640c64
mov byte [0x74e880], 0
mov dword [ebp - 0xc], 1
call fcn.00404b54
jmp 0x640fa5
cmp dword [ebp + 0xc], 0x1b
jne 0x640ca6
call fcn.00639fe4
call fcn.004a0e60
mov ebx, eax
call sub.user32.dll_GetCapture
cmp ebx, eax
jne 0x640ca6
call sub.user32.dll_ReleaseCapture
mov dword [ebp - 0xc], 1
call fcn.00404b54
jmp 0x640fa5
call sub.user32.dll_GetCapture
test eax, eax
jne 0x640f60
cmp dword [ebp + 0xc], 0x5d
jne 0x640cc3
mov eax, dword [ebp + 0x10]
shr eax, 0x1f
test al, 1
jne 0x640ce2
cmp dword [ebp + 0xc], 0x79
jne 0x640d28
mov eax, dword [ebp + 0x10]
shr eax, 0x1f
test al, 1
jne 0x640d28
call fcn.0064073c
mov dl, byte [0x640fb4]
cmp dl, al
jne 0x640d28
lea eax, [ebp - 0x10]
call fcn.006406d4
mov ebx, eax
test ebx, ebx
je 0x640d28
lea ecx, [ebp - 0x18]
or edx, 0xffffffff
or eax, 0xffffffff
call fcn.00424358
lea eax, [ebp - 0x18]
push eax
call sub.user32.dll_GetFocus
mov ecx, eax
mov edx, dword [ebp - 0x10]
mov eax, ebx
call fcn.00640458
test al, al
je 0x640d28
mov dword [ebp - 0xc], 1
call fcn.00404b54
jmp 0x640fa5
call sub.user32.dll_GetActiveWindow
call fcn.00494558
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov edx, dword [0x4b32e4]
call fcn.0040439c
test al, al
je 0x640d5e
mov eax, dword [ebp - 0x10]
call fcn.004a0e60
push eax
call sub.user32.dll_IsWindowEnabled
test eax, eax
je 0x640d5e
mov ebx, dword [ebp - 0x10]
jmp 0x640d60
xor ebx, ebx
test ebx, ebx
je 0x640e89
test byte [ebx + 0x1c], 0x10
jne 0x640e89
mov esi, ebx
cmp byte [esi + 0x22f], 2
jne 0x640d91
mov eax, esi
call fcn.004b8650
test eax, eax
je 0x640d91
mov eax, esi
call fcn.004b8650
mov ebx, eax
mov eax, ebx
call fcn.00639ff8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x640de5
test byte [ebx + 0x2f4], 8
jne 0x640de5
mov eax, ebx
call fcn.004a0e60
push eax
call sub.user32.dll_GetParent
call fcn.00494558
mov edx, dword [0x4b32e4]
call fcn.0040439c
test al, al
je 0x640de5
mov eax, ebx
call fcn.004a0e60
push eax
call sub.user32.dll_GetParent
call fcn.00494558
call fcn.00639ff8
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], eax
cmp byte [ebx + 0x22f], 1
je 0x640e46
mov al, byte [ebx + 0x22f]
dec eax
sub al, 2
jb 0x640e58
cmp dword [ebp - 4], 0
jne 0x640e58
mov eax, dword [0x74c914]
mov eax, dword [eax]
mov eax, dword [eax + 0x44]
call fcn.00639ff8
test eax, eax
je 0x640e58
mov eax, dword [0x74c914]
mov eax, dword [eax]
mov eax, dword [eax + 0x44]
call fcn.00639ff8
cmp byte [eax + 0x30], 0
je 0x640e58
mov eax, dword [0x74c914]
mov eax, dword [eax]
mov eax, dword [eax + 0x44]
call fcn.004a0e60
push eax
call sub.user32.dll_IsWindowEnabled
test eax, eax
je 0x640e58
mov eax, dword [0x74c914]
mov eax, dword [eax]
mov eax, dword [eax + 0x44]
call fcn.00639ff8
mov dword [ebp - 4], eax
cmp dword [ebp - 8], 0
jne 0x640e66
mov eax, dword [ebp - 4]
mov dword [ebp - 8], eax
jmp 0x640e93
cmp byte [ebx + 0x22f], 1
jne 0x640e93
mov eax, dword [ebp - 8]
call fcn.0064281c
test eax, eax
je 0x640e93
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov dword [ebp - 4], edx
mov dword [ebp - 8], eax
jmp 0x640e93
xor eax, eax
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp - 8], eax
cmp dword [ebp - 4], 0
je 0x640f60
mov eax, dword [ebp - 4]
call fcn.0064235c
test al, al
jne 0x640f60
mov eax, dword [ebp - 4]
call fcn.0064214c
test al, al
jne 0x640f60
mov eax, dword [ebp + 0x10]
shr eax, 0x1f
test al, 1
je 0x640f3c
mov eax, dword [ebp - 4]
call fcn.0064281c
test eax, eax
je 0x640f33
cmp dword [ebp + 0xc], 0x12
sete al
and al, byte [0x74e881]
je 0x640eeb
call fcn.00640708
test al, al
je 0x640f0c
mov eax, dword [ebp - 4]
cmp byte [eax + 0x13d], 0
je 0x640f33
cmp dword [ebp + 0xc], 0x79
jne 0x640f33
call fcn.0064073c
mov dl, byte [0x640fb8]
cmp dl, al
jne 0x640f33
mov byte [0x74e881], 0
mov eax, dword [ebp - 4]
call fcn.0064281c
xor edx, edx
mov ecx, dword [eax]
call dword [ecx + 0x190]
mov dword [ebp - 0xc], 1
call fcn.00404b54
jmp 0x640fa5
mov byte [0x74e881], 0
jmp 0x640f60
cmp dword [ebp + 0xc], 0x12
jne 0x640f4b
mov byte [0x74e881], 1
jmp 0x640f60
mov byte [0x74e881], 0
push ebp
call fcn.006409fc
pop ecx
call fcn.00404b54
jmp 0x640fa5
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x640fa5
cmp byte [0x74e882], 0
je 0x640f7d
xor eax, eax
mov dword [ebp - 0xc], eax
jmp 0x640f9d
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
mov eax, dword [0x74e874]
push eax
call sub.user32.dll_CallNextHookEx
cmp dword [ebp - 0xc], 0
jne 0x640f9d
mov dword [ebp - 0xc], eax
ret
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc