Function at 0xf78610f
Capabilities:
Check for foreground window switch
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
push edi
xor esi, esi
call fcn.0f72465b
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x28], esi
mov dword [0xf7ae79c], esi
mov dword [0xf7ae7a0], esi
mov ax, word [0xf7bac60]
mov edi, 1
and ax, 0x3ff
mov dword [0xf7ae7b0], esi
cmp ax, 0x11
mov dword [0xf7ae7ac], esi
mov dword [ebp - 0x14], esi
mov dword [0xf7ae7a4], edi
jne 0xf786199
call sym.VB40032.DLL_rtcDoEvents
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push eax
mov ebx, eax
call fcn.0f79ced1
test eax, eax
je 0xf786199
push ebx
call fcn.0f79cec1
push ebx
mov dword [ebp - 0x28], edi
call fcn.0f79ced1
test eax, eax
je 0xf786199
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0
call edi
push ebx
call fcn.0f79ced1
test eax, eax
jne 0xf78618b
mov ax, word [0xf7bac60]
and ax, 0x3ff
cmp ax, 0x12
jne 0xf786226
call sym.VB40032.DLL_rtcDoEvents
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push eax
call fcn.0f79cfa0
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
je 0xf786226
test al, 4
je 0xf786202
mov eax, dword [0xf7ae7a4]
push eax
push 1
push 0x15
push 0x100
call fcn.0f786067
mov esi, eax
test esi, esi
jne 0xf78675b
mov eax, dword [0xf7ae7a4]
push eax
push 1
push 0x15
push 0x101
call fcn.0f786067
mov esi, eax
test esi, esi
jne 0xf78675b
test byte [ebp - 0xc], 8
je 0xf786226
mov eax, dword [0xf7ae7a4]
push eax
push 1
push 0x17
push 0x100
call fcn.0f786067
mov esi, eax
test esi, esi
jne 0xf78675b
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], ecx
lea edx, [ecx + eax*2]
mov dword [ebp - 0x20], edx
cmp edx, ecx
jbe 0xf786476
mov dword [ebp - 8], 1
mov eax, dword [ebp - 0x10]
mov ax, word [eax]
add dword [ebp - 0x10], 2
mov word [ebp - 2], ax
push dword [ebp - 2]
push dword [ebp - 0x1c]
call fcn.0f79ce3e
mov di, ax
movzx eax, di
cmp eax, 0x28
jg 0xf7863db
je 0xf78656e
cmp eax, 0x25
je 0xf78641b
push dword [ebp - 2]
cmp dword [0xf7ae760], 0
je 0xf78686a
call dword [sym.imp.USER32.dll_VkKeyScanA]
movsx ebx, ax
cmp ebx, 0xffffffff
je 0xf7868ac
cmp dword [0xf7ae760], 0
je 0xf7862b2
cmp word [ebp - 2], 0xff
ja 0xf7868ac
mov edi, ebx
and edi, 0xff
cmp dword [0xf7ae7ac], 0
jne 0xf7862fa
test bh, 1
je 0xf7862fa
mov eax, dword [0xf7ae7a4]
push eax
push 1
push 0x10
push 0x100
call fcn.0f786067
mov esi, eax
test esi, esi
jne 0xf78675b
mov dword [0xf7ae7a4], 0
mov dword [0xf7ae7ac], 0xa
cmp dword [0xf7ae7b0], 0
jne 0xf78633a
test bh, 2
je 0xf78633a
mov eax, dword [0xf7ae7a4]
push eax
push 1
push 0x11
push 0x100
call fcn.0f786067
mov esi, eax
test esi, esi
jne 0xf78675b
mov dword [0xf7ae7a4], 0
mov dword [0xf7ae7b0], 0xa
cmp dword [0xf7ae7a0], 0
jne 0xf78637a
test bh, 4
je 0xf78637a
mov eax, dword [0xf7ae7a4]
push eax
push 1
push 0x12
push 0x100
call fcn.0f786067
mov esi, eax
test esi, esi
jne 0xf78675b
mov dword [0xf7ae7a4], 0
mov dword [0xf7ae7a0], 0xa
mov ax, word [0xf7bac60]
and ax, 0x3ff
cmp ax, 0x11
jne 0xf786791
cmp dword [0xf7ae79c], 0
jne 0xf786791
test bh, 8
je 0xf786791
mov eax, dword [0xf7ae7a4]
push eax
push 1
push 0x15
push 0x100
call fcn.0f786067
mov esi, eax
test esi, esi
jne 0xf78675b
mov dword [0xf7ae7a4], 0
mov dword [0xf7ae79c], 0xa
jmp 0xf786791
cmp eax, 0x29
je 0xf7865b7
cmp eax, 0x2b
je 0xf7865f5
cmp eax, 0x5e
je 0xf786639
cmp eax, 0x7b
je 0xf78667d
cmp eax, 0x7d
je 0xf786756
cmp eax, 0x7e
jne 0xf78627b
mov edi, 0xd
jmp 0xf786791
cmp dword [0xf7ae7a0], 0
jne 0xf786756
cmp dword [0xf7ae7b0], 1
mov eax, dword [0xf7ae7a4]
push eax
push 1
sbb eax, eax
push 0x12
and eax, 4
add eax, 0x100
movzx ecx, ax
push ecx
call fcn.0f786067
mov esi, eax
test esi, esi
jne 0xf78675b
mov dword [0xf7ae7a4], 0
mov dword [0xf7ae7a0], 0xa
mov eax, dword [ebp - 0x10]
cmp dword [ebp - 0x20], eax
ja 0xf78623d
mov ax, word [0xf7bac60]
and ax, 0x3ff
cmp ax, 0x11
jne 0xf7864c8
cmp dword [ebp - 0x28], 0
je 0xf7864c8
mov eax, dword [0xf7ae7a4]
push eax
push 1
push 0x19
push 0x104
call fcn.0f786067
mov esi, eax
test esi, esi
jne 0xf78675b
mov eax, dword [0xf7ae7a4]
push eax
push 1
push 0x19
push 0x105
call fcn.0f786067
mov esi, eax
test esi, esi
jne 0xf78675b
mov ax, word [0xf7bac60]
and ax, 0x3ff
cmp ax, 0x12
jne 0xf786544
cmp dword [ebp - 0xc], 0xffffffff
je 0xf786544
test byte [ebp - 0xc], 4
je 0xf786520
mov eax, dword [0xf7ae7a4]
push eax
push 1
push 0x15
push 0x100
call fcn.0f786067
mov esi, eax
test esi, esi
jne 0xf78675b
mov eax, dword [0xf7ae7a4]
push eax
push 1
push 0x15
push 0x101
call fcn.0f786067
mov esi, eax
test esi, esi
jne 0xf78675b
test byte [ebp - 0xc], 8
je 0xf786544
mov eax, dword [0xf7ae7a4]
push eax
push 1
push 0x17
push 0x100
call fcn.0f786067
mov esi, eax
test esi, esi
jne 0xf78675b
cmp dword [ebp - 0x14], 0
jne 0xf786756
push 0xa
push 0xf7ae79c
push 0xf7ae7a0
push 0xf7ae7b0
push 0xf7ae7ac
call fcn.0f786b4e
jmp 0xf78675b
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], 3
jg 0xf786756
cmp dword [0xf7ae7ac], 0xa
jne 0xf78658c
mov eax, dword [ebp - 0x14]
mov dword [0xf7ae7ac], eax
cmp dword [0xf7ae7b0], 0xa
jne 0xf78659d
mov eax, dword [ebp - 0x14]
mov dword [0xf7ae7b0], eax
cmp dword [0xf7ae7a0], 0xa
jne 0xf78646a
mov eax, dword [ebp - 0x14]
mov dword [0xf7ae7a0], eax
jmp 0xf78646a
cmp dword [ebp - 0x14], 0
jle 0xf786756
push dword [ebp - 0x14]
push 0xf7ae79c
push 0xf7ae7a0
push 0xf7ae7b0
push 0xf7ae7ac
call fcn.0f786b4e
dec dword [ebp - 0x14]
jne 0xf78646a
mov dword [0xf7ae7a4], 1
jmp 0xf78646a
cmp dword [0xf7ae7ac], 0
jne 0xf786756
mov eax, dword [0xf7ae7a4]
push eax
push 1
push 0x10
push 0x100
call fcn.0f786067
mov esi, eax
test esi, esi
jne 0xf78675b
mov dword [0xf7ae7a4], 0
mov dword [0xf7ae7ac], 0xa
jmp 0xf78646a
cmp dword [0xf7ae7b0], 0
jne 0xf786756
mov eax, dword [0xf7ae7a4]
push eax
push 1
push 0x11
push 0x100
call fcn.0f786067
mov esi, eax
test esi, esi
jne 0xf78675b
mov dword [0xf7ae7a4], 0
mov dword [0xf7ae7b0], 0xa
jmp 0xf78646a
push dword [ebp - 0x20]
push 0x7d
push dword [ebp - 0x10]
call fcn.0f78698e
mov dword [ebp - 0x18], eax
test eax, eax
je 0xf786756
push eax
push 0x20
mov eax, dword [ebp - 0x10]
add eax, 2
push eax
call fcn.0f78698e
mov ebx, eax
test ebx, ebx
jne 0xf7866d3
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x10]
sub ecx, eax
cmp ecx, 0xfffffffe
jne 0xf786773
mov eax, dword [ebp - 0x10]
mov ax, word [eax]
mov word [ebp - 2], ax
mov eax, dword [ebp - 0x18]
add eax, 2
mov dword [ebp - 0x10], eax
jmp 0xf78627b
cmp word [ebx], 0
mov dword [ebp - 0x24], ebx
je 0xf78671b
movsx ax, byte [ebx]
push eax
push dword [ebp - 0x1c]
call fcn.0f79ce3e
mov di, ax
push 8
push edi
call dword [sym.imp.MSVCRT20.dll_iswctype]
add esp, 8
test eax, eax
je 0xf786705
add ebx, 2
cmp word [ebx], 0
jne 0xf7866dc
cmp word [ebx], 0
je 0xf78671b
push 4
push edi
call dword [sym.imp.MSVCRT20.dll_iswctype]
add esp, 8
test eax, eax
je 0xf786756
mov dword [ebp - 8], 0
cmp word [ebx], 0
je 0xf786766
push 4
push edi
call dword [sym.imp.MSVCRT20.dll_iswctype]
add esp, 8
test eax, eax
je 0xf786766
mov ecx, dword [ebp - 8]
add ebx, 2
imul ecx, ecx, 0xa
movzx eax, di
movsx di, byte [ebx]
lea eax, [eax + ecx - 0x30]
mov dword [ebp - 8], eax
cmp eax, 0x1ff0
jl 0xf786722
mov esi, 5
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp dword [ebp - 0x18], ebx
jne 0xf786756
mov eax, dword [ebp - 0x24]
jmp 0xf7866ad
push eax
push dword [ebp - 0x10]
call fcn.0f7869ef
mov edi, eax
test edi, edi
jl 0xf786756
mov eax, dword [ebp - 0x18]
lea eax, [eax + 2]
mov dword [ebp - 0x10], eax
je 0xf78646a
dec dword [ebp - 8]
js 0xf78696a
mov ax, word [0xf7bac60]
and ax, 0x3ff
cmp ax, 0x11
jne 0xf7867af
cmp edi, 0x19
je 0xf786791
cmp dword [0xf7ae7a0], 0
mov eax, 0x100
je 0xf7867ce
cmp dword [0xf7ae7b0], 1
sbb eax, eax
and eax, 4
add eax, 0x100
push dword [0xf7ae7a4]
push 1
movzx ebx, di
movzx eax, ax
push ebx
push eax
call fcn.0f786067
mov esi, eax
test esi, esi
jne 0xf78675b
mov dword [0xf7ae7a4], 0
mov ax, word [0xf7bac60]
and ax, 0x3ff
cmp ax, 0x12
jne 0xf78682e
cmp dword [ebp - 0xc], 0xffffffff
je 0xf78681f
cmp edi, 0x15
jne 0xf786816
xor byte [ebp - 0xc], 4
cmp edi, 0x17
jne 0xf78681f
xor byte [ebp - 0xc], 8
cmp ax, 0x12
jne 0xf78682e
cmp edi, 0x17
je 0xf786791
cmp dword [0xf7ae7a0], 0
mov eax, 0x101
je 0xf78684d
cmp dword [0xf7ae7b0], 1
sbb eax, eax
and eax, 4
add eax, 0x101
movzx eax, ax
push 0
push 1
push ebx
push eax
call fcn.0f786067
mov esi, eax
test esi, esi
jne 0xf78675b
jmp 0xf786791
call dword [sym.imp.USER32.dll_VkKeyScanW]
jmp 0xf786291
cmp eax, 1
jl 0xf7868ac
mov eax, dword [0xf7ae7a4]
push eax
push 1
xor eax, eax
mov ax, word [ebp - 2]
and eax, 0xff
push eax
push 0x102
call fcn.0f786067
mov esi, eax
test esi, esi
jne 0xf78675b
mov dword [0xf7ae7a4], 0
dec dword [ebp - 8]
js 0xf78696a
cmp dword [0xf7ae760], 0
je 0xf786944
mov ax, word [ebp - 2]
push 0
mov word [ebp - 4], ax
push 0
push 2
lea ecx, [ebp - 2]
push ecx
lea eax, [ebp - 4]
push 1
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp eax, 2
jl 0xf786875
mov eax, dword [0xf7ae7a4]
push eax
push 1
xor eax, eax
mov ax, word [ebp - 2]
and eax, 0xff
push eax
push 0x102
call fcn.0f786067
mov esi, eax
test esi, esi
jne 0xf78675b
mov ax, word [ebp - 2]
push 0
shr ax, 8
push 1
mov dword [0xf7ae7a4], 0
movzx ecx, ax
push ecx
push 0x102
call fcn.0f786067
mov esi, eax
test esi, esi
jne 0xf78675b
jmp 0xf7868ac
movzx ecx, word [ebp - 2]
mov eax, dword [0xf7ae7a4]
push eax
push 1
push ecx
push 0x102
call fcn.0f786067
mov esi, eax
test esi, esi
jne 0xf78675b
jmp 0xf7868ac
push 0xa
push 0xf7ae79c
push 0xf7ae7a0
push 0xf7ae7b0
push 0xf7ae7ac
call fcn.0f786b4e
cmp dword [ebp - 0x14], 0
jmp 0xf7865e0