Function at 0x40e7f0
Capabilities:
Check for time delay via gettickcount
Get keyboard layout
Log keystrokes
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4dcb8c
push eax
mov dword fs:[0], esp
sub esp, 0x90
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
cmp word [edi], 0
je 0x40f96d
mov ebx, dword [ebp + 0xc]
mov esi, dword [0x5165ec]
mov dword [ebp - 0x38], esi
test ebx, ebx
jne 0x40e851
push 7
push str.Blind
push edi
call fcn.004ca3fb
add esp, 0xc
test eax, eax
jne 0x40e851
add edi, 0xe
mov byte [0x519dce], 1
mov dword [ebp + 8], edi
jmp 0x40e85c
mov byte [0x519dce], 0
test ebx, ebx
jne 0x40e880
push 6
push 0x4ec024
push edi
call fcn.004ca3fb
add esp, 0xc
test eax, eax
jne 0x40e880
mov dword [ebp + 0xc], 2
mov ebx, dword [ebp + 0xc]
add edi, 0xc
mov dword [ebp + 8], edi
mov eax, dword [esi + 0x5c]
mov ecx, dword [esi + 0x64]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x58], ecx
cmp eax, 1
je 0x40e899
cmp eax, 3
jne 0x40e8fe
cmp dword [0x51d180], 0
je 0x40e8d4
call fcn.004094f0
test al, al
jne 0x40e8d1
test ebx, ebx
jne 0x40e8c8
call fcn.00409550
test al, al
je 0x40e8c8
mov eax, str.Click
mov ecx, edi
call fcn.004ac420
test eax, eax
jne 0x40e8d1
mov dword [ebp + 0x10], 1
jmp 0x40e8fe
mov eax, dword [ebp + 0x10]
cmp eax, 3
jne 0x40e8e2
mov dword [ebp + 0x10], 2
jmp 0x40e8fe
xor eax, eax
mov dword [ebp + 0x10], eax
cmp dword [esi + 0x5c], eax
jge 0x40e8f4
cmp dword [esi + 0x64], eax
jge 0x40e8f4
or eax, 0xffffffff
mov dword [esi + 0x64], eax
mov dword [esi + 0x5c], 0xffffffff
xor edi, edi
mov byte [ebp - 0x1b], 0
cmp dword [ebp + 0x14], edi
je 0x40e9ac
mov edx, dword [ebp + 0x14]
push edi
push edx
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov ebx, eax
mov dword [ebp - 0x64], ebx
test ebx, ebx
je 0x40e94f
cmp ebx, dword [0x51c084]
je 0x40e94f
mov esi, dword [ebp + 0x14]
call fcn.004b0ee0
test al, al
jne 0x40e94c
mov eax, dword [0x51c084]
push 1
push ebx
push eax
call dword [sym.imp.USER32.dll_AttachThreadInput]
test eax, eax
setne byte [ebp - 0x1b]
mov edi, ebx
mov esi, dword [ebp - 0x38]
push edi
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov dword [0x519df4], eax
push eax
xor eax, eax
call fcn.00412f00
add esp, 4
push 1
mov dword [0x519df0], eax
call fcn.004127e0
mov bl, al
and byte [0x51b94d], bl
add esp, 4
cmp dword [0x51b000], 0
mov byte [ebp - 0x14], bl
je 0x40eab9
mov cl, byte [0x51aecd]
mov dl, byte [0x51aecf]
mov al, cl
not cl
and al, dl
and cl, dl
mov byte [ebp - 0xe], dl
mov byte [ebp - 0x16], cl
jmp 0x40eae4
test byte [0x51cbba], 0xc0
je 0x40eaa5
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [0x51cbb0]
cmp eax, 0x32
jae 0x40eaa5
cmp dword [ebp + 0x10], 2
je 0x40eaa5
cmp byte [0x519dce], 0
jne 0x40eaa5
cmp ebx, 2
je 0x40eaa5
cmp byte [0x51cd96], 0
je 0x40eaa5
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, dword [0x51c084]
jne 0x40eaa5
mov eax, dword [ebp + 8]
test ebx, ebx
mov ebx, 0x4ec2f4
je 0x40ea77
call fcn.00409d30
test eax, eax
setne al
test al, al
je 0x40eaa5
jmp 0x40ea30
mov edi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 0x5b
call edi
mov ecx, 0x8000
test cx, ax
jne 0x40ea52
push 0x5c
call edi
mov edx, 0x8000
test dx, ax
je 0x40eaa5
push 1
push 0x8000012f
mov dword [0x5164f4], 0
call fcn.00401930
add esp, 8
mov dword [0x5164f4], 1
jmp 0x40ea30
call fcn.00409d30
test eax, eax
je 0x40eaa5
add eax, 2
mov ebx, 0x4ec2fc
call fcn.00409d30
test eax, eax
je 0x40ea30
cmp word [eax], 0x7b
je 0x40ea30
mov ebx, 0x4ec2f4
call fcn.00409d30
test eax, eax
jne 0x40ea80
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov ecx, eax
call fcn.00412dc0
mov edi, eax
jmp 0x40e94f
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [0x51cbb0]
cmp eax, dword [0x5164ec]
jae 0x40ead9
mov al, byte [0x51cbba]
and al, bl
mov byte [ebp - 0xe], al
jmp 0x40eae0
mov byte [ebp - 0xe], 0
mov al, byte [ebp - 0xe]
mov byte [ebp - 0x16], 0
mov cl, byte [0x51b94c]
not al
and al, bl
and cl, al
mov al, byte [0x519dce]
mov byte [0x51b94c], cl
test al, al
je 0x40eb0b
not cl
and cl, bl
mov byte [ebp - 0xf], cl
mov byte [ebp - 0x13], bl
jmp 0x40eb12
mov byte [ebp - 0xf], 0
mov byte [ebp - 0x13], cl
cmp byte [esi + 0xf3], 0
je 0x40eb3b
test al, al
jne 0x40eb3b
cmp dword [ebp + 0xc], 2
je 0x40eb3b
push 2
mov bl, 0x14
call fcn.00412060
mov bl, byte [ebp - 0x14]
add esp, 4
mov dword [ebp - 0x50], eax
xor edi, edi
jmp 0x40eb40
xor edi, edi
mov dword [ebp - 0x50], edi
mov esi, dword [ebp + 0x10]
mov dword [0x51b9a0], esi
cmp esi, edi
je 0x40ebae
cmp esi, 1
jne 0x40eb63
mov eax, 0x36b0
mov dword [0x519de4], 0x1f4
jmp 0x40eb72
mov eax, 0x2ee0
mov dword [0x519de4], 0x5dc
call fcn.004d1650
mov eax, esp
mov dword [0x519dec], eax
mov eax, SysReAllocString
mov byte [0x519dd6], bl
mov dword [0x519dd8], eax
mov dword [0x519ddc], eax
mov byte [0x519dd5], 0
mov dword [0x519de8], edi
mov byte [0x519dd4], 0
mov byte [0x519dcf], 1
mov al, byte [0x51b8e0]
mov byte [ebp - 0x25], al
mov eax, dword [0x5165fc]
cmp eax, 8
je 0x40ebc5
cmp eax, 0xa
jne 0x40ec1c
cmp esi, edi
jne 0x40ec1c
cmp dword [ebp + 0x14], edi
jne 0x40ec1c
test byte [0x51f31c], 1
mov byte [ebp - 0x14], 1
jne 0x40ec22
or dword [0x51f31c], 1
push 0x4f0fc8
mov dword [ebp - 4], edi
call fcn.004a4bf0
add esp, 4
push eax
push str.__45g
call fcn.004a4b10
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x51f318], eax
mov dword [ebp - 4], 0xffffffff
jmp 0x40ec27
mov byte [ebp - 0x14], 0
jmp 0x40ec36
mov eax, dword [0x51f318]
cmp eax, edi
je 0x40ec2f
push 1
call eax
mov byte [0x51b8e0], 1
mov ecx, dword [ebp + 8]
mov byte [ebp - 0xd], 0
cmp word [ecx], di
je 0x40f5c7
cmp dword [0x51b9a0], 0
mov byte [ebp - 0x15], 0
jne 0x40ecaf
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
sub eax, dword [0x51cbec]
mov edx, dword [0x5165ec]
cmp eax, dword [edx + 0xd8]
jbe 0x40ecaf
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x9c]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x40eca8
push 1
push 0xffffffffffffffff
mov dword [0x5164f4], 0
call fcn.00401930
add esp, 8
mov dword [0x5164f4], 1
call esi
mov dword [0x51cbec], eax
mov edi, dword [ebp + 0xc]
test edi, edi
jne 0x40f4ca
mov esi, dword [ebp + 8]
movzx ecx, word [esi]
push ecx
push 0x4ec304
call fcn.004ca9cb
add esp, 8
test eax, eax
je 0x40f52b
movzx eax, word [esi]
add eax, 0xffffffdf
cmp eax, 0x5c
ja case.0x40ecec.34
movzx edx, byte [eax + 0x40f9a0]
jmp dword [edx*4 + 0x40f984]
test byte [ebp - 0x13], 3
jne case.0x40ecec.34
or byte [ebp - 0xd], 1
jmp case.0x40ecec.34
test byte [ebp - 0x13], 0x30
jne case.0x40ecec.34
or byte [ebp - 0xd], 0x10
jmp case.0x40ecec.34
test byte [ebp - 0x13], 0xc
jne case.0x40ecec.34
or byte [ebp - 0xd], 4
jmp case.0x40ecec.34
test byte [ebp - 0x13], 0xc0
jne case.0x40ecec.34
or byte [ebp - 0xd], 0x40
jmp case.0x40ecec.34
mov esi, dword [ebp + 8]
add esi, 2
push 0x7d
push esi
call fcn.004ca9cb
mov edi, eax
add esp, 8
mov dword [ebp - 0x30], edi
test edi, edi
je case.0x40ecec.34
mov eax, esi
call fcn.00409d80
mov esi, eax
mov ebx, edi
sub ebx, esi
sar ebx, 1
mov dword [ebp + 8], esi
mov dword [ebp - 0x2c], ebx
jne 0x40edfa
movzx eax, word [edi + 2]
add edi, 2
cmp eax, 0x7d
jne 0x40ed90
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], 1
jmp 0x40edf4
cmp eax, 0x20
je 0x40ed9e
cmp eax, 9
jne 0x40f4bf
mov eax, edi
call fcn.00409d80
push 4
mov esi, eax
push str.Down
push esi
call fcn.004ca3fb
add esp, 0xc
test eax, eax
je 0x40edd3
push 2
push 0x4ebda4
push esi
call fcn.004ca3fb
add esp, 0xc
test eax, eax
jne 0x40f4bf
push 0x7d
push esi
call fcn.004ca9cb
add esp, 8
mov dword [ebp - 0x30], eax
test eax, eax
je case.0x40ecec.34
sub eax, dword [ebp + 8]
mov esi, dword [ebp + 8]
sar eax, 1
mov dword [ebp - 0x2c], eax
mov ebx, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x30]
push 5
push 0x4ec248
push esi
call fcn.004ca3fb
add esp, 0xc
test eax, eax
jne 0x40ee9e
lea ecx, [ebp - 0x3c]
push ecx
mov word [edi], ax
lea edx, [ebp - 0x34]
push edx
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x1a]
push ecx
lea edx, [ebp - 0x48]
push edx
lea eax, [ebp - 0x44]
push eax
lea eax, [esi + 0xa]
call fcn.00409d80
call fcn.004109e0
mov ecx, 0x7d
mov word [edi], cx
mov ecx, dword [ebp - 0x34]
add esp, 0x18
cmp ecx, 1
jge 0x40ee79
mov eax, dword [ebp - 0x38]
movzx ecx, byte [eax + 0xef]
mov edx, dword [ebp - 0x3c]
push edx
push ecx
lea edx, [ebp - 0x48]
push edx
lea ecx, [ebp - 0x6c]
lea eax, [ebp - 0x44]
call fcn.00411610
mov eax, dword [ebp - 0x30]
add esp, 0xc
mov dword [ebp + 8], eax
jmp 0x40f5a7
mov eax, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x48]
push eax
mov eax, dword [ebp - 0x44]
push edx
mov edx, dword [ebp + 0x14]
push eax
mov eax, dword [ebp - 0x20]
push edx
mov edx, dword [ebp - 0x13]
push 0
push eax
mov eax, dword [ebp - 0x1a]
push edx
push 0
push eax
jmp 0x40f4b4
push 3
push 0x4ec320
push esi
call fcn.004ca3fb
add esp, 0xc
test eax, eax
jne 0x40eec4
mov eax, dword [ebp - 0x30]
mov dword [ebp + 0xc], 1
mov dword [ebp + 8], eax
jmp 0x40f5a7
push 4
push str.Text
push esi
call fcn.004ca3fb
add esp, 0xc
test eax, eax
jne 0x40eefa
lea eax, [esi + 8]
call fcn.00409d80
cmp eax, edi
jne 0x40f4bf
mov eax, dword [ebp - 0x30]
mov dword [ebp + 0xc], 2
mov dword [ebp + 8], eax
jmp 0x40f5a7
mov eax, dword [ebp + 8]
xor ecx, ecx
mov esi, 1
mov dword [ebp - 0x4c], ebx
mov ebx, 0x4ebd9c
mov dword [ebp - 0x20], 2
mov dword [ebp - 0x34], esi
mov word [edi], cx
call fcn.00409d30
mov ebx, eax
test ebx, ebx
je 0x40efc4
movzx edx, word [ebx]
xor eax, eax
mov word [ebx], ax
mov eax, ebx
sub eax, dword [ebp + 8]
mov dword [ebp - 0x5c], edx
sar eax, 1
mov dword [ebp - 0x4c], eax
lea eax, [ebx + 2]
call fcn.00409d80
sub edi, eax
sar edi, 1
mov dword [ebp - 0x68], eax
je 0x40efc4
push 4
mov edi, eax
push str.Down
push edi
call fcn.004ca3fb
add esp, 0xc
test eax, eax
jne 0x40efa1
push 4
add edi, 8
push str.Temp
push edi
mov dword [ebp - 0x20], eax
call fcn.004ca3fb
add esp, 0xc
test eax, eax
jne 0x40ef83
mov dword [ebp - 0x40], eax
jmp 0x40efc4
xor ecx, ecx
cmp word [edi], 0x52
sete cl
push ecx
call fcn.004cb3ba
add esp, 4
neg eax
sbb eax, eax
neg eax
inc eax
mov dword [ebp - 0x40], eax
jmp 0x40efc4
push 0x4ebda4
push edi
call fcn.004c9bad
add esp, 8
test eax, eax
jne 0x40efb8
mov dword [ebp - 0x20], esi
jmp 0x40efc4
mov esi, edi
call fcn.0040e380
mov dword [ebp - 0x34], eax
mov esi, eax
mov eax, dword [0x519df4]
lea edx, [ebp - 0x1a]
push edx
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0xd]
lea edi, [ebp - 0x54]
call fcn.00413440
add esp, 4
test ebx, ebx
je 0x40efe9
mov ax, word [ebp - 0x5c]
mov word [ebx], ax
mov edx, dword [ebp - 0x30]
mov ecx, 0x7d
mov word [edx], cx
cmp esi, 1
jl 0x40f4bf
mov bl, byte [ebp - 0x1a]
mov edi, dword [ebp - 0x54]
test bl, bl
jne 0x40f40c
test di, di
jne 0x40f40c
mov eax, 1
cmp dword [ebp - 0x4c], eax
jne 0x40f080
cmp dword [ebp - 0x20], eax
je 0x40f4bf
cmp dword [ebp + 0x14], 0
je 0x40f05b
test esi, esi
jle 0x40f4bf
mov edi, dword [ebp + 8]
movzx eax, word [edi]
mov ecx, dword [ebp + 0x14]
push 0
push eax
push 0x102
push ecx
call dword [sym.imp.USER32.dll_PostMessageW]
dec esi
jne 0x40f038
mov eax, dword [ebp - 0x30]
mov dword [ebp + 8], eax
jmp 0x40f5a7
mov dl, byte [ebp - 0xd]
or dl, byte [ebp - 0x13]
mov ecx, esi
movzx eax, dl
mov edx, dword [ebp + 8]
push eax
mov ax, word [edx]
call fcn.0040fdd0
mov eax, dword [ebp - 0x30]
add esp, 4
mov dword [ebp + 8], eax
jmp 0x40f5a7
cmp dword [ebp + 0x14], 0
mov esi, dword [ebp - 0x2c]
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x13]
push eax
lea ecx, [ebp - 0x20]
sete bl
push ecx
call fcn.004134f0
add esp, 8
mov byte [ebp - 0x1a], al
test al, al
je 0x40f281
mov edi, dword [ebp + 0x14]
test edi, edi
jne 0x40f0be
cmp dword [ebp - 0x20], edi
jne 0x40f0b9
mov byte [ebp - 0x15], al
jmp 0x40f0be
call fcn.0040e570
cmp dword [0x51b9a0], 0
je 0x40f0d2
mov bl, byte [0x519dd6]
jmp 0x40f1c4
cmp dword [0x51b000], 0
je 0x40f0e6
mov bl, byte [0x51aecd]
jmp 0x40f1c4
mov esi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 0xa0
xor bl, bl
call esi
mov edx, 0x8000
test dx, ax
je 0x40f101
mov bl, 0x10
push 0xa1
call esi
mov ecx, 0x8000
test cx, ax
je 0x40f115
or bl, 0x20
push 0xa2
call esi
mov edx, 0x8000
test dx, ax
je 0x40f129
or bl, 1
push 0xa3
call esi
mov ecx, 0x8000
test cx, ax
je 0x40f13d
or bl, 2
push 0xa4
call esi
mov edx, 0x8000
test dx, ax
je 0x40f151
or bl, 4
push 0xa5
call esi
mov ecx, 0x8000
test cx, ax
je 0x40f165
or bl, 8
push 0x5b
call esi
mov edx, 0x8000
test dx, ax
je 0x40f176
or bl, 0x40
push 0x5c
call esi
mov ecx, 0x8000
test cx, ax
je 0x40f187
or bl, 0x80
cmp dword [0x51b000], 0
je 0x40f1c4
mov al, bl
not al
and al, byte [0x51aecd]
je 0x40f1c4
mov cl, byte [0x51aecf]
not al
and byte [0x51aecd], al
and byte [0x51aece], al
and cl, al
mov al, cl
mov byte [0x51aecf], cl
mov ecx, 0x51aef0
call fcn.004128e0
mov edx, dword [ebp - 0x13]
push 0
push 0
push edi
push ebx
push edx
mov eax, 0xffc3d44d
call fcn.00412170
mov eax, dword [ebp - 0x34]
add esp, 0x14
test eax, eax
jle 0x40f4bf
mov ebx, dword [ebp - 0x1a]
mov edi, eax
jmp 0x40f1f0
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x20]
push 0xffc3d44d
push 1
push eax
push 0
push ebx
push ecx
call fcn.004102e0
add esp, 0x18
cmp dword [0x51b9a0], 0
jne 0x40f26f
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
sub eax, dword [0x51cbec]
mov edx, dword [0x5165ec]
cmp eax, dword [edx + 0xd8]
jbe 0x40f26f
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x9c]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x40f268
push 1
push 0xffffffffffffffff
mov dword [0x5164f4], 0
call fcn.00401930
add esp, 8
mov dword [0x5164f4], 1
call esi
mov dword [0x51cbec], eax
dec edi
jne 0x40f1f0
mov eax, dword [ebp - 0x30]
mov dword [ebp + 8], eax
jmp 0x40f5a7
mov edi, dword [ebp - 0x2c]
mov esi, dword [ebp + 8]
cmp edi, 4
jbe 0x40f2ef
push 4
push str.ASC
push esi
call fcn.004ca3fb
mov ebx, dword [ebp + 0x14]
add esp, 0xc
test eax, eax
jne 0x40f2f2
test ebx, ebx
jne 0x40f2f2
lea eax, [esi + 6]
call fcn.00409d80
call fcn.0040fee0
cmp dword [0x51b9a0], 2
jne 0x40f2d6
mov ecx, dword [0x5165ec]
mov esi, dword [ecx + 0x60]
call fcn.00411d80
mov eax, dword [ebp - 0x30]
mov dword [ebp + 8], eax
jmp 0x40f5a7
mov edx, dword [0x5165ec]
mov esi, dword [edx + 0x5c]
call fcn.00411d80
mov eax, dword [ebp - 0x30]
mov dword [ebp + 8], eax
jmp 0x40f5a7
mov ebx, dword [ebp + 0x14]
cmp edi, 2
jbe 0x40f4bf
push 2
push 0x4ec34c
push esi
call fcn.004ca3fb
add esp, 0xc
test eax, eax
jne 0x40f4bf
push 0x10
push eax
add esi, 4
push esi
call fcn.004cb270
add esp, 0xc
cmp eax, 0x10000
jb 0x40f355
sub eax, 0x10000
mov ecx, eax
shr ecx, 0xa
and ecx, 0x3ff
mov edx, eax
sub ecx, 0x2800
and edx, 0x3ff
sub edx, 0x2400
movzx edi, cx
movzx esi, dx
jmp 0x40f35a
movzx edi, ax
xor esi, esi
test ebx, ebx
je 0x40f387
movzx eax, di
mov edi, dword [sym.imp.USER32.dll_PostMessageW]
push 0
push eax
push 0x102
push ebx
call edi
test si, si
je 0x40f3d2
push 0
movzx ecx, si
push ecx
push 0x102
push ebx
call edi
jmp 0x40f3d2
cmp dword [0x51b9a0], 2
je 0x40f3b2
movzx ebx, byte [ebp - 0xd]
or bl, byte [ebp - 0x13]
push ebx
call fcn.0040e5f0
add esp, 4
test si, si
je 0x40f3d2
push ebx
mov edi, esi
call fcn.0040e5f0
add esp, 4
jmp 0x40f3d2
push 0xa
lea ecx, [ebp - 0x7e]
push ecx
mov edx, 0x30
push eax
mov word [ebp - 0x80], dx
call fcn.004c98e5
add esp, 0xc
lea eax, [ebp - 0x80]
call fcn.0040fee0
cmp dword [0x51b9a0], 2
jne 0x40f3f4
mov edx, dword [0x5165ec]
mov esi, dword [edx + 0x60]
call fcn.00411d80
mov eax, dword [ebp - 0x30]
mov dword [ebp + 8], eax
jmp 0x40f5a7
mov eax, dword [0x5165ec]
mov esi, dword [eax + 0x5c]
call fcn.00411d80
mov eax, dword [ebp - 0x30]
mov dword [ebp + 8], eax
jmp 0x40f5a7
xor ecx, ecx
mov edx, edi
mov al, bl
call fcn.004129b0
mov byte [ebp - 0x24], al
test al, al
je 0x40f491
cmp dword [ebp + 0x14], 0
jne 0x40f491
mov ecx, dword [ebp - 0x20]
test ecx, ecx
jne 0x40f451
mov ecx, dword [ebp - 0x40]
mov byte [ebp - 0x15], bl
cmp ecx, 1
jne 0x40f441
or byte [0x51b94c], al
or byte [ebp - 0x13], al
jmp 0x40f491
cmp ecx, 2
jne 0x40f44c
or byte [0x51b94d], al
or byte [ebp - 0x13], al
jmp 0x40f491
cmp ecx, 1
jne 0x40f491
mov al, bl
call fcn.0040e570
mov al, byte [ebp - 0x24]
mov cl, byte [0x51b94c]
not al
and byte [0x51b94d], al
and byte [ebp - 0xf], al
and cl, al
mov byte [0x51b94c], cl
cmp bl, 0xa5
jne 0x40f48b
cmp dword [0x519df0], 3
jne 0x40f48b
and byte [ebp - 0xf], 0xfe
or cl, byte [ebp - 0xf]
mov byte [ebp - 0x13], cl
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
push 0
push SysReAllocString
push SysReAllocString
push ecx
mov ecx, dword [ebp - 0x13]
push edx
mov edx, dword [ebp - 0x1a]
push eax
push ecx
push edi
push edx
mov ecx, esi
mov al, byte [ebp - 0xd]
call fcn.0040fa20
add esp, 0x24
mov eax, dword [ebp - 0x30]
mov dword [ebp + 8], eax
jmp 0x40f5a7
cmp edi, 2
jne 0x40f52b
mov ecx, dword [ebp + 8]
movzx eax, word [ecx]
add eax, 0xfffffff8
cmp eax, 5
ja case.0x40f4dd.11
jmp dword [eax*4 + 0x40fa00]
cmp word [ecx + 2], 0xa
jne case.0x40f4dd.10
add ecx, 2
mov dword [ebp + 8], ecx
mov byte [ebp - 0x1a], 0xd
jmp 0x40f55d
mov byte [ebp - 0x1a], 8
jmp 0x40f55d
mov byte [ebp - 0x1a], 9
jmp 0x40f55d
mov byte [ebp - 0x1a], 0
mov ecx, dword [ebp + 0x14]
mov al, byte [ebp - 0xd]
test ecx, ecx
je 0x40f58d
mov eax, dword [ebp + 8]
movzx edx, word [eax]
push 0
push edx
push 0x102
push ecx
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x40f5a7
mov al, byte [ebp - 0xd]
or al, byte [ebp - 0x13]
je 0x40f53b
test edi, edi
jne 0x40f53b
mov al, 1
jmp 0x40f53d
xor al, al
mov ecx, dword [0x519df4]
mov edx, dword [ebp + 8]
mov si, word [edx]
push eax
push ecx
lea edi, [ebp - 0xd]
call fcn.00413380
add esp, 8
mov byte [ebp - 0x1a], al
test al, al
je 0x40f507
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x13]
mov edx, dword [ebp - 0x1a]
push 0
push SysReAllocString
push SysReAllocString
push eax
mov al, byte [ebp - 0xd]
push 0
push 2
push ecx
push 0
push edx
mov ecx, 1
call fcn.0040fa20
add esp, 0x24
jmp 0x40f5a7
or al, byte [ebp - 0x13]
mov edx, dword [ebp + 8]
movzx eax, al
push eax
mov ax, word [edx]
mov ecx, 1
call fcn.0040fdd0
add esp, 4
mov byte [ebp - 0xd], 0
mov eax, dword [ebp + 8]
mov cl, byte [ebp - 0x15]
add eax, 2
cmp word [eax], 0
mov dword [ebp + 8], eax
mov byte [0x51b927], cl
jne 0x40ec46
cmp dword [0x51b9a0], 0
je 0x40f67e
cmp byte [0x519dd4], 0
mov dword [ebp - 0x24], 0xffffffff
jne 0x40f63e
cmp dword [0x519de8], 0
jbe 0x40f63e
cmp byte [0x519dce], 0
je 0x40f5fa
xor eax, eax
jmp 0x40f606
movzx eax, byte [ebp - 0x16]
movzx edx, byte [ebp - 0xe]
not eax
and eax, edx
or al, byte [0x51b94d]
push 1
or al, byte [ebp - 0x13]
push 1
mov byte [ebp + 8], al
movzx eax, byte [0x519dd6]
mov esi, dword [ebp + 8]
push 0
push eax
push esi
mov eax, 0xffc3d44d
call fcn.00412170
add esp, 0x14
lea ecx, [ebp - 0x24]
push esi
push ecx
call fcn.00411c30
add esp, 8
mov eax, dword [0x51b9a0]
dec eax
neg eax
sbb eax, eax
and eax, 0x3e8
add eax, 0x1f4
cmp dword [0x519de4], eax
jbe 0x40f669
mov edx, dword [0x519dec]
push edx
call fcn.004ca991
add esp, 4
mov esi, dword [ebp - 0x24]
xor edi, edi
mov dword [0x51b9a0], edi
call fcn.00411d80
jmp 0x40f7fe
cmp dword [0x51b000], 0
je 0x40f68f
mov cl, byte [0x51aecf]
jmp 0x40f6b3
cmp dword [0x5164ec], 0
jl 0x40f6b0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [0x51cbb0]
cmp eax, dword [0x5164ec]
jb 0x40f6b0
xor cl, cl
jmp 0x40f6b3
mov cl, byte [ebp - 0xe]
or cl, byte [0x51b94d]
cmp byte [0x519dce], 0
je 0x40f6db
mov dl, byte [ebp - 0xe]
mov al, cl
xor al, dl
mov bl, al
and bl, dl
not bl
and bl, byte [ebp - 0x13]
and al, cl
or bl, al
mov byte [ebp + 8], bl
jmp 0x40f6e8
mov al, byte [ebp - 0x16]
not al
and al, cl
or al, byte [ebp - 0x13]
mov byte [ebp + 8], al
cmp dword [0x51b000], 0
je 0x40f6fe
mov al, byte [0x51aecd]
mov byte [ebp - 0x24], al
jmp 0x40f7df
mov esi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 0xa0
xor bl, bl
call esi
mov ecx, 0x8000
test cx, ax
je 0x40f719
mov bl, 0x10
push 0xa1
call esi
mov edx, 0x8000
test dx, ax
je 0x40f72d
or bl, 0x20
push 0xa2
call esi
mov ecx, 0x8000
test cx, ax
je 0x40f741
or bl, 1
push 0xa3
call esi
mov edx, 0x8000
test dx, ax
je 0x40f755
or bl, 2
push 0xa4
call esi
mov ecx, 0x8000
test cx, ax
je 0x40f769
or bl, 4
push 0xa5
call esi
mov edx, 0x8000
test dx, ax
je 0x40f77d
or bl, 8
push 0x5b
call esi
mov ecx, 0x8000
test cx, ax
je 0x40f78e
or bl, 0x40
push 0x5c
call esi
mov edx, 0x8000
test dx, ax
je 0x40f79f
or bl, 0x80
cmp dword [0x51b000], 0
je 0x40f7dc
mov al, bl
not al
and al, byte [0x51aecd]
je 0x40f7dc
mov cl, byte [0x51aecf]
not al
and byte [0x51aecd], al
and byte [0x51aece], al
and cl, al
mov al, cl
mov byte [0x51aecf], cl
mov ecx, 0x51aef0
call fcn.004128e0
mov byte [ebp - 0x24], bl
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp + 8]
push 1
push 1
push eax
push ecx
push edx
mov eax, 0xffc3d44d
call fcn.00412170
add esp, 0x14
xor edi, edi
cmp dword [0x51b000], edi
je 0x40f81e
mov al, byte [0x51aece]
mov cl, al
xor cl, byte [0x51aecd]
and cl, al
not cl
and al, cl
mov byte [0x51aece], al
mov ebx, 1
cmp dword [ebp - 0x50], ebx
jne 0x40f8ad
mov esi, dword [sym.imp.USER32.dll_GetKeyState]
push 0x14
call esi
and al, bl
movsx eax, al
neg eax
sbb eax, eax
add eax, 2
cmp eax, ebx
je 0x40f8ad
push 0x14
call esi
mov edx, 0x8000
test dx, ax
je 0x40f867
push 0xffc3d44d
push edi
push edi
push edi
push 0x14
push ebx
call fcn.004102e0
add esp, 0x18
push 0xffc3d44d
push edi
push edi
push edi
push 0x14
push 2
call fcn.004102e0
add esp, 0x18
push edi
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
cmp eax, dword [0x51c084]
sete al
test al, al
je 0x40f8ad
push ebx
push 0xffffffffffffffff
mov dword [0x5164f4], edi
call fcn.00401930
add esp, 8
mov dword [0x5164f4], ebx
cmp byte [ebp - 0x1b], 0
je 0x40f8c5
mov eax, dword [ebp - 0x64]
mov ecx, dword [0x51c084]
push edi
push eax
push ecx
call dword [sym.imp.USER32.dll_AttachThreadInput]
cmp byte [ebp - 0x14], 0
je 0x40f92c
cmp byte [ebp - 0x25], 0
jne 0x40f92c
test byte [0x51f31c], bl
jne 0x40f919
or dword [0x51f31c], ebx
push 0x4f0fc8
mov dword [ebp - 4], ebx
call fcn.004a4bf0
add esp, 4
push eax
push str.__45g
call fcn.004a4b10
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x51f318], eax
mov dword [ebp - 4], 0xffffffff
jmp 0x40f91e
mov eax, dword [0x51f318]
cmp eax, edi
je 0x40f925
push edi
call eax
mov byte [0x51b8e0], 0
cmp dword [ebp + 0x10], ebx
jne 0x40f95e
push edi
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
cmp eax, dword [0x51c084]
jne 0x40f95e
push ebx
push 0xffffffffffffffff
mov dword [0x5164f4], edi
call fcn.00401930
add esp, 8
mov dword [0x5164f4], ebx
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x58]
mov dword [eax + 0x5c], edx
mov dword [eax + 0x64], ecx
lea esp, [ebp - 0xa8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret