Function at 0x4058a0
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x38
mov eax, dword [0x58a110]
xor eax, esp
mov dword [esp + 0x34], eax
push ebx
push edi
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.USER32.dll_GetCursorPos]
test eax, eax
je 0x405c5d
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
lea eax, [esp + 0xc]
mov dword [esp + 0xc], ecx
mov ecx, dword [esi + 0x20]
push eax
push ecx
mov dword [esp + 0x18], edx
call dword [sym.imp.USER32.dll_ScreenToClient]
mov ebx, 1
push ebx
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
mov edx, 0xffff8000
cmp ax, dx
jne 0x4059cc
call dword [sym.imp.USER32.dll_GetFocus]
test eax, eax
je 0x4059db
mov eax, 0xffffd8f1
cmp dword [0x58b88c], eax
jle 0x4059a8
cmp dword [0x58b890], eax
jle 0x4059a8
mov ecx, dword [esi + 0x20]
lea eax, [esp + 0x1c]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetClientRect]
mov ecx, dword [esp + 0x18]
sub ecx, dword [0x58b890]
mov eax, dword [esp + 0x14]
sub eax, dword [0x58b88c]
add dword [esp + 0x20], ecx
add dword [esp + 0x28], ecx
add dword [esp + 0x1c], eax
add dword [esp + 0x24], eax
lea edx, [esp + 0x1c]
push edx
mov ecx, esi
call fcn.0040f9d7
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.USER32.dll_CopyRect]
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x2c]
push ebx
sub edx, eax
push edx
mov edx, dword [esp + 0x3c]
sub edx, ecx
push edx
push eax
push ecx
mov ecx, esi
call fcn.0041709c
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov dword [0x58b890], ecx
jmp 0x4059d6
mov edx, dword [esp + 0x10]
dec edx
cmp edx, 0x17
ja 0x4059db
cmp dword [esp + 0xc], 0x28e
jge 0x4059db
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov dword [0x58b890], ecx
jmp 0x4059d6
mov eax, 0xffffd8f1
mov dword [0x58b890], eax
mov dword [0x58b88c], eax
mov edx, dword [esp + 0xc]
add edx, 0xfffffd71
cmp edx, 0x1b
ja 0x405a1b
mov eax, dword [esp + 0x10]
add eax, 0xfffffffd
cmp eax, 0xe
ja 0x405a1b
cmp dword [0x5925a4], 0
jne 0x405a42
push ebx
push 0x3ef
mov ecx, esi
call fcn.00416efb
mov ecx, eax
call fcn.004170dc
mov dword [0x5925a4], ebx
jmp 0x405a42
cmp dword [0x5925a4], ebx
jne 0x405a42
push 0
push 0x3ef
mov ecx, esi
call fcn.00416efb
mov ecx, eax
call fcn.004170dc
mov dword [0x5925a4], 0
mov ecx, dword [esp + 0xc]
mov edi, dword [sym.imp.USER32.dll_InvalidateRect]
add ecx, 0xfffffdb2
cmp ecx, 0x5f
ja 0x405ab2
mov edx, dword [esp + 0x10]
add edx, 0xfffffea4
cmp edx, 0x3a
ja 0x405ab2
cmp dword [0x5925a8], 0
jne 0x405afb
push 0x8b
push 0x8c
push 0x8e
push 0x8c
lea ecx, [esi + 0x330]
call fcn.0040db51
lea ecx, [esi + 0x330]
call fcn.0040dbe8
mov eax, dword [esi + 0x350]
push 1
push 0
push eax
call edi
mov dword [0x5925a8], ebx
jmp 0x405afb
cmp dword [0x5925a8], ebx
jne 0x405afb
push 0x8b
push 0x8d
push 0x8e
push 0x8d
lea ecx, [esi + 0x330]
call fcn.0040db51
lea ecx, [esi + 0x330]
call fcn.0040dbe8
mov ecx, dword [esi + 0x350]
push 1
push 0
push ecx
call edi
mov dword [0x5925a8], 0
mov edx, dword [esp + 0xc]
add edx, 0xfffffeb6
cmp edx, 0x77
ja 0x405b5f
mov eax, dword [esp + 0x10]
add eax, 0xffffffdd
cmp eax, 0x22
ja 0x405b5f
cmp dword [0x5925ac], 0
jne 0x405ba5
push 0
push 0x92
push 0x91
push 0x92
lea ecx, [esi + 0x3c8]
call fcn.0040db51
lea ecx, [esi + 0x3c8]
call fcn.0040dbe8
mov ecx, dword [esi + 0x3e8]
push 1
push 0
push ecx
call edi
mov dword [0x5925ac], ebx
jmp 0x405ba5
cmp dword [0x5925ac], ebx
jne 0x405ba5
push 0
push 0x90
push 0x91
push 0x90
lea ecx, [esi + 0x3c8]
call fcn.0040db51
lea ecx, [esi + 0x3c8]
call fcn.0040dbe8
mov edx, dword [esi + 0x3e8]
push 1
push 0
push edx
call edi
mov dword [0x5925ac], 0
mov eax, dword [esp + 0xc]
add eax, 0xfffffe2f
cmp eax, 0x77
ja 0x405c17
mov ecx, dword [esp + 0x10]
add ecx, 0xffffffdd
cmp ecx, 0x22
ja 0x405c17
cmp dword [0x5925b0], 0
jne 0x405c5d
push 0
push 0x94
push 0x97
push 0x94
lea ecx, [esi + 0x45c]
call fcn.0040db51
lea ecx, [esi + 0x45c]
call fcn.0040dbe8
mov edx, dword [esi + 0x47c]
push 1
push 0
push edx
call edi
mov dword [0x5925b0], ebx
pop edi
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.0050e12a
mov esp, ebp
pop ebp
ret
cmp dword [0x5925b0], ebx
jne 0x405c5d
push 0
push 0x93
push 0x97
push 0x93
lea ecx, [esi + 0x45c]
call fcn.0040db51
lea ecx, [esi + 0x45c]
call fcn.0040dbe8
mov eax, dword [esi + 0x47c]
push 1
push 0
push eax
call edi
mov dword [0x5925b0], 0
mov ecx, dword [esp + 0x3c]
pop edi
pop ebx
xor ecx, esp
call fcn.0050e12a
mov esp, ebp
pop ebp
ret