Function at 0x502998
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, 0x1107
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, ecx
push edi
xor edi, edi
cmp esi, eax
ja 0x502bb5
je 0x502b8b
mov eax, 0x204
cmp esi, eax
ja 0x502b03
je 0x502af2
lea eax, [esi - 1]
sub eax, 1
je 0x502adf
sub eax, 5
je 0x502a80
sub eax, 1
je 0x502a33
sub eax, 0xf8
je 0x502a1d
sub eax, 0x101
je 0x502a10
sub eax, 1
jne 0x502a47
push dword [ebp + 0x14]
lea ecx, [ebx - 0x18]
call fcn.005354e2
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 0x18
push dword [ebp + 0x14]
lea ecx, [ebx - 0x18]
call fcn.00535475
jmp 0x502a06
mov eax, dword [ebp + 0x10]
lea ecx, [ebx - 0x18]
push eax
call fcn.00539aeb
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
jmp 0x502e06
test byte [ebx + 0x88], 2
je 0x502a47
push edi
push edi
push edi
lea ecx, [ebx - 0x18]
call fcn.0054651c
mov edi, dword [ebp + 0x14]
push 0
push dword [ebp + 0x18]
lea ecx, [ebx + 0xfc]
push edi
mov edi, dword [ebp + 0x10]
push edi
push esi
push dword [ebp + 8]
call fcn.0053fed3
test eax, eax
jne 0x502a06
push eax
push dword [ebp + 0x18]
mov ecx, ebx
push dword [ebp + 0x14]
push edi
push esi
push dword [ebp + 8]
call fcn.0053fa74
test eax, eax
jne 0x502a06
jmp 0x502a09
test byte [ebx + 0x88], 2
je 0x502a47
cmp dword [ebx + 0x154], edi
jne 0x502a47
mov edi, dword [sym.imp.USER32.dll_GetKeyState]
push 0x10
call edi
mov ecx, 0x8000
test cx, ax
jne 0x502ac6
push 0x26
call edi
mov ecx, 0x8000
test cx, ax
jne 0x502ac6
lea eax, [ebx + 0x100]
lea edi, [ebx - 0x18]
push eax
mov ecx, edi
call fcn.0052f6f4
jmp 0x502ad0
lea edi, [ebx - 0x18]
mov ecx, edi
call fcn.0052eccf
push 0
push 0x100
push eax
mov ecx, edi
jmp 0x502a42
lea ecx, [ebx - 0x18]
call fcn.0054552f
mov dword [ebx + 0x114], edi
jmp 0x502a47
mov edi, dword [ebp + 0x14]
lea ecx, [ebx - 0x18]
push edi
call fcn.00541c08
jmp 0x502a4a
mov eax, esi
sub eax, 0x2a7
je 0x502b78
sub eax, 0xe5a
je 0x502b62
sub eax, 1
je 0x502b52
sub eax, 3
je 0x502b37
sub eax, 1
jne 0x502a47
movzx ecx, word [ebx + 0x16a]
mov eax, dword [ebp + 0x18]
mov dword [eax], ecx
jmp 0x502a06
lea eax, [ebx + 0x100]
lea ecx, [ebp + 0x14]
mov dword [ebp + 0x14], eax
call fcn.0052db07
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
jmp 0x502a06
push dword [ebp + 0x14]
lea ecx, [ebx - 0x18]
push dword [ebp + 0x10]
call fcn.0052c52d
jmp 0x502b48
cmp dword [ebp + 0x14], edi
jne 0x502a06
lea ecx, [ebx - 0x18]
call fcn.0054552f
jmp 0x502a06
push dword [ebp + 0x14]
lea ecx, [ebx - 0x18]
push dword [ebp + 0x10]
call fcn.0053ae3a
jmp 0x502a06
movzx eax, word [ebx + 0x16a]
mov ecx, dword [ebp + 0x10]
cmp eax, ecx
je 0x502a06
mov word [ebx + 0x16a], cx
lea ecx, [ebx - 0x18]
mov edx, dword [ecx]
lea eax, [ecx + 0x5c]
push eax
call dword [edx + 0x24]
jmp 0x502a06
mov eax, 0x812c
cmp esi, eax
ja 0x502d25
je 0x502cf5
mov eax, esi
sub eax, 0x110a
je 0x502c76
sub eax, 1
je 0x502c61
sub eax, 5
je 0x502c3c
sub eax, 0xb
je 0x502c12
sub eax, 0x17
je 0x502c04
sub eax, 1
jne 0x502a47
mov eax, dword [ebp + 0x14]
mov dword [ebx + 0x150], eax
jmp 0x502a06
mov eax, dword [ebp + 0x14]
mov dword [ebx + 0x14c], eax
jmp 0x502a06
mov eax, dword [ebp + 0x18]
movzx ecx, word [ebx + 0x168]
mov dword [eax], ecx
movzx eax, word [ebx + 0x168]
mov ecx, dword [ebp + 0x10]
cmp eax, ecx
je 0x502a06
mov word [ebx + 0x168], cx
jmp 0x502a06
movzx eax, word [ebx + 0x168]
movss xmm1, dword [ebx + 0x50]
subss xmm1, dword [ebx + 0x48]
movd xmm0, eax
cvtdq2ps xmm0, xmm0
divss xmm1, xmm0
cvttss2si ecx, xmm1
jmp case.0x502c8d.0
push 0
push dword [ebp + 0x10]
lea ecx, [ebx - 0x18]
push dword [ebp + 0x14]
call fcn.0054651c
jmp 0x502a06
cmp dword [ebp + 0x14], edi
lea ecx, [ebx + 0x100]
mov edx, dword [ebp + 0x10]
mov eax, ecx
cmovne eax, dword [ebp + 0x14]
cmp edx, 0xa
ja case.0x502c8d.8
jmp dword [edx*4 + 0x502e18]
mov ecx, dword [ebx + 0x154]
jmp case.0x502c8d.0
lea ecx, [ebx - 0x18]
call fcn.0052e3b8
mov ecx, eax
jmp case.0x502c8d.0
lea ecx, [ebx - 0x18]
call fcn.0052eccf
jmp 0x502ca7
mov ecx, dword [eax + 0xc]
jmp case.0x502c8d.0
mov ecx, dword [eax + 0x10]
jmp case.0x502c8d.0
mov ecx, dword [eax + 4]
jmp case.0x502c8d.0
mov ecx, dword [eax + 8]
jmp case.0x502c8d.0
push eax
lea ecx, [ebx - 0x18]
call fcn.0052f6f4
jmp 0x502ca7
push eax
lea ecx, [ebx - 0x18]
call fcn.0052fa1f
jmp 0x502ca7
xor ecx, ecx
jmp case.0x502c8d.0
mov esi, dword [ebp + 0x14]
push 0
push dword [ebp + 0x18]
push esi
push dword [ebp + 0x10]
push eax
push dword [ebp + 8]
call fcn.005066ac
cmp byte [esi + 0x10], 0
jne 0x502a06
push dword [ebp + 0x10]
lea ecx, [ebx - 0x18]
push esi
call fcn.00531baa
jmp 0x502a06
mov eax, esi
push 7
pop ecx
sub eax, 0x814a
je 0x502dc7
sub eax, ecx
je 0x502dc7
sub eax, 0xd
je 0x502d78
sub eax, 3
je 0x502d5f
sub eax, ecx
jne 0x502a47
push dword [ebp + 0x14]
lea ecx, [ebx - 0x18]
call fcn.0052ae34
jmp 0x502a06
mov ecx, dword [ebp + 0x18]
lea eax, [ebx - 0x18]
mov edi, dword [ebp + 0x14]
push ecx
push edi
push eax
call fcn.0050cb8d
add esp, 0xc
jmp 0x502e09
mov ecx, dword [ebp + 0x18]
lea eax, [ebx - 0x18]
mov edi, dword [ebp + 0x14]
push ecx
push edi
push eax
call fcn.0050cbf5
add esp, 0xc
test eax, eax
jne 0x502a06
cmp dword [edi + 4], 5
jne 0x502a4a
lea ecx, [ebx - 0x18]
push ecx
mov ecx, dword [edi + 0x10]
call fcn.00534b89
cmp eax, 1
jne 0x502a4a
mov eax, dword [edi + 0x10]
push dword [eax + 0x110]
call fcn.0054be83
pop ecx
jmp 0x502a4a
mov eax, dword [ebp + 0x10]
sub esp, 0x1c
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [ebp - 0x20], edi
lea edi, [ebp - 0x10]
mov dword [ebp - 0x1c], esi
lea esi, [ebp - 0x20]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebx + 0x100]
mov edi, esp
mov dword [ebp - 4], eax
rep movsd dword es:[edi], dword [esi]
push 0x55498e
lea ecx, [ebp - 4]
call fcn.0050c499
mov esi, dword [ebp + 0xc]
xor eax, eax
mov edi, dword [ebp + 0x14]
test eax, eax
jne 0x502a06
jmp 0x502a4a