Function at 0x1012f86
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
mov dword [ebp - 4], 2
cmp dword [esi + 0x68], ebx
je 0x1012faa
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret 0xc
cmp dword [esi + 0x1c], ebx
jne 0x1012fc7
mov eax, dword [esi + 8]
push dword [eax + 4]
call dword [sym.imp.USER32.DLL_UnlockWindowStation]
mov eax, dword [esi + 8]
push dword [eax + 4]
call dword [sym.imp.USER32.DLL_LockWindowStation]
push 0xa
xor eax, eax
pop ecx
lea edi, [ebp - 0x30]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], esi
push eax
call fcn.01013490
test eax, eax
jne 0x1012ff0
cmp dword [ebp - 0x28], ebx
je 0x1013019
cmp dword [ebp - 0x2c], ebx
je 0x1013019
push 3
pop eax
jmp 0x1012fa3
lea eax, [ebp - 0x30]
push eax
call fcn.01012ed8
test eax, eax
jne 0x101301d
lea eax, [ebp - 0x30]
push eax
call fcn.010137c2
cmp dword [ebp - 0x28], ebx
je 0x1013019
cmp dword [ebp - 0x2c], ebx
je 0x1013019
push ebx
push esi
call fcn.010025fb
jmp 0x1012feb
push 2
jmp 0x1012fed
cmp dword [ebp - 0x2c], ebx
jne 0x10131b2
cmp dword [esi + 0x60], 9
je 0x10131b2
push 0x2000000
push ebx
push ebx
call dword [sym.imp.USER32.DLL_OpenInputDesktop]
mov ecx, dword [esi + 8]
mov dword [ecx + 0x18], eax
mov eax, dword [esi + 8]
cmp dword [eax + 0x18], ebx
je 0x101318c
mov dword [ebp + 8], ebx
push dword [eax + 8]
mov ebx, dword [sym.imp.KERNEL32.DLL_lstrlenW]
call ebx
lea edi, [eax + eax + 0x7c]
push edi
push 0x40
call dword [sym.imp.KERNEL32.DLL_LocalAlloc]
test eax, eax
mov dword [ebp - 0xc], eax
je 0x101318a
mov ecx, dword [esi + 8]
push dword [ecx + 8]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyW]
push 0x100bc28
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.DLL_lstrcatW]
push dword [ebp - 0xc]
call ebx
lea ecx, [eax + eax]
sub edi, eax
mov eax, dword [ebp - 0xc]
lea edx, [ebp + 8]
push edx
add eax, ecx
push edi
mov edi, dword [sym.imp.USER32.DLL_GetUserObjectInformationW]
push eax
mov eax, dword [esi + 8]
push 2
mov dword [ebp - 8], ecx
push dword [eax + 0x18]
call edi
test eax, eax
jne 0x101310c
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x7a
jne 0x101318a
mov eax, dword [esi + 8]
push 0x42
push dword [eax + 8]
call ebx
mov ecx, dword [ebp + 8]
lea eax, [ecx + eax*2 + 4]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.DLL_LocalReAlloc]
test eax, eax
je 0x101318a
lea ecx, [ebp + 8]
mov dword [ebp - 0xc], eax
push ecx
mov ecx, dword [ebp - 8]
push dword [ebp + 8]
add eax, ecx
push eax
mov eax, dword [esi + 8]
push 2
push dword [eax + 0x18]
call edi
test eax, eax
je 0x101318a
lea eax, [ebp - 0x2c]
push eax
push dword [esi + 0x38c]
call dword [esi + 0x3c8]
test eax, eax
je 0x101318a
push 1
xor edi, edi
cmp dword [ebp - 0x2c], edi
pop eax
mov dword [esi + 0x68], eax
je 0x101313f
mov ecx, dword [esi + 0x60]
cmp dword [ebp - 0x2c], edi
mov dword [ebp + 8], ecx
mov dword [esi + 0x60], 8
jne 0x1013145
cmp dword [esi + 0x60], 9
jne 0x1013150
push eax
push esi
call fcn.010025fb
test eax, eax
je 0x1013187
lea eax, [ebp - 0x30]
push eax
call fcn.010133f9
test eax, eax
jne 0x10131cb
cmp dword [ebp - 0x2c], edi
je 0x101316e
cmp dword [esi + 0x1c], edi
mov dword [ebp - 4], 3
jne 0x1013175
mov dword [ebp - 4], 2
cmp dword [ebp - 0x2c], edi
jne 0x1013180
cmp dword [esi + 0x60], 9
jne 0x1013187
push edi
push esi
call fcn.010025fb
mov dword [esi + 0x68], edi
xor ebx, ebx
lea eax, [ebp - 0x30]
mov dword [esi + 0x70], ebx
push eax
call fcn.010137c2
mov eax, dword [esi + 8]
push dword [eax + 0x18]
call dword [sym.imp.USER32.DLL_CloseDesktop]
mov eax, dword [esi + 8]
mov dword [eax + 0x18], ebx
mov eax, dword [ebp - 4]
jmp 0x1012fa3
push ebx
push 0x2000000
push ebx
push ebx
push ebx
push 0x100bc2c
call dword [sym.imp.USER32.DLL_CreateDesktopW]
jmp 0x101303d
push 4
push esi
call fcn.010053e0
mov ebx, dword [sym.imp.KERNEL32.DLL_GetTickCount]
call ebx
push 0
push esi
mov edi, eax
mov dword [ebp - 0x20], 3
call fcn.01005f67
lea eax, [ebp - 0x30]
push eax
push 0x10132db
push 0
push 0x578
push dword [0x1021040]
push esi
call fcn.01005fe1
mov dword [ebp - 4], eax
call ebx
push 5
push esi
mov ebx, eax
call fcn.010053e0
cmp ebx, edi
ja 0x10132b4
or eax, 0xffffffff
sub eax, edi
add ebx, eax
xor edi, edi
cmp dword [ebp - 0x2c], edi
je 0x1013264
cmp dword [esi + 0x1c], edi
je 0x1013264
cmp dword [ebp + 0x10], edi
je 0x10132bb
push 5
push 0x100bbf8
push 0x1008b34
call dword [sym.imp.KERNEL32.DLL_GetProfileIntW]
imul eax, eax, 0x3e8
cmp ebx, eax
jae 0x10132bb
mov eax, dword [ebp + 8]
mov dword [ebp - 4], 2
mov dword [esi + 0x60], eax
push 4
pop ebx
cmp dword [ebp - 0x20], ebx
je 0x10132c4
cmp dword [ebp - 4], 3
je 0x10132c4
cmp dword [ebp - 0x2c], edi
jne 0x101327d
cmp dword [esi + 0x60], 9
jne 0x1013289
mov eax, dword [esi + 8]
push dword [eax + 0x20]
push esi
call fcn.010025fb
call fcn.01008a95
cmp dword [ebp - 0x1c], edi
mov dword [esi + 0x68], edi
je 0x101318a
cmp dword [ebp - 0x20], 3
je 0x101318a
cmp dword [ebp - 0x20], ebx
jne 0x10132cd
mov dword [esi + 0x34], ebx
mov dword [ebp - 4], ebx
jmp 0x101318a
sub ebx, edi
jmp 0x1013226
mov dword [ebp - 4], 3
jmp 0x1013264
push edi
push esi
call fcn.010025fb
jmp 0x101328e
push dword [ebp - 0x20]
push esi
call fcn.010196dc
jmp 0x101318a