Function at 0x30021996
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
or dword [ebp - 0x20], 0xffffffff
push esi
push edi
push 4
push dword [ebp + 8]
xor esi, esi
xor edi, edi
inc esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x28], edi
call dword [sym.imp.USER32.dll_GetWindowLongA]
cmp eax, edi
mov dword [ebp - 0xc], eax
je 0x30021ff6
push esi
call fcn.30047fcd
push 0x10
call dword [sym.imp.USER32.dll_GetKeyState]
shr eax, 8
test al, al
jne 0x300219e3
cmp dword [ebp + 0x20], edi
mov dword [ebp + 0x20], edi
je 0x300219e6
mov dword [ebp + 0x20], esi
mov eax, dword [ebp + 0xc]
sub eax, 0x452
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalLock]
je 0x30021a59
dec eax
je 0x30021a5c
sub eax, 7
je 0x30021a28
dec eax
dec eax
jne 0x30021a89
push dword [ebp - 0xc]
mov dword [ebp + 0xc], 0x457
call ebx
movzx eax, word [eax + 0xde]
push dword [ebp - 0xc]
mov dword [ebp + 0x10], eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
jmp 0x30021a89
mov eax, 0x7fff
push eax
push eax
push edi
push edi
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.USER32.dll_SetRect]
lea eax, [ebp - 0x4c]
push eax
push dword [ebp + 8]
call fcn.3002d2d1
cmp dword [ebp + 0x20], edi
jne 0x30021ff5
or dword [0x300759cc], 0xffffffff
jmp 0x30021a89
mov dword [ebp - 0x24], esi
push dword [ebp - 0xc]
call ebx
lea ecx, [ebp - 0x30]
push ecx
push esi
lea ecx, [ebp - 0x34]
push ecx
push edi
push eax
call fcn.3005097d
push dword [ebp - 0xc]
mov esi, eax
neg esi
sbb esi, esi
inc esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
cmp esi, edi
jne 0x30021ff5
push edi
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowLongA]
mov esi, eax
cmp esi, edi
je 0x30021ff5
push esi
call ebx
mov eax, dword [eax + 8]
push esi
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 0xc]
call ebx
cmp dword [ebp + 0x14], edi
mov esi, eax
je 0x30021b11
mov eax, dword [esi + 0xb6]
lea ebx, [esi + 0xce]
push ebx
mov dword [0x300759a4], eax
mov eax, dword [esi + 0x1c6]
push 0x67
push 0x64
mov dword [0x300759a8], eax
push dword [esi + 0x26]
mov dword [0x300759f4], 0x3001cb67
mov dword [0x300759f8], 0x300198de
mov dword [0x300759fc], 0x3001a80c
call fcn.3003a67d
test eax, eax
jne 0x30021ff5
mov eax, dword [ebx]
mov dword [0x300759ac], eax
jmp 0x30021b23
mov dword [0x300759f4], edi
mov dword [0x300759f8], edi
mov dword [0x300759fc], edi
test byte [esi + 0x22], 0x80
je 0x30021fc9
push edi
push edi
push edi
push edi
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.USER32.dll_SetRect]
mov eax, dword [esi + 0xe6]
cmp eax, edi
je 0x30021b77
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
cmp dword [eax + 0x44], 2
jne 0x30021b60
movsx ecx, word [eax + 0x3e]
movsx eax, word [eax + 0x3c]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x2c], eax
push dword [esi + 0xe6]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push 1
push esi
push dword [ebp + 8]
call fcn.30050e78
or dword [esi + 0x42], 0xffffffff
cmp dword [ebp + 0xc], 0x454
je 0x30021b96
cmp dword [ebp + 0xc], 0x456
jle 0x30021b9e
cmp dword [ebp + 0xc], 0x459
jg 0x30021b9e
mov eax, dword [ebp + 0x10]
mov dword [0x300759cc], eax
lea eax, [esi + 0xd6]
push eax
push dword [esi + 0xde]
push 0x65
push dword [esi + 0x26]
call fcn.3003a67d
test eax, eax
jne 0x30021fc9
mov eax, dword [ebp + 0xc]
add eax, 0xfffffbb2
cmp eax, 0xb
ja case.0x30021bd5.1104
movzx eax, byte [eax + 0x30022014]
jmp dword [eax*4 + 0x30021ffc]
push edi
push edi
push 0x30020b42
lea eax, [ebp - 0x1c]
push eax
push edi
mov dword [ebp - 0x1c], edi
push dword [esi + 0xd6]
push dword [esi + 0x26]
call fcn.3001ca83
mov eax, dword [ebp - 0x1c]
inc eax
mov ebx, 0x458
cmp dword [ebp + 0xc], ebx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 8], eax
mov dword [ebp - 4], 1
jne 0x30021c51
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
call fcn.3004e6e2
test eax, eax
je 0x30021fc9
push 1
call fcn.30047fcd
dec dword [ebp - 4]
jns 0x30021c39
mov dword [ebp - 4], edi
dec dword [ebp - 8]
jns 0x30021c41
mov dword [ebp - 8], edi
mov eax, dword [ebp - 8]
cmp dword [ebp - 4], eax
jle 0x30021c58
mov ecx, dword [ebp - 4]
mov dword [ebp - 8], ecx
jmp 0x30021c55
dec eax
mov dword [ebp - 8], eax
mov dword [ebp - 4], eax
movzx eax, word [ebp - 4]
movzx ecx, word [ebp - 8]
shl eax, 0x10
or eax, ecx
mov dword [0x300759cc], eax
mov dword [ebp + 0xc], ebx
mov dword [0x30075968], 0x3001d729
mov dword [ebp - 0x14], edi
jmp case.0x30021bd5.1104
cmp dword [ebp - 0x20], edi
jl case.0x30021bd5.1102
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x20]
push 0x65
push dword [esi + 0x26]
call fcn.3003a5eb
test eax, eax
jne case.0x30021bd5.1102
push dword [ebp - 0x10]
call fcn.3003bbfd
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push dword [ebp - 0x2c]
push eax
call fcn.3001c300
push 1
push 4
add eax, 0x2c
push eax
call fcn.30067eb7
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 0x10]
call fcn.3004ee74
jmp case.0x30021bd5.1102
movsx eax, word [0x300759ce]
mov dword [esi + 0x42], eax
movsx eax, word [0x300759cc]
mov dword [esi + 0x46], eax
jmp case.0x30021bd5.1102
movsx eax, word [0x300759ce]
mov dword [ebp - 0x20], eax
movsx eax, word [0x300759cc]
mov dword [ebp + 0xc], edi
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x2c], eax
cmp dword [esi + 0x1de], edi
mov eax, dword [esi + 0xe2]
mov ebx, dword [sym.imp.USER32.dll_GetDC]
mov dword [0x30075a00], eax
mov eax, dword [ebp + 8]
mov dword [0x30075a04], eax
je 0x30021d51
push eax
call ebx
push edi
push dword [esi + 0x1de]
mov dword [ebp + 0x10], eax
push eax
call dword [sym.imp.GDI32.dll_SelectPalette]
push dword [ebp + 0x10]
call dword [sym.imp.GDI32.dll_RealizePalette]
push dword [ebp + 0x10]
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_ReleaseDC]
test word [esi + 0x22], 0x200
jne 0x30021d67
cmp dword [ebp - 0x18], edi
je 0x30021d71
cmp dword [ebp - 0x18], 0x1f4
jge 0x30021d71
mov dword [0x3007598c], 1
cmp dword [ebp + 0xc], edi
jle 0x30021e26
push dword [ebp + 0x20]
push dword [ebp + 0xc]
push 0x3001d9dd
push 0x30020b5a
call fcn.3001c3eb
push dword [ebp + 8]
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x38], edi
call ebx
push 0x30097c58
push eax
mov dword [ebp + 0x10], eax
call dword [sym.imp.GDI32.dll_GetWindowOrgEx]
lea eax, [esi + 0xea]
mov dword [0x30075974], edi
mov dword [0x300759dc], eax
cmp dword [esi + 0x32], edi
mov dword [0x300759c8], edi
je 0x30021dca
cmp dword [ebp + 0x20], edi
jne 0x30021dd1
mov dword [eax + 4], 1
lea eax, [esi + 0x16a]
mov dword [0x300759e0], eax
cmp dword [esi + 0x36], edi
je 0x30021de6
cmp dword [ebp + 0x20], edi
jne 0x30021dec
mov dword [eax], 1
push dword [ebp - 0x14]
lea eax, [ebp - 0x4c]
push edi
push eax
push dword [ebp - 0x38]
push dword [ebp - 0x3c]
push dword [esi + 0x72]
push dword [esi + 0x6e]
push dword [esi + 0xd6]
push dword [esi + 0x26]
push dword [ebp - 0x18]
push dword [ebp + 0x10]
call fcn.3001cd1d
push dword [ebp + 0x10]
mov dword [0x30075968], edi
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_ReleaseDC]
cmp dword [0x30075970], edi
je 0x30021e33
cmp dword [ebp + 0xc], edi
jne 0x30021ea6
push edi
push edi
push 0x3001f3d3
push 0x3001f43c
call fcn.3001c3eb
push dword [ebp + 8]
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x38], edi
call ebx
push 0x30097c58
push eax
mov dword [ebp + 0x10], eax
call dword [sym.imp.GDI32.dll_GetWindowOrgEx]
xor eax, eax
inc eax
push eax
push edi
mov dword [0x30075974], eax
lea eax, [ebp - 0x4c]
push eax
push edi
push edi
mov dword [0x300759dc], edi
mov dword [0x300759e0], edi
push dword [esi + 0x72]
mov dword [0x300759c8], edi
push dword [esi + 0x6e]
push dword [esi + 0xd6]
push dword [esi + 0x26]
push dword [ebp - 0x18]
push dword [ebp + 0x10]
call fcn.3001cd1d
push dword [ebp + 0x10]
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_ReleaseDC]
lea eax, [esi + 0xea]
lea ecx, [esi + 0x16a]
mov dword [0x3007598c], edi
mov dword [0x300759dc], eax
mov dword [0x300759e0], ecx
mov eax, dword [eax + 4]
mov edx, 0x4000
test edx, eax
jne 0x30021ee9
mov ecx, dword [ecx]
test edx, ecx
jne 0x30021ee9
cmp eax, 1
jne 0x30021edf
cmp dword [esi + 0x32], edi
jne 0x30021ee9
cmp ecx, 1
jne 0x30021f04
cmp dword [esi + 0x36], edi
je 0x30021f04
push dword [ebp + 8]
call ebx
mov ebx, eax
lea eax, [ebp - 0x4c]
push eax
push ebx
call fcn.30020a8c
push ebx
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_ReleaseDC]
lea ebx, [esi + 0xd6]
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_GlobalLock]
cmp dword [ebp + 0xc], 0x45a
mov ecx, dword [eax + 0x44]
mov dword [esi + 0x32], ecx
mov eax, dword [eax + 0x48]
mov dword [esi + 0x36], eax
je 0x30021f39
cmp dword [ebp + 0x20], edi
jne 0x30021f39
push 1
push dword [esi + 0x1d6]
call fcn.3002cfd5
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
cmp dword [ebp + 0x24], edi
je 0x30021f49
mov dword [ebp + 0xc], edi
mov eax, dword [ebp + 0xc]
sub eax, edi
je 0x30021f8e
sub eax, 0x457
je 0x30021f7b
dec eax
dec eax
je 0x30021f7b
cmp dword [ebp - 0x24], edi
jne 0x30021f69
cmp dword [ebp + 0x1c], edi
jne 0x30021f69
xor eax, eax
jmp 0x30021f6c
xor eax, eax
inc eax
push eax
push edi
push dword [ebp + 0x14]
push dword [ebp + 8]
call fcn.3002037e
jmp 0x30021f8e
push dword [ebp + 0x1c]
mov eax, esi
push dword [ebp + 0x14]
push dword [ebp + 0x18]
push dword [ebp + 8]
call fcn.3001ff6c
cmp dword [ebp - 0x28], edi
je 0x30021fab
push 1
push edi
push dword [ebp - 0x38]
push dword [ebp - 0x3c]
push dword [ebp - 0x2c]
push dword [ebp - 0x20]
push esi
push dword [ebp + 8]
call fcn.300204e7
cmp dword [esi + 0xe6], edi
jne 0x30021fbe
cmp dword [esi + 0x32], edi
jne 0x30021fbe
mov dword [esi + 0xee], edi
cmp dword [esi + 0x36], edi
jne 0x30021fc9
mov dword [esi + 0x16a], edi
push dword [esi + 0xd6]
call fcn.3004ee74
push dword [ebp - 0xc]
mov dword [0x300759f4], edi
mov dword [0x300759f8], edi
mov dword [0x300759fc], edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call fcn.30047fcd
pop ebx
pop edi
pop esi
leave
ret 0x20