Function at 0x515670
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 8]
push ebx
add eax, 0xfffffff7
push esi
cmp eax, 0x88
push edi
mov esi, ecx
ja case.0x515694.20
xor ecx, ecx
mov cl, byte [eax + 0x515cc4]
jmp dword [ecx*4 + 0x515c94]
mov eax, dword [esi + 0x18]
test eax, eax
jne case.0x515694.20
push 0x8c
mov ecx, esi
call fcn.005098a0
test eax, eax
je case.0x515694.20
mov edx, dword [eax]
push 0
push 0
push 0
push 0x9d
push 6
push 0
mov ecx, eax
call dword [edx + 0x90]
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp + 0xc]
test eax, eax
je case.0x515694.20
mov eax, dword [esi + 0x38c]
test eax, eax
je 0x5156fa
mov byte [0x83e300], 0
mov ecx, dword [esi + 0x1c8]
test ecx, ecx
je 0x515716
mov eax, dword [esi + 0x1b0]
mov edx, dword [ecx + 0x68]
cmp eax, edx
je 0x515725
cmp eax, dword [ecx + 0x6c]
je 0x515725
mov eax, dword [esi + 0x20]
mov edx, dword [eax]
cmp edx, eax
je 0x515747
cmp dword [edx + 8], 1
jne 0x515747
mov al, byte [esi + 0x2c]
test al, al
je 0x515747
mov al, byte [esi + 0x2e]
test al, al
je 0x515747
mov byte [esi + 0x2c], 0
call fcn.004a9ac0
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, esi
call fcn.00516550
test al, al
jne case.0x515694.20
mov eax, dword [esi + 0x20]
mov ecx, dword [eax]
cmp ecx, eax
je 0x515764
mov edi, dword [ecx + 8]
jmp 0x515767
or edi, 0xffffffff
push edi
mov ecx, 0x7dabc0
call fcn.005098a0
test eax, eax
je case.0x515789.43
lea ecx, [edi - 0x29]
cmp ecx, 0x89
ja case.0x515789.43
xor edx, edx
mov dl, byte [ecx + 0x515d5c]
jmp dword [edx*4 + 0x515d50]
mov edx, dword [eax]
push 0
push 0
push 0
push 0x8b
push 6
push 0
mov ecx, eax
call dword [edx + 0x90]
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edx, dword [eax]
push 0
push 0
push 0
push 0x7b
push 6
push 0
mov ecx, eax
call dword [edx + 0x90]
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8
push edi
mov ecx, esi
call fcn.005161a0
cmp edi, 0xffffffff
je 0x51581d
push edi
mov ecx, esi
call fcn.00509b10
test al, al
je 0x51581d
push 0x10
mov ecx, esi
call fcn.005098a0
test eax, eax
jne case.0x515694.20
mov ecx, dword [0x814264]
push 0
push 0
push 0
mov eax, dword [ecx]
push 0x28
call dword [eax + 0x18]
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [esi + 0x1b4]
test eax, eax
jne 0x5158e1
mov eax, dword [0x83ec90]
test eax, eax
jne 0x5158e1
mov eax, dword [0x814260]
test eax, eax
je 0x5158e1
push 0x10
mov ecx, esi
call fcn.005098a0
test eax, eax
jne 0x5158e1
mov ecx, 0x814260
call fcn.00533580
test eax, eax
je 0x51588f
push 0x9b
mov ecx, esi
call fcn.00509b10
test al, al
jne case.0x515694.20
push 0x9b
mov ecx, esi
call fcn.0050cbe0
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0x76aed0
push 0
push 0
push 1
push 2
push 0x11
call fcn.00581bb0
add esp, 4
mov ecx, esi
push eax
call fcn.00509380
cmp eax, 0x7d
jne case.0x515694.20
call fcn.00419180
mov ecx, eax
call fcn.00418880
mov ecx, dword [0x814264]
push 0
push 0
push 0
mov edx, dword [ecx]
push 2
call dword [edx + 0x18]
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8
mov dword [esi + 0x3fc], 0x7e
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 0x11
call edi
xor ecx, ecx
mov cl, ah
test cl, cl
jne case.0x515694.20
mov eax, dword [esi + 0x18]
test eax, eax
jne 0x515947
push 0x8c
mov ecx, esi
call fcn.005098a0
test eax, eax
je 0x515947
mov edx, dword [eax]
push 0
push 0
push 0
push 0x82
push 6
push 0
mov ecx, eax
call dword [edx + 0x90]
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [esi + 0x1b0]
test eax, eax
je 0x515b2f
push 0x10
call edi
test ax, ax
mov eax, dword [esi + 0x1b0]
je 0x515a67
test eax, eax
je 0x515a28
mov ecx, dword [eax + 4]
push eax
call fcn.004fdb00
test eax, eax
jne 0x515a28
mov eax, dword [esi + 0x1b0]
test eax, eax
je 0x515a01
mov eax, dword [eax + 4]
mov ecx, dword [eax + 0xc]
lea edi, [eax + 8]
lea eax, [ebp - 4]
mov dword [ebp + 0xc], ecx
push eax
mov ecx, edi
call fcn.00517180
mov eax, dword [eax]
lea ecx, [ebp + 8]
lea edx, [ebp + 0xc]
push ecx
push edx
mov dword [ebp + 8], eax
call fcn.0051a720
add esp, 8
test al, al
jne 0x515a01
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
mov ebx, dword [ecx + 8]
mov ecx, ebx
mov edx, dword [ebx]
call dword [edx + 0x1c]
test al, al
jne 0x515a15
lea eax, [ebp - 8]
push 0
push eax
lea ecx, [ebp + 0xc]
call fcn.005175d0
lea ecx, [ebp - 4]
push ecx
mov ecx, edi
call fcn.00517180
mov eax, dword [eax]
lea edx, [ebp + 8]
mov dword [ebp + 8], eax
lea eax, [ebp + 0xc]
push edx
push eax
call fcn.0051a720
add esp, 8
test al, al
je 0x5159bb
push 0
mov ecx, esi
call fcn.00508660
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8
push ebx
mov ecx, esi
call fcn.00508660
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [esi + 0x1b0]
test eax, eax
je case.0x515694.20
mov ecx, dword [eax + 4]
push eax
call fcn.004fdb00
mov edi, eax
test edi, edi
je 0x515a01
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 0x1c]
test al, al
je case.0x515694.20
mov ecx, dword [esi + 0x1b0]
test ecx, ecx
je 0x515b17
jmp 0x515b12
test eax, eax
je 0x515ad8
mov ecx, dword [eax + 4]
push eax
call fcn.004fda90
test eax, eax
jne 0x515ad8
mov eax, dword [esi + 0x1b0]
test eax, eax
je 0x515a01
mov eax, dword [eax + 4]
mov dword [ebp + 0xc], eax
mov eax, dword [eax + 0xc]
mov edi, dword [eax]
cmp edi, eax
je 0x515a01
mov ebx, dword [edi + 8]
mov ecx, ebx
mov eax, dword [ebx]
call dword [eax + 0x1c]
test al, al
jne 0x515ac5
mov ecx, dword [ebp + 0xc]
mov edi, dword [edi]
cmp edi, dword [ecx + 0xc]
jne 0x515a99
push 0
mov ecx, esi
call fcn.00508660
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8
push ebx
mov ecx, esi
call fcn.00508660
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [esi + 0x1b0]
test eax, eax
je case.0x515694.20
mov ecx, dword [eax + 4]
push eax
call fcn.004fda90
mov edi, eax
test edi, edi
je 0x515a01
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 0x1c]
test al, al
je case.0x515694.20
mov ecx, dword [esi + 0x1b0]
test ecx, ecx
je 0x515b17
mov eax, dword [ecx]
call dword [eax + 0x60]
mov dword [esi + 0x1b0], edi
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 0x5c]
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, esi
call fcn.00508360
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp + 0xc]
test eax, eax
je case.0x515694.20
mov ecx, esi
call fcn.00508c50
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [0x7dad88]
test ecx, ecx
je case.0x515694.20
mov eax, dword [0x7dad70]
mov edx, dword [ecx + 0x68]
cmp eax, edx
je 0x515b81
cmp eax, dword [ecx + 0x6c]
jne case.0x515694.20
mov al, byte [0x7dabec]
test al, al
je case.0x515694.20
mov eax, dword [esi + 0x17c]
mov ecx, dword [eax]
cmp ecx, eax
mov dword [ebp + 0xc], ecx
je case.0x515694.20
mov ecx, dword [ecx + 8]
mov eax, dword [ecx]
call dword [eax + 0x10]
test al, al
je 0x515bc7
mov ecx, dword [ebp + 0xc]
push 0
push 0
push 0
mov ecx, dword [ecx + 8]
push 0
push 3
push 0
mov edx, dword [ecx]
call dword [edx + 0x90]
lea eax, [ebp + 8]
push 0
push eax
lea ecx, [ebp + 0xc]
call fcn.00517250
mov eax, dword [esi + 0x17c]
mov ecx, dword [ebp + 0xc]
cmp ecx, eax
jne 0x515ba1
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [0x7dad88]
test ecx, ecx
je case.0x515694.20
mov eax, dword [0x7dad70]
mov edx, dword [ecx + 0x68]
cmp eax, edx
je 0x515c0c
cmp eax, dword [ecx + 0x6c]
jne case.0x515694.20
mov al, byte [0x7dabec]
test al, al
je case.0x515694.20
mov ecx, esi
call fcn.00508ab0
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, esi
call fcn.00508890
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, esi
call fcn.005089a0
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, esi
call fcn.00508770
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, esi
call fcn.00508800
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp + 0xc]
test eax, eax
je case.0x515694.20
mov ecx, dword [0x814264]
push 0
push 0
push 0
mov edx, dword [ecx]
push 0x44
call dword [edx + 0x18]
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ebx, dword [ecx + eax*4]
mov edi, dword [ecx + eax*4 - 4]
mov ebx, dword [ebx + 0x10]
cmp ebx, dword [edi + 0x10]
jle 0x535f4a
dec eax
mov edi, dword [ecx + eax*4]
mov dword [ecx + esi*4], edi
mov esi, eax
lea eax, [eax + eax + 2]
cmp eax, edx
jl 0x535f3a
cmp eax, edx
jne 0x535f68
mov edx, dword [ecx + eax*4 - 4]
mov dword [ecx + esi*4], edx
lea esi, [eax - 1]
lea eax, [esi - 1]
cdq
sub eax, edx
mov edx, dword [ebp + 0xc]
sar eax, 1
cmp edx, esi
jge 0x535f9f
mov edi, dword [ebp + 0x14]
mov edx, dword [ecx + eax*4]
mov ebx, dword [edx + 0x10]
cmp ebx, dword [edi + 0x10]
jle 0x535f97
mov dword [ecx + esi*4], edx
mov esi, eax
dec eax
cdq
sub eax, edx
mov edx, dword [ebp + 0xc]
sar eax, 1
cmp edx, esi
jl 0x535f7a
mov dword [ecx + esi*4], edi
pop edi
pop esi
pop ebx
pop ebp
ret
mov eax, dword [ebp + 0x14]
pop edi
mov dword [ecx + esi*4], eax
pop esi
pop ebx
pop ebp
ret