Function at 0x51e433e2
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x30
or dword [esp], 0xffffffff
push ebp
push esi
mov esi, dword [esp + 0x3c]
mov edx, dword [esi + 0x44]
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x10]
and edx, 0x4000
or edx, 0x1a
mov dword [esi + 0x44], edx
mov edx, dword [esi + 8]
push edi
xor edi, edi
cmp byte [edx + 4], 2
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x40], edi
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], edi
jne 0x51e43438
cmp dword [esp + 0x48], edi
jne 0x51e43438
cmp dword [esp + 0x44], edi
je 0x51e434c0
mov dword [esp + 0xc], edi
xor ebp, ebp
inc ebp
cmp dword [esi + 0x50], 0xd
je 0x51e435d7
cmp byte [eax + 9], 0
je 0x51e43455
cmp byte [eax + 8], 0
je 0x51e435d7
push esi
mov dword [ecx + 4], ebp
call fcn.51e07bba
pop ecx
push dword [esi + 4]
call dword [sym.imp.USER32.dll_UpdateWindow]
push dword [esi + 4]
call dword [sym.imp.USER32.dll_SetCapture]
push 0x20
call dword [sym.imp.USER32.dll_GetKeyState]
test ah, ah
jns 0x51e435bb
push ebx
mov ebx, 0x20a
mov edi, pe_nt_image_headers32
call dword [sym.imp.USER32.dll_GetCapture]
cmp eax, dword [esi + 4]
jne 0x51e435b8
test byte [esi], 1
je 0x51e435b8
push 3
push ebx
xor eax, eax
cmp dword [0x51e8bab8], eax
push edi
push eax
lea eax, [esp + 0x34]
push eax
jne 0x51e434d6
call dword [sym.imp.USER32.dll_PeekMessageA]
jmp 0x51e434dc
cmp byte [eax + 0xd], 0
je 0x51e43438
xor ebp, ebp
inc ebp
mov dword [esp + 0x14], ebp
jmp 0x51e4343b
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x51e435a8
mov eax, dword [esp + 0x28]
cmp eax, edi
jb 0x51e43526
cmp eax, 0x108
ja 0x51e43526
mov dword [esi + 0x4c], eax
mov eax, dword [esp + 0x2c]
mov dword [esi + 0x50], eax
mov eax, dword [esp + 0x30]
movsx ecx, ax
mov dword [esi + 0x54], eax
shr eax, 0x10
movsx eax, ax
push esi
mov dword [esi + 0x58], ecx
mov dword [esi + 0x5c], eax
call fcn.51e18b45
test eax, eax
pop ecx
jne 0x51e435b8
mov eax, dword [esp + 0x28]
sub eax, edi
je 0x51e4353a
dec eax
jne 0x51e435a1
cmp dword [esp + 0x2c], 0x20
jne 0x51e435a1
mov dword [esp + 0x44], ebp
jmp 0x51e435a1
mov eax, dword [esp + 0x2c]
cmp eax, 0x20
jne 0x51e4358f
cmp word [esp + 0x30], 0
je 0x51e4358f
mov eax, dword [esp + 0x1c]
cmp byte [eax + 8], 0
je 0x51e435a1
push esi
call fcn.51e1435c
test eax, eax
pop ecx
je 0x51e435a1
call dword [sym.imp.USER32.dll_GetFocus]
push dword [esp + 0x10]
mov ebp, eax
push esi
call fcn.51e48cdf
pop ecx
pop ecx
call dword [sym.imp.USER32.dll_GetFocus]
cmp eax, ebp
jne 0x51e435b8
push 0x20
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
test ah, ah
jns 0x51e435b8
xor ebp, ebp
inc ebp
jmp 0x51e435a1
cmp eax, 0xd
mov dword [esp + 0x44], ebp
je 0x51e435b8
cmp eax, 0x20
je 0x51e435b8
mov dword [esp + 0x14], ebp
cmp dword [esp + 0x44], 0
jne 0x51e435b8
push 0x20
call dword [sym.imp.USER32.dll_GetKeyState]
test ah, ah
js 0x51e4348c
xor edi, edi
pop ebx
call dword [sym.imp.USER32.dll_ReleaseCapture]
cmp dword [esp + 0x10], edi
mov eax, dword [esp + 0x1c]
mov dword [eax + 4], edi
je 0x51e435d7
push esi
call fcn.51e07bba
pop ecx
jmp 0x51e435e8
push dword [esp + 0x14]
push dword [esp + 0x10]
push esi
call fcn.51e4303d
add esp, 0xc
and dword [esi + 0x44], 0x4000
pop edi
pop esi
pop ebp
add esp, 0x30
ret