Function at 0x30021283
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 0x20]
or dword [eax], 0xffffffff
mov eax, dword [ebp + 0x24]
or dword [eax], 0xffffffff
mov eax, dword [ebp + 0x28]
or dword [0x300759cc], 0xffffffff
push ebx
push esi
mov esi, dword [ebp + 0x14]
push edi
xor edi, edi
mov dword [eax], edi
mov eax, dword [esi + 0xe2]
mov dword [0x30075a00], eax
mov eax, dword [ebp + 8]
mov dword [0x30075a04], eax
mov eax, dword [esi + 0x1de]
cmp eax, edi
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 4], edi
mov dword [0x300759d4], edi
mov dword [0x300759d8], edi
mov dword [0x300759e4], edi
mov dword [0x300759d0], edi
mov dword [0x300759ec], edi
je 0x30021301
push edi
push eax
push dword [ebp + 0xc]
call dword [sym.imp.GDI32.dll_SelectPalette]
push dword [ebp + 0xc]
call dword [sym.imp.GDI32.dll_RealizePalette]
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 0x30021762
mov eax, dword [ebx]
mov dword [0x300759ac], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp + 0x14], eax
call dword [sym.imp.USER32.dll_GetDoubleClickTime]
mov ecx, dword [ebp + 0x14]
sub ecx, dword [0x300759c4]
mov ebx, dword [ebp + 0x1c]
movzx ecx, cx
cmp ecx, eax
jae 0x30021397
push dword [0x300759c0]
push dword [0x300759bc]
push ebx
push dword [ebp + 0x18]
call fcn.30067f27
test eax, eax
je 0x30021397
xor eax, eax
inc eax
jmp 0x30021399
xor eax, eax
mov ecx, dword [ebp + 0x14]
mov dword [0x300759c4], ecx
mov ecx, dword [ebp + 0x18]
push 0x10
mov dword [0x300759c8], eax
mov dword [0x300759bc], ecx
mov dword [0x300759c0], ebx
mov dword [ebp + 8], eax
call dword [sym.imp.USER32.dll_GetKeyState]
shr eax, 8
cmp dword [ebp + 0x2c], edi
movzx eax, al
mov dword [ebp + 0x14], eax
je 0x300213d2
mov dword [ebp + 0x14], edi
mov eax, dword [0x30096c40]
add eax, 0xfffff446
cmp eax, 0xc
ja case.0x300213e8.3003
movzx eax, byte [eax + 0x3002177f]
jmp dword [eax*4 + 0x3002176b]
mov dword [0x300759d0], 1
jmp 0x3002141c
mov dword [ebp - 0xc], 1
jmp 0x3002141c
mov dword [ebp - 4], 1
jmp 0x3002141c
cmp dword [ebp + 0x30], edi
je 0x3002141c
mov dword [0x300759ec], 1
push 2
pop eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 0xc]
call fcn.30067b6d
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
lea eax, [ebx + ecx]
push eax
mov eax, dword [ebp + 0x18]
add edx, eax
sub eax, dword [ebp - 0x14]
push edx
sub ebx, ecx
push ebx
push eax
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.USER32.dll_SetRect]
lea ebx, [esi + 0xd6]
push ebx
push dword [esi + 0xde]
push 0x65
push dword [esi + 0x26]
call fcn.3003a67d
test eax, eax
jne 0x300216df
push 1
push dword [ebx]
call fcn.3003baa3
cmp dword [ebp + 0x14], edi
je 0x3002155a
cmp dword [0x300759d0], edi
jne 0x3002155a
cmp dword [ebp - 4], edi
jne 0x3002155a
push edi
push 1
push 0x3001e3e9
push 0x30020f8e
call fcn.3001c3eb
push 0x30097c58
push dword [ebp + 0xc]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], edi
call dword [sym.imp.GDI32.dll_GetWindowOrgEx]
test word [esi + 0x22], 0x200
jne 0x300214d4
cmp dword [ebp + 0x10], edi
je 0x300214df
cmp dword [ebp + 0x10], 0x1f4
jge 0x300214df
xor ecx, ecx
inc ecx
mov dword [0x3007598c], ecx
jmp 0x300214e2
xor ecx, ecx
inc ecx
lea eax, [esi + 0xea]
mov dword [0x30075974], edi
mov dword [0x300759dc], eax
cmp dword [esi + 0x32], edi
jne 0x300214fb
mov dword [eax + 4], ecx
lea eax, [esi + 0x16a]
mov dword [0x300759e0], eax
cmp dword [esi + 0x36], edi
jne 0x3002150d
mov dword [eax], ecx
push edi
push edi
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push dword [esi + 0x72]
push dword [esi + 0x6e]
push dword [ebx]
push dword [esi + 0x26]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.3001cd1d
cmp eax, 0xffffffff
jne 0x3002153b
mov dword [ebp - 8], 1
mov eax, dword [0x300759dc]
mov ecx, 0x4000
test dword [eax + 4], ecx
jne 0x3002169b
mov eax, dword [0x300759e0]
test dword [eax], ecx
jmp 0x30021699
push edi
push edi
push 0x3001e956
push 0x3001f155
call fcn.3001c3eb
push 0x30097c58
push dword [ebp + 0xc]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], edi
call dword [sym.imp.GDI32.dll_GetWindowOrgEx]
lea eax, [esi + 0xea]
xor ecx, ecx
mov dword [0x300759dc], eax
inc ecx
mov dword [0x30075974], edi
mov dword [eax + 4], ecx
lea eax, [esi + 0x16a]
mov dword [0x300759e0], eax
mov dword [eax], ecx
test word [esi + 0x22], 0x200
jne 0x300215b9
cmp dword [ebp + 0x10], edi
je 0x300215bf
cmp dword [ebp + 0x10], 0x1f4
jge 0x300215bf
mov dword [0x3007598c], ecx
cmp dword [ebp - 4], edi
mov eax, dword [ebp - 0xc]
mov dword [0x300759f0], eax
jne 0x300215f3
push edi
push edi
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push dword [esi + 0x72]
push dword [esi + 0x6e]
push dword [ebx]
push dword [esi + 0x26]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.3001cd1d
xor ecx, ecx
inc ecx
jmp 0x300215f5
xor eax, eax
cmp eax, 0xffffffff
mov dword [0x300759f0], edi
mov dword [0x300759ec], edi
mov dword [0x300759d0], edi
jne 0x3002160f
mov dword [ebp - 8], ecx
push edi
push edi
push 0x3001f3d3
push 0x3001f43c
mov dword [0x300759c8], edi
call fcn.3001c3eb
push 0x30097c58
push dword [ebp + 0xc]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], edi
call dword [sym.imp.GDI32.dll_GetWindowOrgEx]
xor eax, eax
inc eax
push eax
push edi
mov dword [0x30075974], eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x10]
mov dword [0x300759dc], edi
push dword [ebp - 0x14]
mov dword [0x300759e0], edi
push dword [esi + 0x72]
mov dword [0x300759c8], edi
push dword [esi + 0x6e]
push dword [ebx]
push dword [esi + 0x26]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.3001cd1d
lea eax, [esi + 0xea]
lea edx, [esi + 0x16a]
mov ecx, 0x4000
mov dword [0x300759dc], eax
mov dword [0x300759e0], edx
test dword [eax + 4], ecx
jne 0x3002169b
test dword [edx], ecx
je 0x300216a7
lea eax, [ebp - 0x24]
push eax
push dword [ebp + 0xc]
call fcn.30020a8c
mov dword [0x3007598c], edi
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ecx, dword [eax + 0x44]
push dword [ebx]
mov dword [esi + 0x32], ecx
mov eax, dword [eax + 0x48]
mov dword [esi + 0x36], eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
cmp dword [esi + 0x32], edi
jne 0x300216d4
mov dword [esi + 0xee], edi
cmp dword [esi + 0x36], edi
jne 0x300216df
mov dword [esi + 0x16a], edi
push edi
push dword [ebx]
mov dword [0x300759f4], edi
call fcn.3003baa3
push dword [ebx]
call fcn.3004ee74
cmp dword [ebp - 8], edi
je 0x30021762
cmp dword [ebp + 0x14], edi
movsx eax, word [0x300759ce]
mov ecx, dword [ebp + 0x20]
mov dword [ecx], eax
movsx eax, word [0x300759cc]
mov ecx, dword [ebp + 0x24]
mov dword [ecx], eax
jne 0x30021723
push 1
push dword [esi + 0x1d6]
call fcn.3002cfd5
cmp dword [0x300759d8], edi
je 0x30021730
push 2
pop eax
jmp 0x30021755
cmp dword [0x300759e4], edi
je 0x30021746
mov eax, dword [0x300759e8]
neg eax
sbb eax, eax
add eax, 4
jmp 0x30021755
xor eax, eax
cmp dword [ebp + 8], edi
setne al
lea eax, [eax*4 + 1]
mov ecx, dword [0x300759d4]
mov edx, dword [ebp + 0x28]
mov dword [edx], ecx
jmp 0x30021764
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x2c