Function at 0x58179d04
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
push esi
mov esi, dword [ebp + 8]
push 2
push 0
mov eax, dword [esi + 4]
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x18], eax
call fcn.5816a6a0
pop ecx
mov dword [ebp - 4], eax
test eax, eax
pop ecx
je 0x58179f33
push edi
lea eax, [ebp - 0x3c]
push ebx
push eax
push dword [0x581ae560]
call dword [sym.imp.USER32.dll_GetClientRect]
mov ebx, dword [sym.imp.USER32.dll_ClientToScreen]
lea eax, [ebp - 0x3c]
push eax
push dword [0x581ae560]
call ebx
lea eax, [ebp - 0x34]
push eax
push dword [0x581ae560]
call ebx
push dword [ebp - 0x30]
push dword [ebp - 0x34]
push dword [ebp - 0x38]
push dword [ebp - 0x3c]
push dword [ebp - 4]
call dword [sym.imp.GDI32.dll_IntersectClipRect]
add esi, 0x28
lea edi, [ebp - 0x2c]
mov dword [ebp - 0x1c], esi
lea eax, [ebp - 0x2c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push 2
push eax
push dword [ebp + 8]
movsd dword es:[edi], dword [esi]
call fcn.581706fc
mov esi, dword [ebp - 0x18]
add esp, 0xc
cmp dword [esi], 0
je 0x58179daf
mov edi, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x24]
sub edi, dword [ebp + 0xc]
sub eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], edi
mov dword [ebp - 8], eax
jmp 0x58179dc4
mov eax, dword [ebp - 0x28]
sub eax, dword [ebp + 0x10]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp + 0x10]
mov edi, dword [ebp - 0x10]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0xc]
call ebx
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0xc]
call ebx
dec dword [ebp - 0x24]
mov ebx, dword [sym.imp.USER32.dll_InvertRect]
dec dword [ebp - 0x20]
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 4]
call ebx
push dword [ebp - 0xc]
call dword [sym.imp.USER32.dll_SetCapture]
push 3
push 0x209
push 0x100
lea eax, [ebp - 0x58]
push 0
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x58179df4
push 1
call dword [sym.imp.USER32.dll_GetKeyState]
mov edx, dword [ebp - 0x54]
test ah, 0x80
jne 0x58179e2c
cmp edx, 0x202
jne 0x58179ed3
mov eax, dword [ebp - 0x4c]
movsx ecx, ax
shr eax, 0x10
sub edx, 0x200
movsx eax, ax
je 0x58179e4a
dec edx
dec edx
je 0x58179ed3
jmp 0x58179df4
xor edx, edx
cmp dword [esi], edx
je 0x58179e7f
mov eax, dword [esi + 4]
mov dword [ebp - 0xc], edx
lea edx, [ecx + edi]
cmp edx, eax
jge 0x58179e61
sub eax, edi
jmp 0x58179e70
mov edx, dword [ebp - 8]
mov eax, dword [esi + 8]
add edx, ecx
cmp edx, eax
jle 0x58179e72
sub eax, dword [ebp - 8]
mov ecx, eax
mov eax, ecx
sub eax, dword [ebp + 0xc]
mov dword [ebp + 0xc], ecx
mov dword [ebp - 0x14], eax
jmp 0x58179eac
mov ecx, dword [esi + 4]
mov dword [ebp - 0x14], edx
lea edx, [eax + edi]
cmp edx, ecx
jge 0x58179e90
sub ecx, edi
jmp 0x58179e9f
mov edx, dword [ebp - 8]
mov ecx, dword [esi + 8]
add edx, eax
cmp edx, ecx
jle 0x58179ea1
sub ecx, dword [ebp - 8]
mov eax, ecx
mov ecx, eax
sub ecx, dword [ebp + 0x10]
mov dword [ebp + 0x10], eax
mov dword [ebp - 0xc], ecx
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 4]
call ebx
push dword [ebp - 0xc]
lea eax, [ebp - 0x2c]
push dword [ebp - 0x14]
push eax
call dword [sym.imp.USER32.dll_OffsetRect]
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 4]
call ebx
jmp 0x58179df4
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 4]
call ebx
call dword [sym.imp.USER32.dll_ReleaseCapture]
push 2
push dword [ebp - 4]
push 0
call fcn.5816a895
add esp, 0xc
push dword [ebp + 8]
call fcn.5816fd2d
test eax, eax
pop ecx
je 0x58179f2e
mov esi, dword [ebp - 0x1c]
lea edi, [ebp - 0x2c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x18]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
cmp dword [eax], 0
je 0x58179f18
mov eax, dword [ebp + 0xc]
sub eax, dword [ebp - 0x2c]
jmp 0x58179f1e
mov eax, dword [ebp + 0x10]
sub eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x10]
add ecx, eax
push ecx
push dword [ebp + 8]
call fcn.5816fd0a
pop ecx
pop ecx
push 1
pop eax
pop ebx
pop edi
pop esi
leave
ret