Function at 0x516159
Capabilities:
Log keystrokes via polling

Disassembly:
push 0x84
mov eax, 0x5c4a64
call fcn.00590965
mov ebx, ecx
mov dword [ebp - 0x78], ebx
mov eax, dword [ebp + 8]
xor edi, edi
inc edi
mov dword [ebp - 0x74], eax
mov esi, dword [eax + 4]
cmp esi, 0x200
je 0x5161a5
cmp esi, 0xa0
je 0x5161a5
cmp esi, 0x202
je 0x5161a5
cmp esi, 0x205
je 0x5161a5
cmp esi, 0x208
jne 0x5164f7
push edi
call dword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
js 0x5164f4
push 2
call dword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
js 0x5164f4
push 4
call dword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
js 0x5164f4
call fcn.004673e0
mov edi, eax
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x90], edi
push dword [eax]
jmp 0x5161fe
test dword [eax + 0x60], 0x401
jne 0x516207
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_GetParent]
push eax
call fcn.004604d4
test eax, eax
jne 0x5161eb
cmp eax, ebx
je 0x51621f
test eax, eax
jne 0x5165c4
and dword [edi + 0x40], eax
or dword [edi + 0x44], 0xffffffff
jmp 0x5165c4
mov esi, dword [ebp - 0x78]
mov ecx, esi
mov ebx, dword [edi + 0x3c]
call fcn.00460789
mov dword [ebp - 0x7c], eax
test ebx, ebx
je 0x51626b
mov ecx, ebx
call fcn.0046072b
cmp eax, dword [ebp - 0x7c]
je 0x5162df
mov eax, dword [ebx]
mov esi, dword [eax + 0x60]
mov ecx, esi
call dword [0x5cba4c]
mov ecx, ebx
call esi
mov eax, dword [ebx]
push 1
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x5cba4c]
mov ecx, ebx
call esi
and dword [edi + 0x3c], 0
push 0xa0
call fcn.00449a8e
pop ecx
mov dword [ebp - 0x80], eax
and dword [ebp - 4], 0
test eax, eax
je 0x51628c
mov ecx, eax
call fcn.00515e52
mov ebx, eax
jmp 0x51628e
xor ebx, ebx
mov eax, dword [ebx]
or dword [ebp - 4], 0xffffffff
push 1
push dword [ebp - 0x7c]
mov esi, dword [eax + 0x164]
mov ecx, esi
call dword [0x5cba4c]
mov ecx, ebx
call esi
test eax, eax
jne 0x5162c7
mov eax, dword [ebx]
push 1
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x5cba4c]
mov ecx, ebx
call esi
jmp 0x5165c4
push 0
push 0
push 0x401
push dword [ebx + 0x20]
call dword [sym.imp.USER32.dll_SendMessageA]
mov esi, dword [ebp - 0x78]
mov dword [edi + 0x3c], ebx
push 0x30
lea eax, [ebp - 0x40]
push 0
push eax
call fcn.00592be0
mov ecx, dword [ebp - 0x74]
add esp, 0xc
mov eax, dword [ecx + 0x14]
mov ecx, dword [ecx + 0x18]
mov dword [ebp - 0x8c], eax
lea eax, [ebp - 0x8c]
push eax
push dword [esi + 0x20]
mov dword [ebp - 0x88], ecx
call dword [sym.imp.USER32.dll_ScreenToClient]
push 0x30
lea eax, [ebp - 0x70]
push 0
push eax
call fcn.00592be0
mov eax, dword [esi]
add esp, 0xc
mov dword [ebp - 0x70], 0x2c
mov esi, dword [eax + 0x74]
lea eax, [ebp - 0x70]
push eax
push dword [ebp - 0x88]
mov ecx, esi
push dword [ebp - 0x8c]
call dword [0x5cba4c]
mov ecx, dword [ebp - 0x78]
call esi
mov esi, eax
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x7c], esi
lea ecx, [esi + 1]
neg ecx
sbb ecx, ecx
and ecx, eax
mov dword [ebp - 0x80], ecx
cmp dword [edi + 0x44], esi
jne 0x5163bf
cmp dword [edi + 0x40], ecx
jne 0x5163bf
test dword [eax + 0x60], 0x400
je 0x5163a7
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.USER32.dll_GetCursorPos]
movzx ecx, word [ebp - 0x80]
movzx eax, word [ebp - 0x84]
shl ecx, 0x10
or ecx, eax
push ecx
push 0
push 0x412
push dword [ebx + 0x20]
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x5164d2
cmp esi, 0xffffffff
je 0x5164d2
mov eax, dword [ebp - 0x74]
push eax
push ebx
call fcn.0051692f
jmp 0x5164d2
cmp esi, 0xffffffff
je 0x516468
push 0xc
pop ecx
lea esi, [ebp - 0x70]
lea edi, [ebp - 0x40]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x6c]
and ecx, 0x3fffffff
test dword [eax + 0x60], 0x400
mov dword [ebp - 0x3c], ecx
je 0x5163ee
or ecx, 0x20
mov dword [ebp - 0x3c], ecx
lea eax, [ebp - 0x40]
xor edi, edi
push eax
push edi
push 0x404
push dword [ebx + 0x20]
call dword [sym.imp.USER32.dll_SendMessageA]
test dword [ebp - 0x6c], 0x40000000
jne 0x516418
mov ecx, dword [ebp - 0x78]
call fcn.00460e3b
test eax, eax
je 0x51645d
push edi
xor esi, esi
inc esi
push esi
push 0x401
push dword [ebx + 0x20]
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [ebp - 0x78]
test dword [eax + 0x60], 0x400
je 0x51644a
lea eax, [ebp - 0x40]
push eax
push esi
push 0x411
push dword [ebx + 0x20]
call dword [sym.imp.USER32.dll_SendMessageA]
push 0x213
push edi
push edi
push edi
push edi
push edi
push dword [ebx + 0x20]
call dword [sym.imp.USER32.dll_SetWindowPos]
mov edi, dword [ebp - 0x90]
mov esi, dword [ebp - 0x7c]
jmp 0x51647a
push 0
push 0
push 0x401
push dword [ebx + 0x20]
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [ebp - 0x74]
push eax
push ebx
call fcn.0051692f
mov eax, dword [edi + 0x48]
test eax, eax
je 0x5164a1
cmp dword [eax], 0x2c
jb 0x5164a1
push eax
push 0
push 0x405
push dword [ebx + 0x20]
call dword [sym.imp.USER32.dll_SendMessageA]
cmp dword [edi + 0x48], 0
mov eax, dword [ebp - 0x80]
mov dword [edi + 0x40], eax
mov dword [edi + 0x44], esi
jne 0x5164c7
push 0x30
call fcn.00449a8e
push 0x30
push 0
push eax
mov dword [edi + 0x48], eax
call fcn.00592be0
add esp, 0x10
mov edi, dword [edi + 0x48]
lea esi, [ebp - 0x70]
push 0xc
pop ecx
rep movsd dword es:[edi], dword [esi]
cmp dword [ebp - 0x4c], 0xffffffff
je 0x5165c4
cmp dword [ebp - 0x50], 0
jne 0x5165c4
push dword [ebp - 0x4c]
call sym.Install.dat__aligned_free
pop ecx
jmp 0x5165c4
mov eax, dword [ebp - 0x74]
test dword [ebx + 0x60], 0x401
je 0x5165c4
push dword [eax]
jmp 0x516523
cmp eax, ebx
je 0x516534
test dword [eax + 0x60], 0x401
jne 0x5165c4
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_GetParent]
push eax
call fcn.004604d4
test eax, eax
jne 0x516508
cmp eax, ebx
jne 0x5165c4
cmp esi, 0x100
jb 0x516544
cmp esi, 0x109
jbe 0x516551
lea eax, [esi - 0x104]
cmp eax, 3
jbe 0x516551
xor edi, edi
test dword [ebx + 0x60], 0x400
jne 0x5165c4
test edi, edi
jne 0x5165be
cmp esi, 0x201
je 0x5165be
cmp esi, 0x203
je 0x5165be
cmp esi, 0x204
je 0x5165be
cmp esi, 0x206
je 0x5165be
cmp esi, 0x207
je 0x5165be
cmp esi, 0x209
je 0x5165be
cmp esi, 0xa1
je 0x5165be
cmp esi, 0xa3
je 0x5165be
cmp esi, 0xa4
je 0x5165be
cmp esi, 0xa6
je 0x5165be
cmp esi, 0xa7
je 0x5165be
cmp esi, 0xa9
jne 0x5165c4
push edi
call fcn.0045facb
call fcn.00590914
ret 4