Function at 0x50f070
Capabilities:
Check for unmoving mouse cursor
Log keystrokes via polling

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x18]
test eax, eax
mov dword [esp], 0
jne 0x50f08a
xor eax, eax
add esp, 0xc
ret 0x14
push esi
mov esi, dword [esp + 0x14]
test esi, esi
jne 0x50f09c
xor eax, eax
pop esi
add esp, 0xc
ret 0x14
mov ecx, dword [esi + 0x10]
test ecx, ecx
push edi
je 0x50f0c6
mov eax, dword [esi + 0x3c]
test eax, eax
mov edx, dword [ecx]
jl 0x50f0ba
dec edx
cmp eax, edx
jg 0x50f0ba
mov ecx, dword [ecx + 8]
mov edi, dword [ecx + eax*4]
jmp 0x50f0bc
xor edi, edi
test edi, edi
je 0x50f0c6
test byte [edi + 0xc], 4
je 0x50f0d0
pop edi
xor eax, eax
pop esi
add esp, 0xc
ret 0x14
mov edx, dword [edi + 0x30]
mov eax, dword [edx]
push ebx
mov ebx, dword [esi + 0x48]
push ebp
mov ebp, dword [esp + 0x24]
mov dword [esp + 0x28], eax
lea eax, [ebp - 9]
cmp eax, 0x38
ja case.0x50f0f5.10
movzx ecx, byte [eax + 0x50f5cc]
jmp dword [ecx*4 + 0x50f5a4]
mov eax, edi
mov ecx, esi
call fcn.0050e9e0
push esi
call fcn.0050c530
pop ebp
pop ebx
mov dword [esp + 8], 1
mov eax, dword [esp + 8]
pop edi
pop esi
add esp, 0xc
ret 0x14
mov eax, esi
call fcn.0050f010
push esi
call fcn.0050c530
pop ebp
pop ebx
mov dword [esp + 8], 1
mov eax, dword [esp + 8]
pop edi
pop esi
add esp, 0xc
ret 0x14
push 0x11
call dword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
jge case.0x50f0f5.10
mov ecx, dword [esi + 0x44]
xor eax, eax
cmp ecx, eax
mov dword [esp + 0x10], 1
je 0x50f184
push esi
mov dword [esi + 0x40], 0xffffffff
mov dword [esi + 0x44], eax
call fcn.0050c530
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x14
mov edx, dword [esp + 0x28]
push esi
mov dword [esi + 0x40], eax
mov dword [esi + 0x44], edx
call fcn.0050c530
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x14
push 0x10
call dword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
jge case.0x50f0f5.10
mov eax, dword [esi + 0x44]
test eax, eax
mov dword [esp + 0x10], 1
je case.0x50f0f5.10
mov ecx, dword [esi + 0x40]
mov eax, dword [esp + 0x28]
sub eax, ecx
push esi
mov dword [esi + 0x44], eax
call fcn.0050c530
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x14
push 0x10
call dword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
jge case.0x50f0f5.10
mov eax, dword [esi + 0x44]
test eax, eax
mov dword [esp + 0x10], 1
je case.0x50f0f5.10
mov ecx, dword [esi + 0x40]
add ecx, eax
push esi
mov dword [esi + 0x44], ecx
mov dword [esi + 0x40], 0
call fcn.0050c530
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x14
push 0x11
mov dword [esp + 0x14], 1
call dword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
jge 0x50f28f
cmp ebp, 0x26
jne 0x50f24f
fld qword [0x5d6138]
jmp 0x50f255
fld qword [0x5d92f0]
mov eax, dword [esi + 0x44]
test eax, eax
je 0x50f594
push 1
sub esp, 8
fstp qword [esp]
push 0
push 0
push edi
push esi
call fcn.0050ea50
test eax, eax
je case.0x50f0f5.10
push esi
call fcn.0050c530
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x14
cmp dword [ebx + 8], 0xffffffff
je case.0x50f0f5.10
lea edx, [esp + 0x14]
push edx
call dword [sym.imp.USER32.dll_GetCursorPos]
mov ecx, dword [ebx]
lea eax, [esp + 0x14]
push eax
push ecx
call dword [sym.imp.USER32.dll_ScreenToClient]
mov eax, dword [esp + 0x18]
mov ecx, dword [esi + 0x24]
xor edx, edx
cmp ebp, 0x26
setne dl
lea edx, [edx + edx - 1]
add eax, edx
cmp eax, ecx
mov dword [esp + 0x18], eax
jge case.0x50f0f5.10
cmp eax, dword [esi + 0x1c]
jl case.0x50f0f5.10
push eax
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.USER32.dll_SetCursorPos]
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x14
push 0x10
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
push 0
jge 0x50f32a
mov ecx, dword [esi + 0x48]
mov edx, dword [ecx]
push 1
push 0x28
push edx
call dword [sym.imp.USER32.dll_GetParent]
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x14
mov eax, dword [esi + 0x48]
mov ecx, dword [eax]
push 0
push 0x28
push ecx
call dword [sym.imp.USER32.dll_GetParent]
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x14
xor edx, edx
cmp ebp, 0x25
setne dl
push 0x11
mov dword [esp + 0x14], 1
lea edx, [edx + edx - 1]
mov ebp, edx
call dword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
jge 0x50f391
mov eax, dword [esi + 0x44]
test eax, eax
je 0x50f3eb
fld qword [0x5d8c90]
push 1
sub esp, 8
mov eax, ebp
fstp qword [esp]
cdq
push edx
push eax
jmp 0x50f26c
cmp dword [ebx + 8], 0xffffffff
je 0x50f3eb
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.USER32.dll_GetCursorPos]
mov edx, dword [esi + 0x48]
mov eax, dword [edx]
lea ecx, [esp + 0x14]
push ecx
push eax
call dword [sym.imp.USER32.dll_ScreenToClient]
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 0x20]
add eax, ebp
cmp eax, ecx
mov dword [esp + 0x14], eax
jge case.0x50f0f5.10
cmp eax, dword [esi + 0x18]
jl case.0x50f0f5.10
mov ecx, dword [esp + 0x18]
push ecx
push eax
call dword [sym.imp.USER32.dll_SetCursorPos]
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x14
push 0x10
call dword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
jge case.0x50f0f5.10
test ebp, ebp
mov eax, dword [esi + 0x44]
jle 0x50f4ca
test eax, eax
je 0x50f4a8
cmp eax, 1
mov edx, 0xffffffdf
jne 0x50f41c
and dword [ebx + 0x28], edx
test byte [ebx + 0x28], 0x20
je 0x50f47e
mov eax, dword [esi + 0x44]
cmp eax, 1
jbe 0x50f449
mov ecx, dword [esi + 0x40]
inc ecx
dec eax
push esi
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], eax
call fcn.0050c530
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x14
mov eax, dword [esi + 0x40]
mov ecx, dword [esp + 0x28]
inc eax
dec ecx
cmp eax, ecx
jb 0x50f458
mov eax, ecx
mov dword [esi + 0x40], eax
mov dword [esi + 0x44], 1
mov eax, dword [ebx + 0x28]
and eax, edx
push esi
mov dword [ebx + 0x28], eax
call fcn.0050c530
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x14
mov eax, dword [esp + 0x28]
mov edi, dword [esi + 0x40]
mov ecx, dword [esi + 0x44]
sub eax, edi
inc ecx
cmp ecx, eax
jae 0x50f491
mov eax, ecx
push esi
mov dword [esi + 0x44], eax
call fcn.0050c530
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x14
push esi
mov dword [esi + 0x40], 0
mov dword [esi + 0x44], 1
call fcn.0050c530
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x14
test eax, eax
je 0x50f531
cmp eax, 1
mov ecx, 0x20
jne 0x50f4db
or dword [ebx + 0x28], ecx
test byte [ebx + 0x28], cl
je 0x50f506
mov eax, dword [esi + 0x40]
test eax, eax
jbe 0x50f540
dec eax
mov dword [esi + 0x40], eax
mov eax, dword [esi + 0x44]
inc eax
push esi
mov dword [esi + 0x44], eax
call fcn.0050c530
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x14
dec dword [esi + 0x44]
jne 0x50f540
mov eax, dword [esi + 0x40]
test eax, eax
jbe 0x50f539
dec eax
push esi
mov dword [esi + 0x40], eax
mov dword [esi + 0x44], 1
call fcn.0050c530
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x14
mov edx, dword [esp + 0x28]
dec edx
mov dword [esi + 0x40], edx
mov dword [esi + 0x44], 1
push esi
call fcn.0050c530
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x14
mov ebx, dword [ebx]
call dword [sym.imp.USER32.dll_GetCapture]
cmp eax, ebx
je 0x50f12e
movzx eax, word [esp + 0x30]
movzx ecx, word [esp + 0x2c]
shl eax, 0x10
or eax, ecx
push eax
push ebp
push 0x100
push ebx
call dword [sym.imp.USER32.dll_GetParent]
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
pop ebp
pop ebx
pop edi
xor eax, eax
pop esi
add esp, 0xc
ret 0x14
fstp st(0)
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x14