Function at 0x40212d
Capabilities:
Check for time delay via gettickcount
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
push 0x28
xor edi, edi
pop esi
cmp eax, 0x800
push 0x10
pop ebx
jae 0x40219a
test al, 1
mov dword [ebp - 8], eax
je 0x402393
test al, 4
je 0x402436
xor eax, eax
push 0x97
push eax
push eax
push eax
push eax
push eax
mov dword [0x406cac], eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowPos]
push 0
push 0x7ffffffe
push 1
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetTimer]
or dword [0x406990], 0xffffffff
and dword [0x406994], 0
jmp 0x402b65
lea ecx, [ebp - 8]
push ebx
push ecx
lea ecx, [ebp - 0x38]
push ecx
push 0x10000003
push eax
mov dword [ebp - 8], esi
call dword [sym.imp.USER32.dll_GetRawInputData]
cmp eax, esi
jne 0x402b65
movzx eax, word [ebp - 0x24]
cmp eax, edi
mov dword [ebp - 8], eax
je 0x402b65
test ah, 0xc
je 0x402368
shr eax, 0xb
and eax, 1
test byte [0x406c98], 0x10
mov dword [ebp - 4], eax
je 0x402b65
call dword [sym.imp.USER32.dll_GetMessagePos]
mov dword [ebp + 0xc], eax
movsx ebx, word [ebp + 0xe]
movsx eax, ax
push ebx
push eax
call dword [sym.imp.USER32.dll_WindowFromPoint]
mov esi, eax
cmp esi, dword [0x406cb0]
je 0x402220
push 2
push esi
mov dword [0x406cb0], esi
call dword [sym.imp.USER32.dll_GetAncestor]
mov dword [0x406cb4], eax
jmp 0x402225
mov eax, dword [0x406cb4]
cmp eax, dword [0x406ca0]
je 0x402b65
cmp eax, dword [0x406ca4]
je 0x402b65
mov edi, dword [sym.imp.USER32.dll_GetWindowLongA]
push 0xfffffffffffffff0
push esi
call edi
and eax, 0x31000f
cmp eax, 7
jne 0x40228c
push 2
push esi
call dword [sym.imp.USER32.dll_GetWindow]
mov esi, eax
test esi, esi
je 0x402b65
lea eax, [ebp - 0x38]
push eax
push esi
call dword [sym.imp.USER32.dll_GetWindowRect]
cmp ebx, dword [ebp - 0x34]
jl 0x402b65
cmp ebx, dword [ebp - 0x2c]
jge 0x402252
movsx eax, word [ebp + 0xc]
cmp eax, dword [ebp - 0x38]
jl 0x402252
cmp eax, dword [ebp - 0x30]
jge 0x402252
lea eax, [ebp - 0x38]
push eax
push 0x60
push 2
push dword [ebp + 0xc]
push 0
push 0x84
push esi
call dword [sym.imp.USER32.dll_SendMessageTimeoutA]
push 0x10
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
mov ebx, dword [sym.imp.USER32.dll_PostMessageA]
movzx eax, ax
shr eax, 1
cmp dword [ebp - 0x38], 6
je 0x40232d
test eax, eax
jne 0x402331
cmp dword [ebp - 0x38], 7
je 0x4022ec
lea eax, [ebp - 0x38]
push 0xf
push eax
push esi
call dword [sym.imp.USER32.dll_GetClassNameA]
cmp eax, 9
jne 0x4022fe
cmp dword [ebp - 0x38], 0x6f726353
jne 0x4022fe
push 0xfffffffffffffff0
push esi
call edi
test al, 1
je 0x402331
cmp dword [ebp - 4], 0
je 0x40230b
and dword [ebp - 4], 0
xor word [ebp - 0x22], 0xfff0
jmp 0x40230b
test byte [0x406c98], 0x20
je 0x402b65
movzx eax, word [ebp - 0x22]
push dword [ebp + 0xc]
shl eax, 0x10
push eax
mov eax, dword [ebp - 4]
lea eax, [eax*4 + 0x20a]
push eax
push esi
call dword [sym.imp.USER32.dll_PostMessageA]
jmp 0x402b65
test eax, eax
je 0x40234f
cmp dword [ebp - 4], 0
movzx eax, word [ebp - 0x22]
jne 0x402340
xor eax, 0xfff0
push dword [ebp + 0xc]
shl eax, 0x10
push eax
push 0x20e
push esi
call ebx
movzx eax, word [ebp - 0x22]
shr eax, 0xf
xor eax, dword [ebp - 4]
push esi
push eax
push 0x114
push esi
call ebx
jmp 0x402b65
test ax, 0x154
je 0x40240d
cmp dword [0x406b60], edi
je 0x402385
mov dword [0x406b60], edi
jmp 0x402b65
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x406cb8], eax
mov eax, dword [ebp - 8]
mov ecx, dword [0x406c98]
mov edx, eax
and edx, 0x30
je 0x4023ad
test cl, 0x40
je 0x4023ad
shl edx, 2
or eax, edx
mov dword [ebp - 8], eax
test ax, 0x280
je 0x4026ea
or dword [0x406c88], 4
cmp dword [0x4069a0], edi
je 0x40243c
mov eax, dword [0x4069a4]
cmp eax, edi
jle 0x40242b
lea eax, [eax + eax*2]
push 0xffffffffffffffec
mov ebx, dword [eax*4 + 0x406690]
push ebx
call dword [sym.imp.USER32.dll_GetWindowLongA]
test al, 8
jne 0x402402
mov esi, dword [sym.imp.USER32.dll_SetWindowPos]
push 0x13
push edi
push edi
push edi
push edi
push 0xffffffffffffffff
push ebx
call esi
push 0x13
push edi
push edi
push edi
push edi
push 0xfffffffffffffffe
push ebx
call esi
mov dword [0x4069a4], edi
jmp 0x402b65
test ax, 0x2a8
je 0x402393
push edi
push 0xd
push 3
mov dword [0x406b60], eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetTimer]
jmp 0x402b65
call dword [sym.imp.USER32.dll_EndMenu]
jmp 0x402b65
mov ecx, dword [0x406c98]
mov edx, dword [0x406994]
test cl, 8
je 0x40246e
cmp edx, edi
jne 0x40246e
mov esi, dword [0x406990]
cmp esi, edi
jle 0x40246e
cmp esi, 0xd
jge 0x40246e
mov dword [0x406990], 4
mov dword [0x406994], eax
jmp 0x402b65
shr eax, 8
and eax, 2
and ecx, 2
xor eax, ecx
shr eax, 1
mov edi, eax
mov eax, dword [0x406cac]
test eax, eax
mov dword [ebp + 0xc], edi
jg 0x402678
test dl, 4
jne 0x4024c5
mov esi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 0x11
call esi
movzx ebx, ax
push 0x10
shr ebx, 1
call esi
movzx eax, ax
or ebx, eax
push 0x1d
shr ebx, 2
call esi
movzx eax, ax
or ebx, eax
shr ebx, 0xc
mov eax, ebx
or al, 4
or dword [0x406994], eax
jmp 0x4024ca
and edx, 0xb
mov ebx, edx
mov esi, dword [0x406cc0]
push 0xfffffffffffffff0
push esi
call dword [sym.imp.USER32.dll_GetWindowLongA]
mov ecx, dword [0x406c98]
test cl, 4
jne 0x402514
and eax, 0xff7bffff
cmp eax, 0x96000000
jne 0x40215b
cmp ebx, 3
jne 0x40215b
push 5
push 0
push 0x8010
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_PostMessageA]
jmp 0x40215b
test bl, 8
jne 0x40263b
test eax, 0x80000
je 0x40263b
test bl, 1
mov edi, ecx
je 0x402535
xor edi, 0x1c00
test edi, 0x400
je 0x402548
test eax, 0x1000000
jne 0x40263b
mov eax, dword [ebp - 8]
test al, 0x20
jne 0x402610
cmp dword [0x406c88], 0x50
je 0x402610
mov edx, edi
mov ecx, 0x1800
and edx, ecx
je 0x40263e
cmp edx, ecx
je 0x40215b
push 4
push esi
call dword [sym.imp.USER32.dll_GetWindow]
test eax, eax
jne 0x4025f2
lea eax, [ebp - 0x38]
push 0x28
push eax
push esi
call dword [sym.imp.USER32.dll_GetClassNameA]
sub eax, 7
je 0x4025fa
dec eax
dec eax
je 0x4025e9
sub eax, 7
je 0x4025e0
dec eax
je 0x4025d7
dec eax
je 0x4025b3
sub eax, 0x14
jne 0x4025f2
cmp dword [ebp - 0x38], 0x3043317b
jmp 0x4025f0
cmp dword [ebp - 0x38], 0x697a6f4d
jne 0x4025c5
cmp dword [ebp - 0x34], 0x57616c6c
je 0x402603
cmp dword [ebp - 0x38], 0x6f726843
je 0x402603
cmp dword [ebp - 0x38], 0x69656c53
jmp 0x4025f0
cmp dword [ebp - 0x38], 0x616e754c
jmp 0x4025f0
cmp dword [ebp - 0x38], 0x7265704f
jmp 0x4025f0
cmp dword [ebp - 0x38], 0x50204848
je 0x402603
test edi, 0x800
jmp 0x402609
cmp dword [ebp - 0x38], 0x72464549
jne 0x4025f2
test edi, 0x1000
je 0x40263b
jmp 0x40215b
call dword [sym.imp.USER32.dll_GetMessagePos]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x38]
push eax
push esi
call dword [sym.imp.USER32.dll_GetWindowRect]
push 4
call dword [sym.imp.USER32.dll_GetSystemMetrics]
movsx ecx, word [ebp - 2]
sub ecx, dword [ebp - 0x34]
cmp ecx, eax
jg 0x40215b
mov eax, dword [ebp - 8]
cmp eax, 2
jb 0x402b65
mov ecx, dword [0x406990]
cmp ecx, 0x55
jae 0x40215b
shr eax, 1
and eax, 0x10
and ebx, 2
or eax, ebx
or eax, dword [ebp + 0xc]
push eax
push ecx
push 0x800f
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_PostMessageA]
jmp 0x402175
cmp eax, 0x7f
jg 0x4026d5
test edi, edi
jne 0x4026c8
mov eax, dword [0x406ca8]
lea ecx, [eax - 0x8040]
test ecx, ecx
jl 0x4026cd
lea ecx, [ebp - 0x38]
add eax, 0xffff7fc0
push ecx
push eax
push dword [0x406ccc]
push edi
call dword [sym.imp.USER32.dll_GetMenuItemRect]
test eax, eax
je 0x4026c8
call dword [sym.imp.USER32.dll_GetMessagePos]
mov edx, dword [ebp - 0x38]
movsx ecx, ax
mov eax, dword [ebp - 0x30]
add eax, edx
cdq
sub eax, edx
sar eax, 1
cmp ecx, eax
jle 0x4026c8
push 1
pop edi
mov eax, dword [0x406ca8]
or edi, 8
jmp 0x402904
test ah, 0x80
jne 0x402b65
and dword [0x406cac], 0
jmp 0x402b65
mov edx, dword [0x406cac]
cmp edx, edi
jle 0x4027ad
test ax, 0x150
je 0x4027ad
mov eax, dword [0x406ca8]
add eax, 0xffff7fc0
cmp eax, edi
jl 0x402b65
cmp eax, dword [0x406c9c]
jge 0x402b65
mov esi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push ebx
call esi
test ax, ax
jge 0x40279f
push 0x11
call esi
test ax, ax
jge 0x40279f
mov esi, dword [ebp - 8]
mov al, byte [0x406ca8]
push edi
sub al, 0x40
push dword [0x406ccc]
shr esi, 4
and esi, 1
push 0x117
push edi
mov byte [esi + 0x406c9a], al
call fcn.0040132f
push esi
push edi
push edi
push str.32768
call dword [sym.imp.USER32.dll_FindWindowA]
push eax
call dword [sym.imp.USER32.dll_InvalidateRgn]
test byte [ebp - 7], 1
je 0x402781
xor dword [0x406c98], 2
push edi
push 1
call fcn.00404c25
pop ecx
pop ecx
push 0x40
call dword [sym.imp.USER32.dll_MessageBeep]
or dword [0x406cac], 0x40
jmp 0x402b65
push edi
push edi
call fcn.00404c25
pop ecx
pop ecx
jmp 0x402b65
test ax, 0x140
je 0x40282b
cmp dword [0x4069a0], edi
mov dword [0x406c88], eax
jne 0x40281c
test cl, 4
je 0x402810
cmp edx, edi
jne 0x4027fc
cmp dword [0x406990], edi
jg 0x402810
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetLastActivePopup]
mov ecx, dword [ebp + 8]
push edi
sub ecx, eax
push 0x1e
neg ecx
sbb ecx, ecx
push 1
push dword [ebp + 8]
and ecx, 0x53
mov dword [0x406990], ecx
call dword [sym.imp.USER32.dll_SetTimer]
jmp 0x402810
jge 0x402810
cmp dword [0x406994], edi
je 0x402810
mov dword [0x406990], 0xc
or dword [0x406cac], 0xffffffff
jmp 0x402b65
mov dword [0x406cac], 0x80
jmp 0x402b65
test al, 5
je 0x402876
lea ecx, [eax + 1]
shr ecx, 1
test al, 4
mov dword [0x406c88], ecx
je 0x402b65
cmp edx, edi
mov dword [0x406cbc], edi
jne 0x402b65
push ebx
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
mov ecx, dword [0x406c98]
movzx eax, ax
shr eax, 7
and ecx, 0x100
xor eax, ecx
jne 0x4029ae
jmp 0x402b65
mov ecx, eax
and ecx, 0xa
je 0x402b65
or dword [0x406c88], 4
cmp edx, edi
jle 0x402964
shr eax, 3
and eax, 1
mov dword [0x406cac], ecx
mov edi, eax
mov eax, dword [0x406ca8]
cmp eax, 0x8040
jl 0x4028fb
test edi, edi
jne 0x402b65
lea ecx, [ebp - 0x38]
add eax, 0xffff7fc0
push ecx
push eax
push dword [0x406ccc]
push edi
call dword [sym.imp.USER32.dll_GetMenuItemRect]
test eax, eax
je 0x402b65
call dword [sym.imp.USER32.dll_GetMessagePos]
mov edx, dword [ebp - 0x30]
movsx ecx, ax
mov eax, dword [ebp - 0x38]
add eax, edx
cdq
sub eax, edx
sar eax, 1
cmp ecx, eax
jle 0x402b65
or dword [0x406cac], 8
jmp 0x402b65
cmp eax, 0x10
jne 0x402b65
cmp eax, 0x10
mov dword [ebp - 4], 0x8023
je 0x402913
mov dword [ebp - 4], eax
mov esi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 0x10
call esi
mov ebx, dword [0x406cac]
movzx eax, ax
shr eax, 0xe
or al, 0x10
or edi, eax
and ebx, 0x40
je 0x402945
push 0x11
call esi
test ax, ax
jge 0x402945
push 0xd
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x402932
call dword [sym.imp.USER32.dll_EndMenu]
test ebx, ebx
jne 0x402b65
push edi
push dword [ebp - 4]
push 0x8011
push dword [ebp + 8]
jmp 0x402322
test al, 8
je 0x402b65
mov eax, dword [0x406cbc]
cmp eax, edi
je 0x402987
cmp eax, 1
jbe 0x402b65
push edi
push eax
push 0x8012
jmp 0x40295c
push ebx
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
movzx eax, ax
shr eax, 2
lea ecx, [eax + eax]
or ecx, eax
mov eax, dword [0x406c98]
and eax, 0x6000
xor ecx, eax
mov dword [ebp - 0x10], ecx
je 0x402b65
cmp dword [0x4069a0], edi
jne 0x402b65
call dword [sym.imp.USER32.dll_GetMessagePos]
mov dword [ebp - 4], eax
movsx esi, word [ebp - 2]
movsx edi, ax
push esi
push edi
call dword [sym.imp.USER32.dll_WindowFromPoint]
mov ebx, eax
lea eax, [ebp - 0xc]
push eax
push 0x60
push 2
mov dword [ebp + 0xc], ebx
push dword [ebp - 4]
push 0
push 0x84
push ebx
call dword [sym.imp.USER32.dll_SendMessageTimeoutA]
test eax, eax
je 0x402b65
test byte [ebp - 8], 4
je 0x402a10
cmp dword [ebp - 0xc], 3
je 0x402a2c
cmp dword [ebp - 0xc], 1
jne 0x402b65
jmp 0x402a20
cmp dword [ebp - 0xc], 2
jg 0x402b39
cmp dword [ebp - 0xc], 0xffffffff
jne 0x402a2c
push 2
push ebx
call dword [sym.imp.USER32.dll_GetAncestor]
mov dword [ebp + 0xc], eax
lea eax, [ebp - 0x38]
push 0x10
push eax
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_GetClassNameA]
test byte [ebp - 8], 4
mov ebx, eax
je 0x402a72
cmp ebx, 0xd
jne 0x402b65
cmp dword [ebp - 0x38], 0x69626143
jne 0x402b65
cmp dword [ebp - 0xc], 3
mov dword [0x406cbc], 1
je 0x402b35
jmp 0x402af2
cmp ebx, 6
jne 0x402abe
cmp dword [ebp - 0x38], 0x37323323
jne 0x402ad5
cmp word [ebp - 0x34], 0x3836
jne 0x402ad5
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [0x406cb8]
cmp eax, 0x1e0
ja 0x402b65
push 0xfffffffffffffff0
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowLongA]
test eax, 0x80000
jne 0x402b41
jmp 0x402b65
cmp ebx, 9
jne 0x402ad5
cmp dword [ebp - 0x38], 0x626d6f43
jne 0x402ad5
cmp dword [ebp - 0x34], 0x6f424c6f
je 0x402b41
push 0xfffffffffffffff0
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_GetWindowLongA]
and eax, 0x90000
cmp eax, 0x80000
jle 0x402b65
test byte [ebp - 0xf], 0x40
je 0x402b65
lea eax, [ebp - 0x38]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_GetWindowRect]
push 4
call dword [sym.imp.USER32.dll_GetSystemMetrics]
mov ecx, dword [ebp - 8]
and ecx, 4
je 0x402b15
mov edx, eax
shr edx, 1
add eax, edx
sub esi, dword [ebp - 0x34]
cmp esi, eax
jg 0x402b65
test ecx, ecx
jne 0x402b2b
push dword [ebp - 4]
push dword [ebp + 0xc]
jmp 0x402980
sub edi, dword [ebp - 0x38]
add eax, 8
cmp edi, eax
jg 0x402b65
push 0
jmp 0x402b23
push 5
pop ebx
cmp dword [ebp - 0xc], ebx
jne 0x402b65
test byte [ebp - 0xf], 0x20
je 0x402b65
push ebx
push dword [ebp + 0xc]
push 0x800e
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_PostMessageA]
mov dword [0x4063f8], edi
mov dword [0x4063fc], esi
pop edi
pop esi
pop ebx
leave
ret