Function at 0x418330
Capabilities:
Check for foreground window switch
Check for time delay via gettickcount
Get keyboard layout
Log keystrokes
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x98
push ebx
push esi
mov esi, ecx
mov ebx, edx
push edi
mov dword [ebp - 0x1c], ebx
cmp word [esi], 0
je 0x41932b
mov eax, dword [0x50499c]
mov dword [ebp - 0x28], eax
mov eax, dword fs:[0x24]
mov dword [ebp - 0x48], eax
test ebx, ebx
jne 0x418382
push 7
push str.Blind
push esi
call fcn.004bb7bb
add esp, 0xc
test eax, eax
jne 0x418382
mov byte [0x50a9d4], 1
add esi, 0xe
jmp 0x41838d
mov byte [0x50a9d4], 0
test ebx, ebx
jne 0x4183ab
push 6
push str.Text
push esi
call fcn.004bb7bb
add esp, 0xc
test eax, eax
jne 0x4183ab
mov dword [ebp - 0x1c], 2
add esi, 0xc
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp + 8]
mov eax, dword [edx + 0x5c]
mov dword [ebp - 0x68], eax
mov eax, dword [edx + 0x64]
mov dword [ebp - 0x54], eax
cmp ecx, 1
je 0x4183cb
cmp ecx, 3
jne 0x418477
mov eax, dword [0x50a934]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4183dd
push eax
call ebx
push str.AHK_Keybd
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [0x50a934], 0
mov dword [ebp - 0x30], eax
je 0x418408
mov dword [0x50a934], edi
jmp 0x418412
test edi, edi
je 0x418412
push edi
call ebx
mov eax, dword [ebp - 0x30]
cmp eax, 0xb7
je 0x418441
cmp dword [ebp - 0x1c], 0
jne 0x418438
call fcn.00412840
test al, al
je 0x418438
mov edx, str.Click
mov ecx, esi
call fcn.0049bfa0
test eax, eax
jne 0x418441
mov dword [ebp + 8], 1
jmp 0x418477
cmp dword [ebp + 8], 3
jne 0x418450
mov dword [ebp + 8], 2
jmp 0x418477
mov edx, dword [ebp - 0x28]
mov dword [ebp + 8], 0
cmp dword [edx + 0x5c], 0
jge 0x41846b
cmp dword [edx + 0x64], 0
jge 0x41846b
or eax, 0xffffffff
jmp 0x41846d
xor eax, eax
mov dword [edx + 0x64], eax
mov dword [edx + 0x5c], 0xffffffff
mov ebx, dword [ebp + 0xc]
xor edi, edi
mov byte [ebp - 0xb], 0
test ebx, ebx
je 0x4184d1
push edi
push ebx
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov dword [ebp - 0x38], eax
test eax, eax
je 0x41856c
cmp eax, dword [0x50939c]
je 0x41856c
mov ecx, ebx
call fcn.004a1c20
test al, al
jne 0x41856c
mov ebx, dword [ebp - 0x38]
push 1
push ebx
push dword [0x50939c]
call dword [sym.imp.USER32.dll_AttachThreadInput]
test eax, eax
mov edi, ebx
setne byte [ebp - 0xb]
jmp 0x41856c
test byte [0x50a706], 0xc0
je 0x418557
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [0x50a6fc]
cmp eax, 0x32
jae 0x418557
cmp dword [ebp + 8], 2
je 0x418557
cmp byte [0x50a9d4], 0
jne 0x418557
mov ebx, dword [ebp - 0x1c]
cmp ebx, 2
je 0x418557
cmp byte [0x50a903], 0
je 0x418557
mov eax, dword [ebp - 0x48]
cmp eax, dword [0x50939c]
jne 0x418557
mov edx, 0x4f132c
mov ecx, esi
call fcn.004064f0
test ebx, ebx
jne 0x4185b3
test eax, eax
je 0x418557
nop
lea ecx, [eax + 2]
mov edx, 0x4f1334
call fcn.004064f0
test eax, eax
je 0x4185b7
cmp word [eax], 0x7b
je 0x4185b7
mov edx, 0x4f132c
mov ecx, eax
call fcn.004064f0
test eax, eax
jne 0x418530
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov edx, eax
call fcn.0041c510
mov edi, eax
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x38], eax
push edi
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
xor edx, edx
mov dword [0x50a9b0], eax
mov ecx, eax
call fcn.0041c5b0
mov cl, 1
mov dword [0x50a9b4], eax
call fcn.0041bf40
mov bl, al
and byte [0x50a95f], bl
cmp dword [0x507ac8], 0
je 0x4185f9
mov al, byte [0x50848e]
mov cl, byte [0x50848c]
mov bh, al
not al
and bh, cl
and al, cl
jmp 0x41861d
test eax, eax
je 0x418557
mov edi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
mov ebx, 0x8000
push 0x5b
call edi
test bx, ax
jne 0x4185d4
push 0x5c
call edi
test bx, ax
je 0x418557
mov edx, 1
mov dword [0x504994], 0
mov ecx, 0x8000012f
call fcn.004019f0
mov dword [0x504994], 1
jmp 0x4185c2
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [0x50a6fc]
cmp eax, dword [0x505c08]
jae 0x418617
mov cl, byte [0x50a706]
and cl, bl
jmp 0x418619
xor cl, cl
mov bh, cl
xor al, al
not bh
mov byte [ebp - 3], cl
and bh, byte [0x50a95e]
and bh, bl
mov byte [ebp - 6], al
cmp byte [0x50a9d4], 0
mov byte [ebp - 1], bh
mov byte [0x50a95e], bh
je 0x41864c
not bh
and bh, bl
mov al, bh
mov bh, bl
mov byte [ebp - 1], bh
jmp 0x41864e
xor al, al
mov byte [ebp - 4], al
mov eax, dword [ebp - 0x28]
mov byte [ebp - 0x10], bh
cmp byte [eax + 0xf3], 0
je 0x418680
cmp byte [0x50a9d4], 0
jne 0x418680
cmp dword [ebp - 0x1c], 2
je 0x418680
mov edx, 2
mov cl, 0x14
call fcn.0041b7c0
mov dword [ebp - 0x30], eax
jmp 0x418687
mov dword [ebp - 0x30], 0
mov ecx, dword [ebp + 8]
mov eax, 0x1f4
mov dword [0x50a9d0], ecx
mov edx, 0x5dc
test ecx, ecx
je 0x418700
cmp ecx, 1
cmovne eax, edx
mov edx, 0x2ee0
mov dword [0x50a9bc], eax
mov eax, 0x36b0
cmovne eax, edx
call fcn.004d2260
mov eax, dword [0x5063fc]
mov ecx, esp
mov byte [0x50a9c4], bl
mov byte [0x50a9c5], 0
mov dword [0x50a9b8], 0
mov dword [eax], ecx
mov ecx, dword [ebp + 8]
mov dword [0x50a9c8], 0x80000000
mov dword [0x50a9cc], 0x80000000
mov byte [0x50a9c6], 0
mov byte [0x50a9c7], 1
mov al, byte [0x507b22]
mov byte [ebp - 0x1d], al
mov eax, dword [0x5049ac]
cmp eax, 8
je 0x418717
cmp eax, 0xa
jne 0x418737
mov edi, dword [ebp + 0xc]
test ecx, ecx
jne 0x41873a
test edi, edi
jne 0x41873a
push 1
mov byte [ebp - 0xc], 1
call dword [sym.imp.USER32.dll_BlockInput]
mov byte [0x507b22], 1
jmp 0x41873e
mov edi, dword [ebp + 0xc]
mov byte [ebp - 0xc], 0
xor bl, bl
cmp word [esi], 0
mov byte [ebp - 0xa], bl
je 0x4190b3
jmp 0x418753
mov edi, dword [ebp + 0xc]
cmp dword [0x50a9d0], 0
mov byte [ebp - 5], 0
jne 0x4187bf
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [0x50499c]
sub eax, dword [0x50a73c]
cmp eax, dword [ecx + 0xd8]
jbe 0x4187bf
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x98]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x4187b4
mov edx, 1
mov dword [0x504994], 0
or ecx, 0xffffffff
call fcn.004019f0
mov dword [0x504994], 1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x50a73c], eax
mov eax, dword [ebp - 0x1c]
test eax, eax
jne 0x418fda
movzx eax, word [esi]
push eax
push 0x4f133c
call fcn.004b7267
add esp, 8
test eax, eax
je 0x419017
movzx eax, word [esi]
add eax, 0xffffffdf
cmp eax, 0x5c
ja case.0x4187f9.34
movzx eax, byte [eax + 0x419354]
jmp dword [eax*4 + 0x419338]
test bh, 3
jne case.0x4187f9.34
or bl, 1
jmp 0x41909b
test bh, 0x30
jne case.0x4187f9.34
or bl, 0x10
jmp 0x41909b
test bh, 0xc
jne case.0x4187f9.34
or bl, 4
jmp 0x41909b
test bh, 0xc0
jne case.0x4187f9.34
or bl, 0x40
jmp 0x41909b
lea edi, [esi + 2]
push 0x7d
push edi
call fcn.004b7267
add esp, 8
mov dword [ebp - 0x18], eax
test eax, eax
je case.0x4187f9.34
mov esi, edi
nop
movzx ecx, word [esi]
cmp ecx, 0x20
je 0x41886d
cmp ecx, 9
jne 0x418872
add esi, 2
jmp 0x418860
mov edi, eax
sub edi, esi
sar edi, 1
mov dword [ebp - 0x34], edi
jne 0x418902
lea edi, [eax + 2]
movzx eax, word [edi]
cmp eax, 0x7d
jne 0x418894
mov dword [ebp - 0x18], edi
lea edi, [eax - 0x7c]
jmp 0x4188ff
cmp eax, 0x20
je 0x4188a2
cmp eax, 9
jne 0x418fd2
cmp ax, 0x20
je 0x4188ae
cmp ax, 9
jne 0x4188b7
movzx eax, word [edi + 2]
add edi, 2
jmp 0x4188a2
push 4
push str.Down
push edi
call fcn.004bb7bb
add esp, 0xc
test eax, eax
je 0x4188e3
push 2
push 0x4efe4c
push edi
call fcn.004bb7bb
add esp, 0xc
test eax, eax
jne 0x418fd2
push 0x7d
push edi
call fcn.004b7267
add esp, 8
mov dword [ebp - 0x18], eax
test eax, eax
je case.0x4187f9.34
mov edi, eax
sub edi, esi
sar edi, 1
mov dword [ebp - 0x34], edi
push 5
push 0x4ee2f8
push esi
call fcn.004bb7bb
add esp, 0xc
test eax, eax
jne 0x4189bb
mov eax, dword [ebp - 0x18]
xor ecx, ecx
mov word [eax], cx
lea ecx, [esi + 0xa]
movzx eax, word [ecx]
cmp eax, 0x20
je 0x418932
cmp eax, 9
jne 0x418937
add ecx, 2
jmp 0x418925
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 2]
push eax
lea eax, [ebp - 0x50]
push eax
lea edx, [ebp - 0x44]
call fcn.00419fd0
mov eax, dword [ebp - 0x18]
add esp, 0x14
mov ecx, 0x7d
push dword [ebp - 0x4c]
mov word [eax], cx
mov eax, dword [ebp - 0x3c]
cmp eax, 1
jge 0x418991
mov eax, dword [ebp - 0x28]
lea edx, [ebp - 0x50]
lea ecx, [ebp - 0x44]
movzx eax, byte [eax + 0xef]
push eax
lea eax, [ebp - 0x6c]
push eax
call fcn.0041ac60
mov esi, dword [ebp - 0x18]
add esp, 0xc
jmp 0x419099
push dword [ebp - 0x50]
mov cl, byte [ebp - 2]
xor edx, edx
push dword [ebp - 0x44]
push dword [ebp + 0xc]
push 0
push dword [ebp - 0x14]
push eax
push dword [ebp - 0x10]
push dword [ebp - 0xa]
call fcn.004193d0
mov esi, dword [ebp - 0x18]
add esp, 0x24
jmp 0x419099
push 3
push 0x4f134c
push esi
call fcn.004bb7bb
add esp, 0xc
test eax, eax
jne 0x4189de
mov esi, dword [ebp - 0x18]
mov dword [ebp - 0x1c], 1
jmp 0x419099
push 4
push 0x4f129c
push esi
call fcn.004bb7bb
add esp, 0xc
test eax, eax
jne 0x418a1f
lea ecx, [esi + 8]
movzx eax, word [ecx]
cmp eax, 0x20
je 0x418a02
cmp eax, 9
jne 0x418a07
add ecx, 2
jmp 0x4189f5
cmp ecx, dword [ebp - 0x18]
jne 0x418fd2
mov esi, dword [ebp - 0x18]
mov dword [ebp - 0x1c], 2
jmp 0x419099
mov eax, dword [ebp - 0x18]
xor ecx, ecx
mov ebx, 1
mov dword [ebp - 0x14], 2
mov edx, 0x4f0cac
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x3c], ebx
mov word [eax], cx
mov ecx, esi
mov dword [ebp - 0x40], edi
call fcn.004064f0
mov dword [ebp - 0x58], eax
test eax, eax
je 0x418b08
movzx ecx, word [eax]
lea edi, [eax + 2]
mov dword [ebp - 0x5c], ecx
xor ecx, ecx
mov word [eax], cx
mov ecx, eax
sub ecx, esi
sar ecx, 1
mov dword [ebp - 0x40], ecx
nop word [eax + eax]
movzx eax, word [edi]
cmp eax, 0x20
je 0x418a7d
cmp eax, 9
jne 0x418a82
add edi, 2
jmp 0x418a70
mov eax, dword [ebp - 0x18]
sub eax, edi
sar eax, 1
je 0x418b08
push 4
push str.Down
push edi
call fcn.004bb7bb
add esp, 0xc
test eax, eax
jne 0x418ae2
push 4
add edi, 8
mov dword [ebp - 0x14], eax
push str.Temp
push edi
call fcn.004bb7bb
add esp, 0xc
test eax, eax
jne 0x418ac2
mov dword [ebp - 0x2c], eax
jmp 0x418b08
xor eax, eax
cmp word [edi], 0x52
sete al
push eax
call fcn.004c3ec8
add esp, 4
mov edi, eax
neg edi
sbb edi, edi
neg edi
inc edi
mov dword [ebp - 0x2c], edi
jmp 0x418b08
push 0x4efe4c
push edi
call fcn.004ba0a7
add esp, 8
test eax, eax
jne 0x418af9
mov dword [ebp - 0x14], ebx
jmp 0x418b08
mov ecx, edi
call fcn.00417fc0
mov ebx, eax
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x3c], ebx
push dword [0x50a9b0]
lea eax, [ebp - 0xa]
mov ecx, esi
push eax
lea eax, [ebp - 0x60]
push eax
lea edx, [ebp - 2]
call fcn.0041cbb0
mov eax, dword [ebp - 0x58]
add esp, 0xc
test eax, eax
je 0x418b30
mov ecx, dword [ebp - 0x5c]
mov word [eax], cx
mov eax, dword [ebp - 0x18]
mov ecx, 0x7d
mov word [eax], cx
cmp ebx, 1
jl 0x418fcf
mov bh, byte [ebp - 2]
mov edi, dword [ebp - 0x60]
test bh, bh
jne 0x418f10
test di, di
jne 0x418f10
movzx eax, byte [esi]
push eax
call fcn.004ba2ec
add esp, 4
test eax, eax
mov eax, dword [ebp - 0x40]
je 0x418c12
cmp eax, 1
jbe 0x418c15
cmp dword [0x50a9d0], 0
je 0x418ba7
mov ecx, esi
call fcn.00417fc0
push eax
push 0
push 0
xor dl, dl
xor cl, cl
call fcn.0041af90
mov bh, byte [ebp - 1]
add esp, 0xc
mov esi, dword [ebp - 0x18]
jmp 0x419099
mov eax, dword [ebp - 0x48]
mov dword [0x504994], 0
cmp dword [0x50939c], eax
je 0x418bea
mov ecx, esi
call fcn.00417fc0
test eax, eax
js 0x418bea
mov ecx, esi
call fcn.00417fc0
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov bh, byte [ebp - 1]
mov esi, dword [ebp - 0x18]
mov dword [0x504994], 1
jmp 0x419099
mov ecx, esi
call fcn.00417fc0
mov edx, 1
mov ecx, eax
call fcn.004019f0
mov bh, byte [ebp - 1]
mov esi, dword [ebp - 0x18]
mov dword [0x504994], 1
jmp 0x419099
cmp eax, 1
jne 0x418c77
cmp dword [ebp - 0x14], 1
je 0x418fcf
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x418c55
mov ebx, dword [ebp - 0x24]
test ebx, ebx
jle 0x418fcf
movzx eax, word [esi]
push 0
push eax
push 0x102
push edi
call dword [sym.imp.USER32.dll_PostMessageW]
sub ebx, 1
jne 0x418c33
mov bh, byte [ebp - 1]
mov esi, dword [ebp - 0x18]
jmp 0x419099
mov al, byte [ebp - 0xa]
mov bh, byte [ebp - 1]
mov edx, dword [ebp - 0x24]
or al, bh
mov cx, word [esi]
movzx eax, al
push eax
call fcn.00419580
mov esi, dword [ebp - 0x18]
add esp, 4
jmp 0x419099
mov ebx, dword [ebp + 0xc]
mov ecx, esi
mov edi, dword [ebp - 0x34]
test ebx, ebx
mov edx, edi
sete al
movzx eax, al
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.0041cc80
add esp, 0xc
mov byte [ebp - 2], al
test al, al
je 0x418d93
mov esi, dword [ebp - 0x14]
mov edi, ebx
test edi, edi
jne 0x418cbe
test esi, esi
jne 0x418cb7
mov byte [ebp - 5], al
jmp 0x418cbe
mov cl, al
call fcn.004181b0
cmp dword [0x50a9d0], 0
je 0x418cce
mov al, byte [0x50a9c4]
jmp 0x418cd5
xor cl, cl
call fcn.0041bf40
push 0xffc3d44d
push 0
mov dl, al
mov al, byte [ebp - 0x10]
push 0
push edi
mov cl, al
mov byte [ebp - 1], al
call fcn.0041b8d0
mov ebx, dword [ebp - 0x24]
add esp, 0x10
test ebx, ebx
jle 0x418fcf
nop dword [eax]
mov dl, byte [ebp - 2]
mov ecx, esi
push 0xffc3d44d
push 1
push edi
push 0
call fcn.00419970
add esp, 0x10
cmp dword [0x50a9d0], 0
jne 0x418d7f
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [0x50499c]
sub eax, dword [0x50a73c]
cmp eax, dword [ecx + 0xd8]
jbe 0x418d7f
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x98]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x418d74
mov edx, 1
mov dword [0x504994], 0
or ecx, 0xffffffff
call fcn.004019f0
mov dword [0x504994], 1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x50a73c], eax
sub ebx, 1
jne 0x418d00
mov bh, byte [ebp - 1]
mov esi, dword [ebp - 0x18]
jmp 0x419099
cmp edi, 4
jbe 0x418e04
push 4
push str.ASC
push esi
call fcn.004bb7bb
add esp, 0xc
test eax, eax
jne 0x418e04
test ebx, ebx
jne 0x418e04
lea ecx, [esi + 6]
movzx eax, word [ecx]
cmp eax, 0x20
je 0x418dc0
cmp eax, 9
jne 0x418dc5
add ecx, 2
jmp 0x418db3
call fcn.00419690
cmp dword [0x50a9d0], 2
mov eax, dword [0x50499c]
jne 0x418dee
mov ecx, dword [eax + 0x60]
call fcn.0041b590
mov bh, byte [ebp - 0x10]
mov esi, dword [ebp - 0x18]
mov byte [ebp - 1], bh
jmp 0x419099
mov ecx, dword [eax + 0x5c]
call fcn.0041b590
mov bh, byte [ebp - 0x10]
mov esi, dword [ebp - 0x18]
mov byte [ebp - 1], bh
jmp 0x419099
cmp edi, 2
jbe 0x418df6
push 2
push 0x4f136c
push esi
call fcn.004bb7bb
add esp, 0xc
test eax, eax
jne 0x418df6
push 0x10
push eax
lea eax, [esi + 4]
push eax
call fcn.004bb6a0
mov edx, eax
add esp, 0xc
cmp edx, 0x10000
jb 0x418e61
sub edx, 0x10000
mov ecx, edx
mov eax, edx
shr ecx, 0xa
and eax, 0x3ff
and ecx, 0x3ff
sub ecx, 0x2800
sub eax, 0x2400
movzx ecx, cx
movzx esi, ax
jmp 0x418e66
movzx ecx, dx
xor esi, esi
mov edi, ebx
mov bh, byte [ebp - 0x10]
mov byte [ebp - 1], bh
test edi, edi
je 0x418e9d
push 0
movzx eax, cx
push eax
push 0x102
push edi
call dword [sym.imp.USER32.dll_PostMessageW]
test si, si
je 0x418ee2
push 0
movzx eax, si
push eax
push 0x102
push edi
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x418ee2
cmp dword [0x50a9d0], 2
je 0x418ec2
mov bl, byte [ebp - 0xa]
or bl, bh
mov dl, bl
call fcn.00418230
test si, si
je 0x418ee2
mov dl, bl
mov ecx, esi
call fcn.00418230
jmp 0x418ee2
mov eax, 0x30
mov word [ebp - 0x7c], ax
lea eax, [ebp - 0x7a]
push 0xa
push eax
push edx
call fcn.004b9faf
add esp, 0xc
lea ecx, [ebp - 0x7c]
call fcn.00419690
cmp dword [0x50a9d0], 2
mov eax, dword [0x50499c]
jne 0x418f00
mov ecx, dword [eax + 0x60]
call fcn.0041b590
mov esi, dword [ebp - 0x18]
jmp 0x419099
mov ecx, dword [eax + 0x5c]
call fcn.0041b590
mov esi, dword [ebp - 0x18]
jmp 0x419099
push 0
mov edx, edi
mov cl, bh
call fcn.0041c150
mov esi, dword [ebp - 0x14]
mov bl, al
add esp, 4
mov byte [ebp - 0x64], bl
test bl, bl
je 0x418fa7
cmp dword [ebp + 0xc], 0
jne 0x418fa7
test esi, esi
jne 0x418f62
mov eax, dword [ebp - 0x2c]
mov byte [ebp - 5], bh
cmp eax, 1
jne 0x418f50
mov al, byte [ebp - 1]
or byte [0x50a95e], bl
or al, bl
jmp 0x418fa1
cmp eax, 2
jne 0x418f5b
or byte [0x50a95f], bl
mov al, byte [ebp - 1]
or al, bl
jmp 0x418fa1
cmp esi, 1
jne 0x418fa7
mov cl, bh
call fcn.004181b0
mov cl, byte [ebp - 4]
not bl
and byte [0x50a95f], bl
mov al, bl
and al, byte [0x50a95e]
and cl, bl
mov byte [0x50a95e], al
mov byte [ebp - 4], cl
cmp bh, 0xa5
jne 0x418f9f
cmp dword [0x50a9b4], 3
jne 0x418f9f
and cl, 0xfe
mov byte [ebp - 4], cl
or al, cl
mov byte [ebp - 0x10], al
mov byte [ebp - 1], al
push 0
push connect
push connect
push dword [ebp + 0xc]
mov edx, edi
mov cl, bh
push dword [ebp - 0x64]
push esi
push dword [ebp - 0x24]
push dword [ebp - 0x10]
push dword [ebp - 0xa]
call fcn.004193d0
add esp, 0x24
mov bh, byte [ebp - 1]
mov esi, dword [ebp - 0x18]
jmp 0x419099
cmp eax, 2
jne 0x41901a
movzx eax, word [esi]
add eax, 0xfffffff8
cmp eax, 5
ja case.0x418fea.11
jmp dword [eax*4 + 0x4193b4]
cmp word [esi + 2], 0xa
lea eax, [esi + 2]
cmove esi, eax
mov al, 0xd
mov byte [ebp - 2], al
jmp 0x419044
mov al, 8
mov byte [ebp - 2], al
jmp 0x419044
mov al, 9
mov byte [ebp - 2], al
jmp 0x419044
mov byte [ebp - 2], 0
jmp 0x41906e
mov eax, dword [ebp - 0x1c]
or bl, bh
je 0x419026
test eax, eax
jne 0x419026
mov al, 1
jmp 0x419028
xor al, al
mov cx, word [esi]
lea edx, [ebp - 0xa]
push eax
push dword [0x50a9b0]
call fcn.0041cae0
add esp, 8
mov byte [ebp - 2], al
test al, al
je 0x41906b
push 0
push connect
push connect
push edi
push 0
push 2
push 1
push dword [ebp - 0x10]
xor edx, edx
mov cl, al
push dword [ebp - 0xa]
call fcn.004193d0
add esp, 0x24
jmp 0x419099
mov bl, byte [ebp - 0xa]
movzx ecx, word [esi]
test edi, edi
je 0x419086
push 0
push ecx
push 0x102
push edi
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x419099
or bl, bh
mov edx, 1
movzx eax, bl
push eax
call fcn.00419580
add esp, 4
xor bl, bl
mov byte [ebp - 0xa], bl
mov al, byte [ebp - 5]
add esi, 2
mov byte [0x50a95d], al
cmp word [esi], 0
jne 0x418750
cmp dword [0x50a9d0], 0
je 0x41915d
or esi, 0xffffffff
cmp byte [0x50a9c6], 0
mov dword [ebp - 0x2c], esi
jne 0x41911d
cmp dword [0x50a9b8], 0
jbe 0x41911d
cmp byte [0x50a9d4], 0
je 0x4190e5
xor bl, bl
jmp 0x4190ed
mov bl, byte [ebp - 6]
not bl
and bl, byte [ebp - 3]
or bl, byte [0x50a95f]
mov dl, byte [0x50a9c4]
or bl, bh
push 0xffc3d44d
push 1
push 1
push 0
mov cl, bl
call fcn.0041b8d0
add esp, 0x10
lea ecx, [ebp - 0x2c]
mov dl, bl
call fcn.0041b380
mov esi, dword [ebp - 0x2c]
cmp dword [0x50a9d0], 1
mov eax, 0x5dc
mov ecx, 0x1f4
cmove eax, ecx
cmp dword [0x50a9bc], eax
jbe 0x419147
push dword [0x508618]
call fcn.004bb7ab
add esp, 4
mov ecx, esi
mov dword [0x50a9d0], 0
call fcn.0041b590
jmp 0x4191e9
cmp dword [0x507ac8], 0
je 0x419171
mov cl, byte [0x50848c]
mov dl, byte [ebp - 3]
jmp 0x41919a
cmp dword [0x505c08], 0
jl 0x419195
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [0x50a6fc]
cmp eax, dword [0x505c08]
jb 0x419195
mov dl, byte [ebp - 3]
xor cl, cl
jmp 0x41919a
mov dl, byte [ebp - 3]
mov cl, dl
or cl, byte [0x50a95f]
cmp byte [0x50a9d4], 0
je 0x4191bb
mov al, cl
xor al, dl
mov bl, al
and al, cl
and bl, dl
not bl
and bl, bh
or bl, al
jmp 0x4191c4
mov bl, byte [ebp - 6]
not bl
and bl, cl
or bl, bh
push 0xffc3d44d
push 1
push 1
push dword [ebp + 0xc]
xor cl, cl
call fcn.0041bf40
or al, byte [0x507b57]
mov cl, bl
mov dl, al
call fcn.0041b8d0
add esp, 0x10
cmp dword [0x507ac8], 0
je 0x41920c
mov cl, byte [0x50848d]
mov al, cl
xor al, byte [0x50848e]
and al, cl
not al
and cl, al
mov byte [0x50848d], cl
cmp dword [ebp - 0x30], 1
jne 0x4192a8
mov esi, dword [sym.imp.USER32.dll_GetKeyState]
push 0x14
call esi
test al, 1
jne 0x4192a8
push 0x14
call esi
mov ecx, 0x8000
test cx, ax
je 0x419250
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x14
mov ecx, 1
call fcn.00419970
add esp, 0x10
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x14
mov ecx, 2
call fcn.00419970
mov ebx, dword [sym.imp.USER32.dll_GetForegroundWindow]
add esp, 0x10
push 0
call ebx
mov esi, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
push eax
call esi
cmp eax, dword [0x50939c]
jne 0x4192b4
mov edx, 1
mov dword [0x504994], 0
or ecx, 0xffffffff
call fcn.004019f0
mov dword [0x504994], 1
jmp 0x4192b4
mov ebx, dword [sym.imp.USER32.dll_GetForegroundWindow]
mov esi, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
cmp byte [ebp - 0xb], 0
je 0x4192cb
push 0
push dword [ebp - 0x38]
push dword [0x50939c]
call dword [sym.imp.USER32.dll_AttachThreadInput]
cmp byte [ebp - 0xc], 0
je 0x4192e6
cmp byte [ebp - 0x1d], 0
jne 0x4192e6
push 0
call dword [sym.imp.USER32.dll_BlockInput]
mov byte [0x507b22], 0
cmp dword [ebp + 8], 1
jne 0x41931c
push 0
call ebx
push eax
call esi
cmp eax, dword [0x50939c]
jne 0x41931c
mov edx, 1
mov dword [0x504994], 0
or ecx, 0xffffffff
call fcn.004019f0
mov dword [0x504994], 1
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x68]
mov dword [eax + 0x5c], ecx
mov ecx, dword [ebp - 0x54]
mov dword [eax + 0x64], ecx
lea esp, [ebp - 0xa4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret