Function at 0x661784
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff98
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x64], ecx
mov dword [ebp - 0x60], ecx
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x58], ecx
mov dword [ebp - 4], ecx
mov edi, edx
mov esi, eax
xor eax, eax
push ebp
push 0x66204c
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [esi + 0x439], 0
cmp byte [esi + 0x438], 0
jne 0x6617d5
mov dword [edi + 0xc], 1
mov word [edi + 4], 0
jmp 0x662029
movzx eax, word [0x66205c]
mov word [ebp - 7], ax
push 0x11
call sub.user32.dll_GetKeyState
movsx eax, ax
and eax, 0x8000
cmp eax, 0x8000
sete bl
push 0x10
call sub.user32.dll_GetKeyState
movsx eax, ax
and eax, 0x8000
cmp eax, 0x8000
sete byte [ebp - 5]
test bl, bl
je 0x66181e
movzx eax, word [0x662060]
or word [ebp - 7], ax
cmp byte [ebp - 5], 0
je 0x66182f
movzx eax, word [0x662064]
or word [ebp - 7], ax
mov eax, dword [esi + 0x3b8]
test eax, eax
je 0x661862
cmp byte [eax + 0x69], 0
jne 0x661862
cmp word [edi + 4], 0x26
je 0x66184d
cmp word [edi + 4], 0x28
jne 0x661862
mov edx, edi
mov eax, esi
call fcn.0054a7f4
mov dword [edi + 0xc], 1
jmp 0x662029
cmp word [edi + 4], 0xd
jne 0x661870
mov byte [esi + 0x439], 1
cmp word [edi + 4], 0xd
jne 0x6618a0
cmp byte [esi + 0x324], 0
je 0x6618a0
test bl, bl
jne 0x6618a0
mov word [edi + 4], 9
push 0
push 9
push pe_nt_image_headers32
mov eax, esi
call fcn.0054be48
push eax
call sub.user32.dll_PostMessageW
cmp byte [esi + 0x439], 0
je 0x6618ca
cmp dword [esi + 0x3b8], 0
je 0x6618ca
mov eax, dword [esi + 0x3b8]
cmp byte [eax + 0x69], 0
je 0x6618ca
mov eax, esi
call fcn.00666dc0
jmp 0x662029
movzx eax, word [edi + 4]
sub ax, 9
je 0x6618de
sub ax, 4
je 0x6618de
xor eax, eax
jmp 0x6618e0
mov al, 1
test al, bl
je 0x6618f2
mov edx, edi
mov eax, esi
call fcn.0054a8a4
jmp 0x662029
cmp word [edi + 4], 0x24
jne 0x66192a
cmp dword [esi + 0x3b8], 0
je 0x66192a
mov eax, dword [esi + 0x3b8]
cmp byte [eax + 0x69], 0
je 0x66192a
mov eax, dword [esi + 0x3bc]
xor edx, edx
mov ecx, dword [eax]
call dword [ecx + 0x128]
mov dword [edi + 0xc], 1
jmp 0x662029
cmp word [edi + 4], 0x23
jne 0x661974
cmp dword [esi + 0x3b8], 0
je 0x661974
mov eax, dword [esi + 0x3b8]
cmp byte [eax + 0x69], 0
je 0x661974
mov eax, dword [esi + 0x3bc]
mov eax, dword [eax + 0x2b0]
mov edx, dword [eax]
call dword [edx + 0x14]
mov edx, eax
dec edx
mov eax, dword [esi + 0x3bc]
mov ecx, dword [eax]
call dword [ecx + 0x128]
mov dword [edi + 0xc], 1
jmp 0x662029
cmp word [edi + 4], 0x22
jne 0x661a21
cmp dword [esi + 0x3b8], 0
je 0x661a21
mov eax, dword [esi + 0x3b8]
cmp byte [eax + 0x69], 0
je 0x661a21
mov eax, dword [esi + 0x3bc]
mov edx, dword [eax]
call dword [edx + 0x124]
mov ebx, eax
mov eax, dword [esi + 0x3c0]
add ebx, dword [eax + 0xc]
mov eax, dword [esi + 0x3bc]
mov eax, dword [eax + 0x2b0]
mov edx, dword [eax]
call dword [edx + 0x14]
cmp ebx, eax
jge 0x6619f3
mov eax, dword [esi + 0x3bc]
mov edx, dword [eax]
call dword [edx + 0x124]
mov edx, eax
mov eax, dword [esi + 0x3c0]
add edx, dword [eax + 0xc]
mov eax, dword [esi + 0x3bc]
mov ecx, dword [eax]
call dword [ecx + 0x128]
jmp 0x661a15
mov eax, dword [esi + 0x3bc]
mov eax, dword [eax + 0x2b0]
mov edx, dword [eax]
call dword [edx + 0x14]
mov edx, eax
dec edx
mov eax, dword [esi + 0x3bc]
mov ecx, dword [eax]
call dword [ecx + 0x128]
mov dword [edi + 0xc], 1
jmp 0x662029
cmp word [edi + 4], 0x21
jne 0x661a9b
cmp dword [esi + 0x3b8], 0
je 0x661a9b
mov eax, dword [esi + 0x3b8]
cmp byte [eax + 0x69], 0
je 0x661a9b
mov eax, dword [esi + 0x3bc]
mov edx, dword [eax]
call dword [edx + 0x124]
mov edx, dword [esi + 0x3c0]
cmp eax, dword [edx + 0xc]
jle 0x661a7f
mov eax, dword [esi + 0x3bc]
mov edx, dword [eax]
call dword [edx + 0x124]
mov edx, eax
mov eax, dword [esi + 0x3c0]
sub edx, dword [eax + 0xc]
mov eax, dword [esi + 0x3bc]
mov ecx, dword [eax]
call dword [ecx + 0x128]
jmp 0x661a8f
mov eax, dword [esi + 0x3bc]
xor edx, edx
mov ecx, dword [eax]
call dword [ecx + 0x128]
mov dword [edi + 0xc], 1
jmp 0x662029
cmp word [edi + 4], 0x27
jne 0x661af3
cmp dword [esi + 0x33c], 0
je 0x661af3
push 0
push 0
push 0xb0
mov eax, esi
call fcn.0054be48
push eax
call sub.user32.dll_SendMessageW
mov ebx, eax
shr ebx, 0x10
movzx ebx, bx
lea edx, [ebp - 0x58]
mov eax, esi
call fcn.00663b00
mov eax, dword [ebp - 0x58]
test eax, eax
je 0x661adf
sub eax, 4
mov eax, dword [eax]
cmp eax, ebx
jg 0x661af3
mov word [edi + 4], 0
xor eax, eax
mov dword [edi + 0xc], eax
jmp 0x662029
cmp word [edi + 4], 0x2e
jne 0x661b86
cmp dword [esi + 0x33c], 0
je 0x661b86
push 0
push 0
push 0xb0
mov eax, esi
call fcn.0054be48
push eax
call sub.user32.dll_SendMessageW
mov ebx, eax
shr ebx, 0x10
movzx ebx, bx
lea edx, [ebp - 0x5c]
mov eax, esi
call fcn.00663b00
mov eax, dword [ebp - 0x5c]
test eax, eax
je 0x661b3b
sub eax, 4
mov eax, dword [eax]
cmp eax, ebx
jg 0x661b7d
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x12c]
test eax, eax
jne 0x661b7d
cmp word [esi + 0x24a], 0
je 0x661b6d
movzx eax, word [ebp - 7]
push eax
lea ecx, [edi + 4]
mov edx, esi
mov eax, dword [esi + 0x24c]
call dword [esi + 0x248]
mov word [edi + 4], 0
xor eax, eax
mov dword [edi + 0xc], eax
jmp 0x662029
mov dl, 1
mov eax, esi
call fcn.006653c4
cmp word [edi + 4], 0x25
jne 0x661bd7
cmp dword [esi + 0x338], 0
je 0x661bd7
push 0
push 0
push 0xb0
mov eax, esi
call fcn.0054be48
push eax
call sub.user32.dll_SendMessageW
mov ebx, eax
shr ebx, 0x10
movzx ebx, bx
mov eax, dword [esi + 0x338]
test eax, eax
je 0x661bc3
sub eax, 4
mov eax, dword [eax]
cmp eax, ebx
jl 0x661bd7
mov word [edi + 4], 0
xor eax, eax
mov dword [edi + 0xc], eax
jmp 0x662029
cmp word [edi + 4], 0x23
jne 0x661c90
cmp dword [esi + 0x33c], 0
je 0x661c90
push 0x10
call sub.user32.dll_GetKeyState
movsx eax, ax
test ah, 0x80
jne 0x661c40
lea edx, [ebp - 0x60]
mov eax, esi
call fcn.00663b00
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x661c25
mov eax, dword [ebp - 0x10]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x10]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x13c]
xor edx, edx
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x138]
jmp 0x661c80
lea edx, [ebp - 0x64]
mov eax, esi
call fcn.00663b00
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x661c67
mov eax, dword [ebp - 0x18]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x18], eax
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x130]
mov edx, dword [ebp - 0x18]
sub edx, eax
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x138]
mov word [edi + 4], 0
xor eax, eax
mov dword [edi + 0xc], eax
jmp 0x662029
cmp word [edi + 4], 0x24
jne 0x661d64
cmp dword [esi + 0x338], 0
je 0x661d64
push 0x10
call sub.user32.dll_GetKeyState
movsx eax, ax
test ah, 0x80
jne 0x661cf2
mov eax, dword [esi + 0x338]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x661cd7
mov eax, dword [ebp - 0x20]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x20]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x13c]
xor edx, edx
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x138]
jmp 0x661d54
mov eax, esi
call fcn.0054be48
mov dword [ebp - 0x30], eax
mov eax, dword [esi + 0x338]
mov dword [ebp - 0x24], eax
mov ebx, dword [ebp - 0x24]
test ebx, ebx
je 0x661d11
sub ebx, 4
mov ebx, dword [ebx]
lea edx, [ebp - 0x68]
mov eax, esi
call fcn.00663b00
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x661d2d
sub eax, 4
mov eax, dword [eax]
mov edx, dword [esi + 0x338]
mov dword [ebp - 0x2c], edx
mov edx, dword [ebp - 0x2c]
test edx, edx
je 0x661d42
sub edx, 4
mov edx, dword [edx]
push edx
add eax, ebx
push eax
push 0xb1
mov eax, dword [ebp - 0x30]
push eax
call sub.user32.dll_SendMessageW
mov word [edi + 4], 0
xor eax, eax
mov dword [edi + 0xc], eax
jmp 0x662029
cmp word [edi + 4], 8
jne 0x661dd0
cmp dword [esi + 0x338], 0
je 0x661dd0
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x130]
mov edx, eax
mov eax, dword [esi + 0x338]
test eax, eax
je 0x661d8f
sub eax, 4
mov eax, dword [eax]
inc eax
cmp edx, eax
jg 0x661dc7
cmp word [esi + 0x24a], 0
je 0x661db7
movzx eax, word [0x66205c]
push eax
lea ecx, [edi + 4]
mov edx, esi
mov eax, dword [esi + 0x24c]
call dword [esi + 0x248]
mov word [edi + 4], 0
xor eax, eax
mov dword [edi + 0xc], eax
jmp 0x662029
mov dl, 1
mov eax, esi
call fcn.006653c4
cmp word [edi + 4], 0x2e
jne 0x661f00
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x130]
mov edx, eax
mov eax, dword [esi + 0x338]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x661dfc
sub eax, 4
mov eax, dword [eax]
cmp eax, edx
jg 0x661f00
lea edx, [ebp - 4]
mov eax, esi
call fcn.00663b00
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x12c]
test eax, eax
jne 0x661e5f
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x130]
mov dword [ebp - 0x40], eax
mov eax, dword [esi + 0x338]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
je 0x661e49
mov eax, dword [ebp - 0x3c]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x3c], eax
mov edx, dword [ebp - 0x40]
sub edx, dword [ebp - 0x3c]
inc edx
lea eax, [ebp - 4]
mov ecx, 1
call fcn.0040bd48
jmp 0x661ea7
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x130]
mov dword [ebp - 0x4c], eax
mov eax, dword [esi + 0x338]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0
je 0x661e8c
mov eax, dword [ebp - 0x48]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x48], eax
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x12c]
mov ecx, eax
mov edx, dword [ebp - 0x4c]
sub edx, dword [ebp - 0x48]
inc edx
lea eax, [ebp - 4]
call fcn.0040bd48
cmp word [esi + 0x332], 0
jle 0x661ef7
mov edx, dword [ebp - 4]
mov eax, esi
call fcn.00663a24
dec eax
movsx edx, word [esi + 0x332]
cmp eax, edx
jle 0x661ef7
cmp word [esi + 0x24a], 0
je 0x661ee7
movzx eax, word [ebp - 7]
push eax
lea ecx, [edi + 4]
mov edx, esi
mov eax, dword [esi + 0x24c]
call dword [esi + 0x248]
mov word [edi + 4], 0
xor eax, eax
mov dword [edi + 0xc], eax
jmp 0x662029
mov dl, 1
mov eax, esi
call fcn.006653c4
cmp word [edi + 4], 0x26
jne 0x661f53
cmp dword [esi + 0x3b8], 0
je 0x661f53
mov eax, dword [esi + 0x3b8]
cmp byte [eax + 0x69], 0
je 0x661f53
mov eax, dword [esi + 0x3bc]
mov edx, dword [eax]
call dword [edx + 0x124]
test eax, eax
jle 0x661f4d
mov eax, dword [esi + 0x3bc]
mov edx, dword [eax]
call dword [edx + 0x124]
mov edx, eax
dec edx
mov eax, dword [esi + 0x3bc]
mov ecx, dword [eax]
call dword [ecx + 0x128]
mov word [edi + 4], 0
cmp word [edi + 4], 0x28
jne 0x661fba
cmp dword [esi + 0x3b8], 0
je 0x661fba
mov eax, dword [esi + 0x3b8]
cmp byte [eax + 0x69], 0
je 0x661fba
mov eax, dword [esi + 0x3bc]
mov edx, dword [eax]
call dword [edx + 0x124]
mov ebx, eax
inc ebx
mov eax, dword [esi + 0x3bc]
mov eax, dword [eax + 0x2b0]
mov edx, dword [eax]
call dword [edx + 0x14]
cmp ebx, eax
jge 0x661fb4
mov eax, dword [esi + 0x3bc]
mov edx, dword [eax]
call dword [edx + 0x124]
mov edx, eax
inc edx
mov eax, dword [esi + 0x3bc]
mov ecx, dword [eax]
call dword [ecx + 0x128]
mov word [edi + 4], 0
mov edx, edi
mov eax, esi
call fcn.0054a8a4
cmp word [edi + 4], 0x2e
jne 0x661fda
cmp byte [esi + 0x2ef], 7
jne 0x661fda
mov eax, esi
call fcn.00664074
cmp dword [esi + 0x338], 0
je 0x662029
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x130]
mov edx, eax
mov eax, dword [esi + 0x338]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x50]
test eax, eax
je 0x662004
sub eax, 4
mov eax, dword [eax]
cmp eax, edx
jle 0x662029
mov eax, dword [esi + 0x338]
mov dword [ebp - 0x54], eax
mov edi, dword [ebp - 0x54]
test edi, edi
je 0x66201d
sub edi, 4
mov edi, dword [edi]
mov edx, edi
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x13c]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x662053
lea eax, [ebp - 0x68]
mov edx, 5
call fcn.0040aab0
lea eax, [ebp - 4]
call fcn.0040aa50
ret