Function at 0x501158
Capabilities:
Log keystrokes via polling

Disassembly:
push 0x28
mov eax, 0x5ad195
call fcn.0058d262
mov eax, dword [ebp + 8]
test eax, eax
jne 0x501170
and dword [ebp - 0x2c], eax
jmp 0x501176
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x2c], eax
mov edi, dword [ebp + 0xc]
mov esi, dword [edi + 4]
mov dword [ebp - 0x1c], esi
call dword [sym.imp.USER32.dll_GetFocus]
push eax
mov dword [ebp - 0x30], eax
call fcn.0048a49c
mov ebx, pe_nt_image_headers32
mov dword [ebp - 0x14], eax
cmp esi, ebx
jb 0x5011a2
cmp esi, 0x109
jbe 0x5011b1
add esi, 0xfffffe00
cmp esi, 9
ja 0x50125e
test eax, eax
je 0x50125e
mov edi, dword [sym.imp.USER32.dll_GetParent]
mov esi, eax
cmp dword [esi + 0x6c], 0
jne 0x5011e8
push dword [esi + 0x20]
call edi
push eax
call fcn.0048a49c
cmp eax, dword [ebp + 8]
je 0x5011e8
push dword [esi + 0x20]
call edi
push eax
call fcn.0048a49c
mov esi, eax
test esi, esi
jne 0x5011c1
test esi, esi
je 0x50120f
mov eax, dword [esi + 0x6c]
test eax, eax
je 0x50120f
cmp dword [eax + 0x58], 0
je 0x50120f
mov eax, dword [eax + 0x58]
push dword [ebp + 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
test eax, eax
jne 0x50120f
inc eax
jmp 0x5013b8
cmp dword [ebp - 0x1c], 0x101
je 0x501226
cmp dword [ebp - 0x1c], ebx
je 0x501226
cmp dword [ebp - 0x1c], 0x102
jne 0x50125b
test esi, esi
je 0x50125b
mov esi, dword [esi + 0x6c]
test esi, esi
je 0x50125b
mov eax, dword [ebp + 0xc]
movzx eax, word [eax + 8]
cmp eax, 0xd
jne 0x501246
test byte [esi + 0x84], 1
jne 0x501254
cmp eax, 0x1b
jne 0x50125b
test byte [esi + 0x84], 2
je 0x50125b
xor eax, eax
jmp 0x5013b8
mov edi, dword [ebp + 0xc]
push dword [edi]
xor esi, esi
mov dword [ebp - 0x18], esi
call fcn.0048a49c
and dword [ebp - 0x28], esi
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x1c]
sub eax, ebx
mov dword [ebp - 0x24], 2
je 0x5012f8
dec eax
dec eax
je 0x5012ac
sub eax, 4
jne 0x50132f
cmp dword [ebp - 0x14], esi
jne 0x5012a1
push 0x12
call dword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
jns 0x50132f
cmp word [edi + 8], 0x20
je 0x50132f
push edi
push dword [ebp - 0x20]
call fcn.00500977
cmp dword [ebp - 0x1c], 0x102
jne 0x5012c2
test al, 0x84
jne 0x50132f
movzx ecx, word [edi + 8]
cmp ecx, 9
jne 0x5012cf
test al, 2
jne 0x50132f
cmp ecx, 0x20
je 0x501254
push edi
push dword [ebp - 0x20]
push dword [ebp + 8]
call fcn.00501067
test eax, eax
je 0x50132f
mov eax, dword [eax + 4]
test eax, eax
je 0x50132f
push edi
mov ecx, eax
call fcn.004fb1eb
jmp 0x5015ae
push edi
push dword [ebp - 0x20]
call fcn.00500977
movzx ecx, word [edi + 8]
cmp ecx, 0x1b
jg 0x501446
je 0x50149e
cmp ecx, 3
je 0x50149e
cmp ecx, 9
je 0x5013c0
cmp ecx, 0xd
je 0x50146a
mov eax, dword [ebp + 8]
test dword [eax + 0x58], 0x1000
jne 0x501370
push dword [ebp + 0xc]
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_IsDialogMessageA]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x501370
mov esi, dword [sym.imp.USER32.dll_GetFocus]
call esi
push eax
call fcn.0048a49c
cmp eax, dword [ebp - 0x14]
je 0x501370
call esi
push eax
call fcn.0048a49c
push eax
call fcn.00500bb1
pop ecx
push dword [ebp - 0x30]
mov esi, dword [sym.imp.USER32.dll_IsWindow]
call esi
test eax, eax
je 0x5013b5
mov edi, dword [sym.imp.USER32.dll_GetFocus]
call edi
push eax
call fcn.0048a49c
push eax
push dword [ebp - 0x14]
call fcn.00500c24
pop ecx
pop ecx
push dword [ebp - 0x2c]
call esi
test eax, eax
je 0x5013b5
call edi
push eax
call fcn.0048a49c
push eax
push dword [ebp - 0x14]
push dword [ebp + 8]
call fcn.00500de9
mov eax, dword [ebp - 0x18]
call fcn.0058d307
ret 8
test al, 2
jne 0x50132f
push 0x10
call dword [sym.imp.USER32.dll_GetKeyState]
mov esi, dword [ebp + 8]
xor ebx, ebx
test ax, ax
sets bl
mov ecx, esi
push ebx
push 0
call fcn.0048e42a
test eax, eax
je 0x50132f
cmp dword [eax + 4], 0
je 0x501406
mov eax, dword [eax + 4]
mov edx, dword [eax]
push edi
mov ecx, eax
call dword [edx + 0xac]
jmp 0x5015ae
mov eax, dword [eax]
test eax, eax
je 0x501414
push eax
call fcn.0048a49c
jmp 0x50141f
push ebx
push dword [ebp - 0x20]
mov ecx, esi
call fcn.00485e16
mov edi, eax
test edi, edi
je 0x5015ae
mov eax, dword [esi + 0x68]
and dword [eax + 0x70], 0
push edi
call fcn.00500a4b
push edi
push dword [ebp - 0x14]
call fcn.00500c24
pop ecx
pop ecx
jmp 0x5015ae
cmp ecx, 0x25
jl 0x50132f
cmp ecx, 0x26
jle 0x501506
cmp ecx, 0x28
jle 0x50150d
cmp ecx, 0x2b
jne 0x50132f
test al, 4
jne 0x50132f
push dword [ebp - 0x14]
call fcn.00500a23
pop ecx
test al, 0x10
je 0x50148b
mov esi, dword [ebp - 0x14]
mov ecx, esi
call fcn.0048e0cb
jmp 0x501493
push dword [ebp + 8]
call fcn.00500db4
xor edi, edi
mov dword [ebp - 0x24], eax
cmp esi, edi
jne 0x5014b5
jmp 0x5014a0
xor edi, edi
push dword [ebp - 0x24]
push dword [ebp + 8]
call fcn.00500ca7
mov esi, eax
cmp esi, edi
je 0x50132f
mov ecx, esi
call fcn.0048e176
test eax, eax
jne 0x5014cc
push edi
call dword [sym.imp.USER32.dll_MessageBeep]
jmp 0x50132f
cmp dword [esi + 0x6c], edi
je 0x50132f
push edi
push edi
push edi
push 1
push 0xfffffdd9
push esi
mov dword [ebp - 4], edi
call fcn.0048e1b8
add esp, 0x18
or dword [ebp - 4], 0xffffffff
jmp 0x5015ae
mov dword [ebp - 0x28], 1
push edi
push dword [ebp - 0x14]
call fcn.00500977
test al, 1
jne 0x50132f
mov ecx, dword [ebp + 8]
push 0
cmp dword [ebp - 0x28], esi
je 0x50152f
call fcn.0048e9d5
jmp 0x501534
call fcn.0048ea25
mov esi, eax
test esi, esi
je 0x50132f
cmp dword [esi + 8], 0
je 0x50154d
mov ecx, dword [ebp + 8]
push esi
call fcn.0048e570
cmp dword [esi + 4], 0
je 0x501561
mov ecx, dword [esi + 4]
mov eax, dword [ecx]
push edi
call dword [eax + 0xac]
jmp 0x5015ae
mov eax, dword [esi]
test eax, eax
je 0x50156f
push eax
call fcn.0048a49c
jmp 0x50157d
push dword [ebp - 0x28]
mov ecx, dword [ebp + 8]
push dword [ebp - 0x14]
call fcn.0049e2b3
mov edi, eax
test edi, edi
je 0x50132f
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x68]
xor ebx, ebx
push edi
mov dword [eax + 0x70], ebx
call fcn.00500a4b
cmp dword [esi + 8], ebx
je 0x5015ae
push ebx
push 1
push 0xf1
push dword [edi + 0x20]
call dword [sym.imp.USER32.dll_SendMessageA]
mov dword [ebp - 0x18], 1
jmp 0x501370