Function at 0x496f40
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
push ebx
push esi
mov esi, ecx
push edi
mov edi, edx
cmp dword [esi + 0x50], 0
je 0x4973bd
mov eax, dword [sym.imp.USER32.dll_GetKeyState]
push 0x11
mov dword [esp + 0x14], eax
call eax
movzx ebx, ax
shr ebx, 0xf
push 0x10
and bl, 1
call dword [esp + 0x14]
movzx ecx, ax
mov eax, dword [sym.imp.USER32.dll_InvalidateRect]
shr ecx, 0xf
and ecx, 0xffffff01
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], ecx
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff7
cmp ecx, 0x69
ja case.0x496fa5.10
movzx eax, byte [ecx + 0x497408]
jmp dword [eax*4 + 0x4973c8]
test bl, bl
je case.0x496fa5.10
push 0
mov edx, edi
mov ecx, esi
call fcn.00498f50
add esp, 4
jmp case.0x496fa5.10
test bl, bl
je case.0x496fa5.10
mov eax, dword [esi + 0x50]
mov edx, edi
or dword [esi + 0x64], 4
mov ecx, esi
mov dword [esi + 0x5c], 0
mov dword [esi + 0x60], eax
call fcn.00498b80
push 0
push 0
push edi
call dword [esp + 0x20]
jmp case.0x496fa5.10
test bl, bl
je case.0x496fa5.10
mov edx, edi
mov ecx, esi
call fcn.00499100
jmp case.0x496fa5.10
test bl, bl
jne case.0x496fa5.10
mov eax, dword [esi + 0x5c]
mov ecx, dword [esi + 0x60]
mov edx, dword [esi + 0x50]
cmp byte [esp + 0xc], bl
je 0x497051
cmp eax, ecx
cmovae eax, ecx
lea ecx, [edx - 1]
dec eax
cmp eax, edx
cmovbe ecx, eax
mov eax, 0x533938
xor edx, edx
push eax
push edx
push ecx
mov edx, edi
mov ecx, esi
call fcn.00498ff0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, ecx
cmovae eax, ecx
xor ecx, ecx
inc eax
cmp eax, edx
cmovbe ecx, eax
mov eax, 0x5339c4
push eax
push edx
push ecx
mov edx, edi
mov ecx, esi
call fcn.00498ff0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test bl, bl
je case.0x496fa5.10
mov edx, edi
mov ecx, esi
call fcn.00499830
jmp case.0x496fa5.10
test bl, bl
je case.0x496fa5.10
mov edx, edi
mov ecx, esi
call fcn.00499910
jmp case.0x496fa5.10
mov eax, dword [esi + 0x4c]
sub eax, 1
je 0x4970c3
sub eax, 1
jne 0x4970ca
mov dword [esi + 0x4c], 1
mov dword [esi + 0x58], eax
jmp case.0x496fa5.10
mov dword [esi + 0x4c], 2
mov dword [esi + 0x58], 0
jmp case.0x496fa5.10
test bl, bl
je 0x4970e3
push 0
push 0
jmp 0x49732b
mov eax, dword [esi + 0x4c]
sub eax, 1
je 0x497115
sub eax, 1
jne case.0x496fa5.10
mov eax, dword [esi + 0x54]
test eax, eax
je case.0x496fa5.10
dec eax
mov ecx, dword [esi + 0x18]
xor edx, edx
mov dword [esi + 0x54], eax
div dword [esi + 0x38]
dec ecx
cmp eax, ecx
je 0x497155
jmp case.0x496fa5.10
mov eax, dword [esi + 0x58]
sub eax, 0
je 0x49712e
sub eax, 1
jne case.0x496fa5.10
mov dword [esi + 0x58], eax
jmp case.0x496fa5.10
mov eax, dword [esi + 0x54]
test eax, eax
je case.0x496fa5.10
dec eax
mov dword [esi + 0x58], 1
xor edx, edx
mov dword [esi + 0x54], eax
div dword [esi + 0x38]
mov ecx, dword [esi + 0x18]
dec ecx
cmp eax, ecx
jne case.0x496fa5.10
push 0
push 0
push 0x115
jmp 0x497330
test bl, bl
je 0x497170
push 0
push 1
jmp 0x49732b
mov eax, dword [esi + 0x4c]
sub eax, 1
je 0x4971aa
sub eax, 1
jne case.0x496fa5.10
mov eax, dword [esi + 0x50]
mov ecx, dword [esi + 0x54]
dec eax
cmp ecx, eax
jae case.0x496fa5.10
lea eax, [ecx + 1]
xor edx, edx
mov dword [esi + 0x54], eax
div dword [esi + 0x38]
mov ecx, dword [esi + 0x18]
add ecx, dword [esi + 8]
cmp eax, ecx
je 0x4971ea
jmp case.0x496fa5.10
mov eax, dword [esi + 0x58]
sub eax, 0
je 0x4971f8
sub eax, 1
jne case.0x496fa5.10
mov eax, dword [esi + 0x50]
mov ecx, dword [esi + 0x54]
dec eax
cmp ecx, eax
jae case.0x496fa5.10
lea eax, [ecx + 1]
mov dword [esi + 0x58], 0
xor edx, edx
mov dword [esi + 0x54], eax
div dword [esi + 0x38]
mov ecx, dword [esi + 0x18]
add ecx, dword [esi + 8]
cmp eax, ecx
jne case.0x496fa5.10
push 0
push 1
push 0x115
jmp 0x497330
mov dword [esi + 0x58], 1
jmp case.0x496fa5.10
test bl, bl
je 0x497218
push 0
push 0
push 0x115
push edi
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [esi + 0x54]
mov ecx, dword [esi + 0x38]
cmp eax, ecx
jb case.0x496fa5.10
sub eax, ecx
xor edx, edx
mov dword [esi + 0x54], eax
div ecx
jmp 0x497149
test bl, bl
je 0x497248
push 0
push 1
push 0x115
push edi
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [esi + 0x54]
add eax, dword [esi + 0x38]
cmp eax, dword [esi + 0x50]
jae case.0x496fa5.10
xor edx, edx
mov dword [esi + 0x54], eax
div dword [esi + 0x38]
mov ecx, dword [esi + 0x18]
add ecx, dword [esi + 8]
cmp eax, ecx
jne case.0x496fa5.10
push 0
push 1
push 0x115
jmp 0x497330
mov eax, dword [esi + 0x38]
imul eax, dword [esi + 8]
push 0
push 2
push 0x115
sub dword [esi + 0x54], eax
jmp 0x497330
mov eax, dword [esi + 8]
imul eax, dword [esi + 0x38]
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
add eax, edx
cmp eax, ecx
jb 0x4972b7
sub ecx, edx
xor edx, edx
dec ecx
mov eax, ecx
div dword [esi + 0x38]
mov eax, dword [esi + 0x54]
sub eax, edx
add eax, ecx
push 0
push 3
mov dword [esi + 0x54], eax
push 0x115
jmp 0x497330
mov dword [esi + 0x58], 0
test bl, bl
je 0x4972e2
push 0
push 6
mov dword [esi + 0x54], 0
push 0x115
jmp 0x497330
and dword [esi + 0x54], 0xfffffff0
cmp dword [esi + 0x4c], 1
jne case.0x496fa5.10
push 0
push 6
jmp 0x49732b
mov dword [esi + 0x58], 0
mov ecx, dword [esi + 0x50]
test bl, bl
je 0x497311
push 0
lea eax, [ecx - 1]
push 7
mov dword [esi + 0x54], eax
push 0x115
jmp 0x497330
mov eax, dword [esi + 0x54]
and eax, 0xfffffff0
add eax, 0xf
mov dword [esi + 0x54], eax
cmp eax, ecx
jb 0x497327
lea eax, [ecx - 1]
mov dword [esi + 0x54], eax
push 0
push 7
push 0x114
push edi
call dword [sym.imp.USER32.dll_SendMessageW]
cmp byte [esp + 0xc], 0
je 0x497361
cmp dword [ebp + 0xc], 0
je 0x497361
cmp dword [esi + 0x58], 0
jne 0x497358
mov eax, dword [esi + 0x5c]
cmp eax, dword [esi + 0x54]
jne 0x497358
and dword [esi + 0x64], 0xfffffffb
jmp 0x49737d
mov eax, dword [esi + 0x54]
or dword [esi + 0x64], 4
jmp 0x49737a
test bl, bl
jne 0x497386
push 0x5d
call dword [esp + 0x14]
test ax, ax
js 0x497386
mov eax, dword [esi + 0x54]
and dword [esi + 0x64], 0xfffffffb
mov dword [esi + 0x5c], eax
mov dword [esi + 0x60], eax
mov edx, edi
mov ecx, esi
call fcn.00498b80
test byte [esi + 0x64], 2
jne 0x4973ab
mov eax, dword [esi + 0x54]
xor edx, edx
div dword [esi + 0x38]
mov ecx, dword [esi + 0xc]
mov edx, esi
sub ecx, dword [esi + 8]
cmp eax, ecx
cmovg eax, ecx
mov ecx, edi
mov dword [esi + 0x18], eax
call fcn.00496560
mov edx, esi
mov ecx, edi
call fcn.004965f0
push 0
push 0
push edi
call dword [esp + 0x20]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret