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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xbc
push ebx
mov ebx, dword [ebp + 8]
cmp word [ebx], 0
push esi
push edi
je 0x410206
mov edi, dword [ebp + 0xc]
mov esi, dword [0x4c6a44]
mov dword [ebp - 0x28], esi
test edi, edi
jne 0x40f13c
push 7
push 0x4a6e2c
push ebx
call fcn.0048ffb7
add esp, 0xc
test eax, eax
jne 0x40f13c
add ebx, 0xe
mov byte [0x4c947b], 1
mov dword [ebp + 8], ebx
jmp 0x40f147
mov byte [0x4c947b], 0
test edi, edi
jne 0x40f16b
push 6
push 0x4a698c
push ebx
call fcn.0048ffb7
add esp, 0xc
test eax, eax
jne 0x40f16b
mov dword [ebp + 0xc], 2
mov edi, dword [ebp + 0xc]
add ebx, 0xc
mov dword [ebp + 8], ebx
mov ebx, dword [ebp + 0x10]
mov eax, dword [esi + 0x5c]
mov ecx, dword [esi + 0x64]
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x4c], ecx
cmp ebx, 1
je 0x40f184
cmp ebx, 3
jne 0x40f1de
call fcn.00408fc0
test al, al
jne 0x40f1b4
test edi, edi
jne 0x40f1ab
call fcn.00409030
test al, al
je 0x40f1ab
mov ecx, dword [ebp + 8]
mov eax, 0x4a6e3c
call fcn.00476270
test eax, eax
jne 0x40f1b4
mov dword [ebp + 0x10], 1
jmp 0x40f1de
cmp ebx, 3
jne 0x40f1c2
mov dword [ebp + 0x10], 2
jmp 0x40f1de
xor eax, eax
mov dword [ebp + 0x10], eax
cmp dword [esi + 0x5c], eax
jge 0x40f1d4
cmp dword [esi + 0x64], eax
jge 0x40f1d4
or eax, 0xffffffff
mov dword [esi + 0x64], eax
mov dword [esi + 0x5c], 0xffffffff
xor ebx, ebx
mov byte [ebp - 0xf], 0
cmp dword [ebp + 0x14], ebx
je 0x40f28c
mov edx, dword [ebp + 0x14]
push ebx
push edx
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov edi, eax
mov dword [ebp - 0x58], edi
test edi, edi
je 0x40f22f
cmp edi, dword [0x4cb4ec]
je 0x40f22f
mov esi, dword [ebp + 0x14]
call fcn.0047ae50
test al, al
jne 0x40f22c
mov eax, dword [0x4cb4ec]
push 1
push edi
push eax
call dword [sym.imp.USER32.dll_AttachThreadInput]
test eax, eax
setne byte [ebp - 0xf]
mov ebx, edi
mov esi, dword [ebp - 0x28]
push ebx
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov dword [0x4c94a0], eax
push eax
xor eax, eax
call fcn.004137d0
add esp, 4
push 1
mov dword [0x4c949c], eax
call fcn.00413100
mov bl, al
and byte [0x4cadbf], bl
add esp, 4
cmp dword [0x4ca694], 0
mov byte [ebp - 8], bl
je 0x40f3cb
mov cl, byte [0x4ca561]
mov dl, byte [0x4ca563]
mov al, cl
not cl
and al, dl
and cl, dl
mov byte [ebp - 2], dl
mov byte [ebp - 0xa], cl
jmp 0x40f3f6
test byte [0x4cbfe6], 0xc0
je 0x40f375
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [0x4cbfdc]
cmp eax, 0x32
jae 0x40f375
cmp dword [ebp + 0x10], 2
je 0x40f375
cmp byte [0x4c947b], bl
jne 0x40f375
cmp edi, 2
je 0x40f375
cmp byte [0x4cc1c6], bl
je 0x40f375
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, dword [0x4cb4ec]
jne 0x40f375
mov eax, dword [ebp + 8]
mov ebx, 0x4a6e4c
call fcn.00409770
test edi, edi
je 0x40f34c
test eax, eax
setne al
test al, al
je 0x40f375
mov edi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 0x5b
call edi
mov ecx, 0x8000
test cx, ax
jne 0x40f327
push 0x5c
call edi
mov edx, 0x8000
test dx, ax
je 0x40f375
push 1
push 0x8000012f
mov dword [0x4c694c], 0
call fcn.004013d0
add esp, 8
mov dword [0x4c694c], 1
jmp 0x40f305
test eax, eax
je 0x40f375
add eax, 2
mov ebx, 0x4a6e54
call fcn.00409770
test eax, eax
je 0x40f305
cmp word [eax], 0x7b
je 0x40f305
mov ebx, 0x4a6e4c
call fcn.00409770
test eax, eax
jne 0x40f350
call dword [sym.imp.USER32.dll_GetForegroundWindow]
xor ebx, ebx
test eax, eax
je 0x40f22f
mov edi, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
push ebx
push eax
call edi
mov ebx, eax
lea eax, [ebp - 0xbc]
push eax
push ebx
mov dword [ebp - 0xbc], 0x30
call dword [sym.imp.USER32.dll_GetGUIThreadInfo]
test eax, eax
je 0x40f22f
mov eax, dword [ebp - 0xb0]
test eax, eax
je 0x40f22f
push 0
push eax
call edi
mov ebx, eax
jmp 0x40f22f
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [0x4cbfdc]
cmp eax, dword [0x4c6944]
jae 0x40f3eb
mov al, byte [0x4cbfe6]
and al, bl
mov byte [ebp - 2], al
jmp 0x40f3f2
mov byte [ebp - 2], 0
mov al, byte [ebp - 2]
mov byte [ebp - 0xa], 0
mov cl, byte [0x4cadbe]
not al
and al, bl
and cl, al
mov al, byte [0x4c947b]
mov byte [0x4cadbe], cl
test al, al
je 0x40f41d
not cl
and cl, bl
mov byte [ebp - 3], cl
mov byte [ebp - 7], bl
jmp 0x40f424
mov byte [ebp - 3], 0
mov byte [ebp - 7], cl
cmp byte [esi + 0xf3], 0
je 0x40f44b
test al, al
jne 0x40f44b
cmp dword [ebp + 0xc], 2
je 0x40f44b
push 2
mov bl, 0x14
call fcn.00412940
mov bl, byte [ebp - 8]
add esp, 4
mov dword [ebp - 0x44], eax
jmp 0x40f452
mov dword [ebp - 0x44], 0
mov esi, dword [ebp + 0x10]
mov dword [0x4cade4], esi
test esi, esi
je 0x40f4c4
cmp esi, 1
jne 0x40f475
mov eax, 0x36b0
mov dword [0x4c9490], 0x1f4
jmp 0x40f484
mov eax, 0x2ee0
mov dword [0x4c9490], 0x5dc
call fcn.00496d80
mov eax, esp
mov dword [0x4c9498], eax
mov eax, SysReAllocString
mov byte [0x4c9483], bl
mov dword [0x4c9484], eax
mov dword [0x4c9488], eax
mov byte [0x4c9482], 0
mov dword [0x4c9494], 0
mov byte [0x4c9481], 0
mov byte [0x4c9480], 1
mov eax, dword [0x4c6a54]
mov cl, byte [0x4cad76]
mov byte [ebp - 0x19], cl
cmp eax, 8
je 0x40f4e0
cmp eax, 0xa
jne 0x40f5cd
test esi, esi
jne 0x40f5cd
cmp dword [ebp + 0x14], esi
jne 0x40f5cd
push 1
mov byte [ebp - 8], 1
call dword [sym.imp.USER32.dll_BlockInput]
mov byte [0x4cad76], 1
mov edx, dword [ebp + 8]
cmp word [edx], 0
mov byte [ebp - 1], 0
je 0x40fe99
jmp 0x40f520
cmp dword [0x4cade4], 0
mov byte [ebp - 9], 0
jne 0x40f589
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
sub eax, dword [0x4cc01c]
mov ecx, dword [0x4c6a44]
cmp eax, dword [ecx + 0xd8]
jbe 0x40f589
push 0
push 0
push 0
push 0
lea edx, [ebp - 0x8c]
push edx
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x40f582
push 1
push 0xffffffffffffffff
mov dword [0x4c694c], 0
call fcn.004013d0
add esp, 8
mov dword [0x4c694c], 1
call esi
mov dword [0x4cc01c], eax
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
test esi, esi
jne 0x40fda3
movzx eax, word [edi]
push eax
push 0x4a6e5c
call fcn.00490591
add esp, 8
test eax, eax
je 0x40fe02
movzx eax, word [edi]
add eax, 0xffffffdf
cmp eax, 0x5c
ja case.0x40f5c6.34
movzx ecx, byte [eax + 0x410230]
jmp dword [ecx*4 + 0x410214]
mov byte [ebp - 8], 0
jmp 0x40f504
test byte [ebp - 7], 3
jne case.0x40f5c6.34
or byte [ebp - 1], 1
jmp case.0x40f5c6.34
test byte [ebp - 7], 0x30
jne case.0x40f5c6.34
or byte [ebp - 1], 0x10
jmp case.0x40f5c6.34
test byte [ebp - 7], 0xc
jne case.0x40f5c6.34
or byte [ebp - 1], 4
jmp case.0x40f5c6.34
test byte [ebp - 7], 0xc0
jne case.0x40f5c6.34
or byte [ebp - 1], 0x40
jmp case.0x40f5c6.34
mov esi, dword [ebp + 8]
add esi, 2
push 0x7d
push esi
call fcn.00490591
mov edi, eax
add esp, 8
mov dword [ebp - 0x24], edi
test edi, edi
je case.0x40f5c6.34
mov eax, esi
call fcn.004097c0
mov esi, eax
mov ebx, edi
sub ebx, esi
sar ebx, 1
mov dword [ebp + 8], esi
mov dword [ebp - 0x20], ebx
jne 0x40f6dd
movzx eax, word [edi + 2]
add edi, 2
cmp eax, 0x7d
jne 0x40f673
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], 1
jmp 0x40f6d7
cmp eax, 0x20
je 0x40f681
cmp eax, 9
jne 0x40fd98
mov eax, edi
call fcn.004097c0
push 4
mov esi, eax
push 0x4a3e20
push esi
call fcn.0048ffb7
add esp, 0xc
test eax, eax
je 0x40f6b6
push 2
push 0x4a3e2c
push esi
call fcn.0048ffb7
add esp, 0xc
test eax, eax
jne 0x40fd98
push 0x7d
push esi
call fcn.00490591
add esp, 8
mov dword [ebp - 0x24], eax
test eax, eax
je case.0x40f5c6.34
sub eax, dword [ebp + 8]
mov esi, dword [ebp + 8]
sar eax, 1
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x24]
push 5
push 0x4a5870
push esi
call fcn.0048ffb7
add esp, 0xc
test eax, eax
jne 0x40f783
xor edx, edx
lea eax, [ebp - 0x2c]
push eax
mov word [edi], dx
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x18]
push edx
lea eax, [ebp - 0xe]
push eax
lea ecx, [ebp - 0x40]
push ecx
lea edx, [ebp - 0x38]
push edx
lea eax, [esi + 0xa]
call fcn.004097c0
call fcn.00411310
mov ecx, dword [ebp - 0x14]
add esp, 0x18
mov eax, 0x7d
mov word [edi], ax
cmp ecx, 1
jge 0x40f75e
mov edx, dword [ebp - 0x28]
movzx eax, byte [edx + 0xef]
mov ecx, dword [ebp - 0x2c]
push ecx
push eax
lea ecx, [ebp - 0x40]
push ecx
lea ecx, [ebp - 0x60]
lea eax, [ebp - 0x38]
call fcn.00411ef0
mov ecx, dword [ebp - 0x24]
add esp, 0xc
mov dword [ebp + 8], ecx
jmp 0x40fe79
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x40]
push edx
mov edx, dword [ebp - 0x38]
push eax
mov eax, dword [ebp + 0x14]
push edx
mov edx, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 7]
push 0
push edx
mov edx, dword [ebp - 0xe]
push eax
push 0
push edx
jmp 0x40fd8d
push 3
push 0x4a6e6c
push esi
call fcn.0048ffb7
add esp, 0xc
test eax, eax
jne 0x40f7a9
mov ecx, dword [ebp - 0x24]
mov dword [ebp + 0xc], 1
mov dword [ebp + 8], ecx
jmp 0x40fe79
push 4
push 0x4a6dbc
push esi
call fcn.0048ffb7
add esp, 0xc
test eax, eax
jne 0x40f7df
lea eax, [esi + 8]
call fcn.004097c0
cmp eax, edi
jne 0x40fd98
mov ecx, dword [ebp - 0x24]
mov dword [ebp + 0xc], 2
mov dword [ebp + 8], ecx
jmp 0x40fe79
xor eax, eax
mov word [edi], ax
mov eax, dword [ebp + 8]
mov esi, 1
mov dword [ebp - 0x30], ebx
mov ebx, 0x4a677c
mov dword [ebp - 0x18], 2
mov dword [ebp - 0x14], esi
call fcn.00409770
mov ebx, eax
test ebx, ebx
je 0x40f8ab
sub eax, dword [ebp + 8]
movzx ecx, word [ebx]
sar eax, 1
xor edx, edx
mov dword [ebp - 0x30], eax
lea eax, [ebx + 2]
mov dword [ebp - 0x48], ecx
mov word [ebx], dx
call fcn.004097c0
sub edi, eax
sar edi, 1
mov dword [ebp - 0x50], eax
je 0x40f8ab
push 4
mov edi, eax
push 0x4a3e20
push edi
call fcn.0048ffb7
add esp, 0xc
test eax, eax
jne 0x40f888
push 4
add edi, 8
push 0x4a6e74
push edi
mov dword [ebp - 0x18], eax
call fcn.0048ffb7
add esp, 0xc
test eax, eax
jne 0x40f86a
mov dword [ebp - 0x34], eax
jmp 0x40f8ab
xor eax, eax
cmp word [edi], 0x52
sete al
push eax
call fcn.00491059
add esp, 4
neg eax
sbb eax, eax
neg eax
inc eax
mov dword [ebp - 0x34], eax
jmp 0x40f8ab
push 0x4a3e2c
push edi
call fcn.0048f769
add esp, 8
test eax, eax
jne 0x40f89f
mov dword [ebp - 0x18], esi
jmp 0x40f8ab
mov esi, edi
call fcn.0040eb60
mov dword [ebp - 0x14], eax
mov esi, eax
mov eax, dword [0x4c94a0]
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0xe]
push ecx
lea ecx, [ebp - 1]
lea edi, [ebp - 0x5c]
call fcn.00413d40
add esp, 4
test ebx, ebx
je 0x40f8d0
mov dx, word [ebp - 0x48]
mov word [ebx], dx
mov ecx, dword [ebp - 0x24]
mov eax, 0x7d
mov word [ecx], ax
cmp esi, 1
jl 0x40fd98
mov bl, byte [ebp - 0xe]
mov edi, dword [ebp - 0x5c]
test bl, bl
jne 0x40fce1
test di, di
jne 0x40fce1
mov eax, 1
cmp dword [ebp - 0x30], eax
jne 0x40f968
cmp dword [ebp - 0x18], eax
je 0x40fd98
cmp dword [ebp + 0x14], 0
je 0x40f943
test esi, esi
jle 0x40fd98
mov edi, dword [ebp + 8]
nop
movzx edx, word [edi]
mov eax, dword [ebp + 0x14]
push 0
push edx
push 0x102
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
dec esi
jne 0x40f920
mov ecx, dword [ebp - 0x24]
mov dword [ebp + 8], ecx
jmp 0x40fe79
mov cl, byte [ebp - 1]
or cl, byte [ebp - 7]
mov eax, dword [ebp + 8]
mov ax, word [eax]
movzx edx, cl
push edx
mov ecx, esi
call fcn.004106c0
mov ecx, dword [ebp - 0x24]
add esp, 4
mov dword [ebp + 8], ecx
jmp 0x40fe79
cmp dword [ebp + 0x14], 0
mov esi, dword [ebp - 0x20]
mov edi, dword [ebp + 8]
lea ecx, [ebp - 7]
push ecx
lea edx, [ebp - 0x18]
sete bl
push edx
call fcn.00413df0
add esp, 8
mov byte [ebp - 0xe], al
test al, al
je 0x40fb91
mov edi, dword [ebp + 0x14]
test edi, edi
jne 0x40f9a6
cmp dword [ebp - 0x18], edi
jne 0x40f9a1
mov byte [ebp - 9], al
jmp 0x40f9a6
call fcn.0040ed30
cmp dword [0x4cade4], 0
je 0x40f9b9
mov al, byte [0x4c9483]
jmp 0x40fad4
cmp dword [0x4ca694], 0
je 0x40f9cc
mov al, byte [0x4ca561]
jmp 0x40fad4
mov esi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 0xa0
mov byte [ebp + 0xb], 0
call esi
mov ecx, 0x8000
test cx, ax
je 0x40f9eb
mov byte [ebp + 0xb], 0x10
push 0xa1
call esi
mov edx, 0x8000
test dx, ax
je 0x40fa00
or byte [ebp + 0xb], 0x20
push 0xa2
call esi
mov ecx, 0x8000
test cx, ax
je 0x40fa15
or byte [ebp + 0xb], 1
push 0xa3
call esi
mov edx, 0x8000
test dx, ax
je 0x40fa2a
or byte [ebp + 0xb], 2
push 0xa4
call esi
mov ecx, 0x8000
test cx, ax
je 0x40fa3f
or byte [ebp + 0xb], 4
push 0xa5
call esi
mov edx, 0x8000
test dx, ax
je 0x40fa54
or byte [ebp + 0xb], 8
push 0x5b
call esi
mov ecx, 0x8000
test cx, ax
je 0x40fa66
or byte [ebp + 0xb], 0x40
push 0x5c
call esi
mov edx, 0x8000
test dx, ax
je 0x40fa78
or byte [ebp + 0xb], 0x80
cmp dword [0x4ca694], 0
je 0x40fad0
mov bl, byte [ebp + 0xb]
not bl
and bl, byte [0x4ca561]
je 0x40fad0
mov cl, byte [0x4ca563]
mov al, bl
not al
and byte [0x4ca561], al
and byte [0x4ca562], al
and cl, al
mov al, cl
mov byte [0x4ca563], cl
mov ecx, 0x4ca588
call fcn.00413230
mov eax, dword [0x4c9474]
test eax, eax
je 0x40fad0
test byte [eax + 8], bl
je 0x40fad0
mov dword [0x4c9474], 0
movzx eax, byte [ebp + 0xb]
push 0
push 0
push edi
push eax
mov eax, dword [ebp - 7]
push eax
mov eax, 0xffc3d44d
call fcn.00412a50
mov eax, dword [ebp - 0x14]
add esp, 0x14
test eax, eax
jle 0x40fd98
mov ebx, dword [ebp - 0xe]
mov edi, eax
jmp 0x40fb00
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0x18]
push 0xffc3d44d
push 1
push ecx
push 0
push ebx
push edx
call fcn.00410c00
add esp, 0x18
cmp dword [0x4cade4], 0
jne 0x40fb7f
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
sub eax, dword [0x4cc01c]
mov ecx, dword [0x4c6a44]
cmp eax, dword [ecx + 0xd8]
jbe 0x40fb7f
push 0
push 0
push 0
push 0
lea edx, [ebp - 0x8c]
push edx
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x40fb78
push 1
push 0xffffffffffffffff
mov dword [0x4c694c], 0
call fcn.004013d0
add esp, 8
mov dword [0x4c694c], 1
call esi
mov dword [0x4cc01c], eax
dec edi
jne 0x40fb00
mov ecx, dword [ebp - 0x24]
mov dword [ebp + 8], ecx
jmp 0x40fe79
mov edi, dword [ebp - 0x20]
mov esi, dword [ebp + 8]
cmp edi, 4
jbe 0x40fbc4
push 4
push 0x4a6e80
push esi
call fcn.0048ffb7
mov ebx, dword [ebp + 0x14]
add esp, 0xc
test eax, eax
jne 0x40fbc7
test ebx, ebx
jne 0x40fbc7
lea eax, [esi + 6]
call fcn.004097c0
jmp 0x40fca2
mov ebx, dword [ebp + 0x14]
cmp edi, 2
jbe 0x40fd98
push 2
push 0x4a6e8c
push esi
call fcn.0048ffb7
add esp, 0xc
test eax, eax
jne 0x40fd98
push 0x10
push eax
add esi, 4
push esi
call fcn.00490f0f
add esp, 0xc
cmp eax, 0x10000
jb 0x40fc2a
sub eax, 0x10000
mov edx, eax
shr edx, 0xa
and edx, 0x3ff
mov ecx, eax
sub edx, 0x2800
and ecx, 0x3ff
sub ecx, 0x2400
movzx edi, dx
movzx esi, cx
jmp 0x40fc2f
movzx edi, ax
xor esi, esi
test ebx, ebx
je 0x40fc5c
movzx edx, di
mov edi, dword [sym.imp.USER32.dll_PostMessageW]
push 0
push edx
push 0x102
push ebx
call edi
test si, si
je 0x40fca7
push 0
movzx eax, si
push eax
push 0x102
push ebx
call edi
jmp 0x40fca7
cmp dword [0x4cade4], 2
je 0x40fc87
movzx ebx, byte [ebp - 1]
or bl, byte [ebp - 7]
push ebx
call fcn.0040edb0
add esp, 4
test si, si
je 0x40fca7
push ebx
mov edi, esi
call fcn.0040edb0
add esp, 4
jmp 0x40fca7
push 0xa
lea edx, [ebp - 0x6e]
push edx
mov ecx, 0x30
push eax
mov word [ebp - 0x70], cx
call fcn.0048f4e5
add esp, 0xc
lea eax, [ebp - 0x70]
call fcn.004107d0
cmp dword [0x4cade4], 2
jne 0x40fcc8
mov eax, dword [0x4c6a44]
mov esi, dword [eax + 0x60]
call fcn.00412660
mov ecx, dword [ebp - 0x24]
mov dword [ebp + 8], ecx
jmp 0x40fe79
mov ecx, dword [0x4c6a44]
mov esi, dword [ecx + 0x5c]
call fcn.00412660
mov ecx, dword [ebp - 0x24]
mov dword [ebp + 8], ecx
jmp 0x40fe79
xor ecx, ecx
mov edx, edi
mov al, bl
call fcn.00413300
mov byte [ebp - 0x3c], al
test al, al
je 0x40fd6a
cmp dword [ebp + 0x14], 0
jne 0x40fd6a
mov ecx, dword [ebp - 0x18]
test ecx, ecx
jne 0x40fd2a
mov ecx, dword [ebp - 0x34]
mov byte [ebp - 9], bl
cmp ecx, 1
jne 0x40fd1a
or byte [0x4cadbe], al
or byte [ebp - 7], al
jmp 0x40fd6a
cmp ecx, 2
jne 0x40fd25
or byte [0x4cadbf], al
or byte [ebp - 7], al
jmp 0x40fd6a
cmp ecx, 1
jne 0x40fd6a
mov al, bl
call fcn.0040ed30
mov al, byte [ebp - 0x3c]
mov cl, byte [0x4cadbe]
not al
and byte [0x4cadbf], al
and byte [ebp - 3], al
and cl, al
mov byte [0x4cadbe], cl
cmp bl, 0xa5
jne 0x40fd64
cmp dword [0x4c949c], 3
jne 0x40fd64
and byte [ebp - 3], 0xfe
or cl, byte [ebp - 3]
mov byte [ebp - 7], cl
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x18]
push 0
push SysReAllocString
push SysReAllocString
push edx
mov edx, dword [ebp - 7]
push eax
mov eax, dword [ebp - 0xe]
push ecx
push edx
push edi
push eax
mov ecx, esi
mov al, byte [ebp - 1]
call fcn.004102b0
add esp, 0x24
mov ecx, dword [ebp - 0x24]
mov dword [ebp + 8], ecx
jmp 0x40fe79
cmp esi, 2
jne 0x40fe02
movzx eax, word [edi]
add eax, 0xfffffff8
cmp eax, 5
ja case.0x40fdb3.11
jmp dword [eax*4 + 0x410290]
cmp word [edi + 2], 0xa
jne case.0x40fdb3.10
add edi, 2
mov dword [ebp + 8], edi
mov byte [ebp - 0xe], 0xd
jmp 0x40fe32
mov byte [ebp - 0xe], 8
jmp 0x40fe32
mov byte [ebp - 0xe], 9
jmp 0x40fe32
mov byte [ebp - 0xe], 0
mov ecx, dword [ebp + 0x14]
mov al, byte [ebp - 1]
test ecx, ecx
je 0x40fe62
movzx edx, word [edi]
push 0
push edx
push 0x102
push ecx
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x40fe79
mov al, byte [ebp - 1]
or al, byte [ebp - 7]
je 0x40fe12
test esi, esi
jne 0x40fe12
mov al, 1
jmp 0x40fe14
xor al, al
mov edx, dword [0x4c94a0]
mov si, word [edi]
push eax
push edx
lea eax, [ebp - 1]
push eax
call fcn.00413c70
add esp, 0xc
mov byte [ebp - 0xe], al
test al, al
je 0x40fddd
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 7]
mov eax, dword [ebp - 0xe]
push 0
push SysReAllocString
push SysReAllocString
push ecx
push 0
push 2
push edx
push 0
push eax
mov al, byte [ebp - 1]
mov ecx, 1
call fcn.004102b0
add esp, 0x24
jmp 0x40fe79
or al, byte [ebp - 7]
mov ecx, 1
movzx eax, al
push eax
mov ax, word [edi]
call fcn.004106c0
add esp, 4
mov byte [ebp - 1], 0
mov eax, dword [ebp + 8]
mov cl, byte [ebp - 9]
add eax, 2
cmp word [eax], 0
mov dword [ebp + 8], eax
mov byte [0x4cadab], cl
jne 0x40f520
cmp dword [0x4cade4], 0
je 0x40ff50
cmp byte [0x4c9481], 0
mov dword [ebp + 8], 0xffffffff
jne 0x40ff10
cmp dword [0x4c9494], 0
jbe 0x40ff10
cmp byte [0x4c947b], 0
je 0x40fecc
xor eax, eax
jmp 0x40fed8
movzx eax, byte [ebp - 0xa]
movzx edx, byte [ebp - 2]
not eax
and eax, edx
or al, byte [0x4cadbf]
push 1
or al, byte [ebp - 7]
push 1
mov byte [ebp - 0x14], al
movzx eax, byte [0x4c9483]
mov esi, dword [ebp - 0x14]
push 0
push eax
push esi
mov eax, 0xffc3d44d
call fcn.00412a50
add esp, 0x14
lea ecx, [ebp + 8]
push esi
push ecx
call fcn.00412510
add esp, 8
mov eax, dword [0x4cade4]
dec eax
neg eax
sbb eax, eax
and eax, 0x3e8
add eax, 0x1f4
cmp dword [0x4c9490], eax
jbe 0x40ff3b
mov edx, dword [0x4c9498]
push edx
call fcn.004900b1
add esp, 4
mov esi, dword [ebp + 8]
xor edi, edi
mov dword [0x4cade4], edi
call fcn.00412660
jmp 0x4100f9
cmp dword [0x4ca694], 0
je 0x40ff61
mov cl, byte [0x4ca563]
jmp 0x40ff85
cmp dword [0x4c6944], 0
jl 0x40ff82
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [0x4cbfdc]
cmp eax, dword [0x4c6944]
jb 0x40ff82
xor cl, cl
jmp 0x40ff85
mov cl, byte [ebp - 2]
or cl, byte [0x4cadbf]
cmp byte [0x4c947b], 0
je 0x40ffad
mov dl, byte [ebp - 2]
mov al, cl
xor al, dl
mov bl, al
and bl, dl
not bl
and bl, byte [ebp - 7]
and al, cl
or bl, al
mov byte [ebp - 0x14], bl
jmp 0x40ffba
mov al, byte [ebp - 0xa]
not al
and al, cl
or al, byte [ebp - 7]
mov byte [ebp - 0x14], al
cmp dword [0x4ca694], 0
je 0x40ffcd
mov al, byte [0x4ca561]
jmp 0x4100d4
mov esi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 0xa0
mov byte [ebp + 0xb], 0
call esi
mov ecx, 0x8000
test cx, ax
je 0x40ffec
mov byte [ebp + 0xb], 0x10
push 0xa1
call esi
mov edx, 0x8000
test dx, ax
je 0x410001
or byte [ebp + 0xb], 0x20
push 0xa2
call esi
mov ecx, 0x8000
test cx, ax
je 0x410016
or byte [ebp + 0xb], 1
push 0xa3
call esi
mov edx, 0x8000
test dx, ax
je 0x41002b
or byte [ebp + 0xb], 2
push 0xa4
call esi
mov ecx, 0x8000
test cx, ax
je 0x410040
or byte [ebp + 0xb], 4
push 0xa5
call esi
mov edx, 0x8000
test dx, ax
je 0x410055
or byte [ebp + 0xb], 8
push 0x5b
call esi
mov ecx, 0x8000
test cx, ax
je 0x410067
or byte [ebp + 0xb], 0x40
push 0x5c
call esi
mov edx, 0x8000
test dx, ax
je 0x410079
or byte [ebp + 0xb], 0x80
cmp dword [0x4ca694], 0
je 0x4100d1
mov bl, byte [ebp + 0xb]
not bl
and bl, byte [0x4ca561]
je 0x4100d1
mov cl, byte [0x4ca563]
mov al, bl
not al
and byte [0x4ca561], al
and byte [0x4ca562], al
and cl, al
mov al, cl
mov byte [0x4ca563], cl
mov ecx, 0x4ca588
call fcn.00413230
mov eax, dword [0x4c9474]
test eax, eax
je 0x4100d1
test byte [eax + 8], bl
je 0x4100d1
mov dword [0x4c9474], 0
mov al, byte [ebp + 0xb]
or al, byte [0x4ca584]
mov ecx, dword [ebp + 0x14]
push 1
movzx edx, al
mov eax, dword [ebp - 0x14]
push 1
push ecx
push edx
push eax
mov eax, 0xffc3d44d
call fcn.00412a50
add esp, 0x14
xor edi, edi
cmp dword [0x4ca694], edi
je 0x410119
mov al, byte [0x4ca562]
mov cl, al
xor cl, byte [0x4ca561]
and cl, al
not cl
and al, cl
mov byte [0x4ca562], al
mov ebx, 1
cmp dword [ebp - 0x44], ebx
jne 0x410193
mov esi, dword [sym.imp.USER32.dll_GetKeyState]
push 0x14
call esi
test bl, al
jne 0x410193
push 0x14
call esi
mov edx, 0x8000
test dx, ax
je 0x410152
push 0xffc3d44d
push edi
push edi
push edi
push 0x14
push ebx
call fcn.00410c00
add esp, 0x18
push 0xffc3d44d
push edi
push edi
push edi
push 0x14
push 2
call fcn.00410c00
add esp, 0x18
push edi
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
cmp eax, dword [0x4cb4ec]
jne 0x410193
push ebx
push 0xffffffffffffffff
mov dword [0x4c694c], edi
call fcn.004013d0
add esp, 8
mov dword [0x4c694c], ebx
cmp byte [ebp - 0xf], 0
je 0x4101ab
mov eax, dword [ebp - 0x58]
mov ecx, dword [0x4cb4ec]
push edi
push eax
push ecx
call dword [sym.imp.USER32.dll_AttachThreadInput]
cmp byte [ebp - 8], 0
je 0x4101c5
cmp byte [ebp - 0x19], 0
jne 0x4101c5
push edi
call dword [sym.imp.USER32.dll_BlockInput]
mov byte [0x4cad76], 0
cmp dword [ebp + 0x10], ebx
jne 0x4101f7
push edi
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
cmp eax, dword [0x4cb4ec]
jne 0x4101f7
push ebx
push 0xffffffffffffffff
mov dword [0x4c694c], edi
call fcn.004013d0
add esp, 8
mov dword [0x4c694c], ebx
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x4c]
mov dword [eax + 0x5c], edx
mov dword [eax + 0x64], ecx
lea esp, [ebp - 0xc8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret