Function at 0x42f570
Capabilities:
Check for time delay via gettickcount
Create thread

Disassembly:
sub esp, 0x24
push ebx
call fcn.00432980
mov bl, byte [esp + 0x2c]
mov byte [esp + 6], al
cmp bl, al
je 0x42f9b3
mov bh, byte [esp + 0x30]
push esi
mov esi, dword [0x62271c]
test al, al
jne 0x42f602
test bh, bh
jne 0x42f602
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + esi*4]
cmp byte [eax + 0x2198], bh
jne 0x42f5ba
call fcn.004ebad3
mov ecx, dword fs:[0x2c]
mov ecx, dword [ecx + esi*4]
mov eax, dword fs:[0x18]
add ecx, 0x290
push ecx
push 0
push dword [eax + 0x2c]
push 0x433170
push 0x2000
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword fs:[0x2c]
mov ecx, dword [ecx + esi*4]
mov dword [ecx + 0x834], eax
test eax, eax
je 0x42f717
push 0xf
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push ebp
push edi
movzx ebp, bh
xor edi, edi
movzx eax, bl
xor ebp, 1
mov dword [esp + 0x38], eax
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + esi*4]
cmp byte [eax + 0x2198], 0
jne 0x42f632
call fcn.004ebad3
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + esi*4]
push ebp
push dword [esp + 0x3c]
push 0x417
push dword [eax + 0x290]
call dword [sym.imp.USER32.dll_PostThreadMessageW]
test eax, eax
jne 0x42f65d
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 0x32
jl 0x42f613
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
xor bh, bh
mov byte [esp + 0x38], bh
call edi
mov ebp, eax
nop dword [eax]
mov al, bl
mov byte [esp + 0x13], al
test bl, bl
je 0x42f722
push 1
push 0x417
push 0x417
push 0
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x42f7b3
cmp dword [esp + 0x20], 0
je 0x42f7cf
mov edx, dword fs:[0x2c]
mov bh, 1
mov byte [esp + 0x38], bh
mov eax, dword [edx + esi*4]
cmp byte [eax + 0x2198], 0
jne 0x42f6cf
call fcn.004ebad3
mov edx, dword fs:[0x2c]
mov eax, dword [edx + esi*4]
cmp dword [eax + 0x1f4], 0
setne bl
cmp byte [eax + 0x2198], 0
jne 0x42f6f1
call fcn.004ebad3
mov edx, dword fs:[0x2c]
mov eax, dword [edx + esi*4]
cmp dword [eax + 0x1f0], 0
je 0x42f700
or bl, 2
test bl, bl
jne 0x42f7da
cmp byte [esp + 0x3c], bl
jne 0x42f93e
jmp 0x42f795
call fcn.004328a0
pop esi
pop ebx
add esp, 0x24
ret
cmp byte [esp + 0x3c], 0
mov bl, al
mov edx, dword fs:[0x2c]
mov byte [esp + 0x38], bh
je 0x42f791
mov eax, dword [edx + esi*4]
cmp byte [eax + 0x2198], 0
jne 0x42f74e
call fcn.004ebad3
mov edx, dword fs:[0x2c]
mov eax, dword [edx + esi*4]
cmp dword [eax + 0x1f4], 0
setne bl
cmp byte [eax + 0x2198], 0
jne 0x42f770
call fcn.004ebad3
mov edx, dword fs:[0x2c]
mov eax, dword [edx + esi*4]
cmp dword [eax + 0x1f0], 0
je 0x42f77f
or bl, 2
test bl, bl
je 0x42f93a
mov bl, byte [esp + 0x13]
mov byte [esp + 0x38], bh
jmp 0x42f7b7
mov bh, byte [esp + 0x38]
lea eax, [esp + 0x14]
push eax
mov eax, dword [edx + esi*4]
push dword [eax + 0x834]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [esp + 0x14], 0x103
jne 0x42f7e7
mov bh, byte [esp + 0x38]
call edi
sub eax, ebp
cmp eax, 0x1f4
ja 0x42f7cf
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x42f670
mov edx, dword fs:[0x2c]
mov bh, byte [esp + 0x38]
cmp byte [esp + 0x3c], 0
jne 0x42f93a
jmp 0x42f81b
mov eax, dword fs:[0x2c]
mov eax, dword [eax + esi*4]
push dword [eax + 0x834]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword fs:[0x2c]
mov eax, dword [eax + esi*4]
mov dword [eax + 0x834], 0
call fcn.004328a0
mov edx, dword fs:[0x2c]
mov eax, dword [edx + esi*4]
cmp byte [eax + 0x2198], 0
jne 0x42f833
call fcn.004ebad3
mov edx, dword fs:[0x2c]
mov eax, dword [edx + esi*4]
mov edi, dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov bl, byte [esp + 0x12]
cmp dword [eax + 0x1f4], 0
je 0x42f86b
test bl, 1
jne 0x42f86b
push str.AHK_Keybd
push 0
push 0
call edi
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + esi*4]
mov dword [ecx + 0x830], eax
jmp 0x42f8b1
cmp byte [eax + 0x2198], 0
jne 0x42f880
call fcn.004ebad3
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + esi*4]
cmp dword [ecx + 0x1f4], 0
jne 0x42f8b1
test bl, 1
je 0x42f8b1
push dword [ecx + 0x830]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + esi*4]
mov dword [ecx + 0x830], 0
cmp byte [ecx + 0x2198], 0
jne 0x42f8c6
call fcn.004ebad3
mov edx, dword fs:[0x2c]
mov eax, dword [edx + esi*4]
cmp dword [eax + 0x1f0], 0
je 0x42f8f4
test bl, 2
jne 0x42f8f4
push str.AHK_Mouse
push 0
push 0
call edi
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + esi*4]
mov dword [ecx + 0x82c], eax
jmp 0x42f93a
cmp byte [eax + 0x2198], 0
jne 0x42f909
call fcn.004ebad3
mov edx, dword fs:[0x2c]
mov eax, dword [edx + esi*4]
cmp dword [eax + 0x1f0], 0
jne 0x42f93a
test bl, 2
je 0x42f93a
push dword [eax + 0x82c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword fs:[0x2c]
mov eax, dword [edx + esi*4]
mov dword [eax + 0x82c], 0
test bh, bh
je 0x42f9b0
mov eax, dword [edx + esi*4]
cmp byte [eax + 0x2198], 0
jne 0x42f956
call fcn.004ebad3
mov edx, dword fs:[0x2c]
mov eax, dword [edx + esi*4]
xorps xmm0, xmm0
push 0
sub esp, 8
mov dword [eax + 0x1d8], 0
movsd qword [esp], xmm0
push 0
push 0x10000
push str.Warning:_The_keyboard_and_or_mouse_hook_could_not_be_activated__some_parts_of_the_script_will_not_function.
call fcn.004e9320
mov ecx, dword fs:[0x2c]
add esp, 0x18
mov eax, dword [ecx + esi*4]
cmp byte [eax + 0x2198], 0
jne 0x42f9a3
call fcn.004ebad3
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + esi*4]
mov dword [eax + 0x1d8], 1
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x24
ret