Function at 0x401060
Capabilities:
Accept command line arguments
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5c
mov eax, dword [0x416008]
xor eax, esp
mov dword [esp + 0x58], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 0x4175b0
mov dword [esp + 0x14], ebx
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
xor edi, edi
mov dword [0x4175b4], eax
cmp dword [0x4175b0], edi
jle 0x4011a4
nop dword [eax]
nop word [eax + eax]
push str.__si_timeout
push dword [eax + edi*4]
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x40118e
lea eax, [edi + 1]
cmp eax, dword [0x4175b0]
jge 0x40118e
mov eax, dword [0x4175b4]
mov dword [esp + 0x28], 7
mov dword [esp + 0x24], 0
mov edx, dword [eax + edi*4 + 4]
xor eax, eax
mov word [esp + 0x14], ax
cmp word [edx], ax
je 0x40110f
mov eax, edx
lea esi, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401100
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [esp + 0x1c]
call fcn.00401d10
cmp dword [esp + 0x28], 8
lea esi, [esp + 0x14]
cmovae esi, dword [esp + 0x14]
call fcn.004055f0
push 0xa
mov dword [eax], 0
lea eax, [esp + 0x48]
push eax
push esi
call fcn.0040602a
add esp, 0xc
mov ebx, eax
cmp esi, dword [esp + 0x44]
je 0x4013e0
call fcn.004055f0
cmp dword [eax], 0x22
je 0x4013d6
mov eax, dword [esp + 0x28]
mov dword [0x416980], ebx
cmp eax, 8
jb 0x401177
inc eax
push eax
push dword [esp + 0x18]
call fcn.00401f70
xor eax, eax
mov dword [esp + 0x28], 7
mov dword [esp + 0x24], 0
mov word [esp + 0x14], ax
mov eax, dword [0x4175b4]
inc edi
cmp edi, dword [0x4175b0]
jl 0x4010b0
mov ebx, dword [esp + 0x10]
cmp dword [0x4175b8], 0xb7
jne 0x40125f
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
mov ebx, dword [sym.imp.USER32.dll_FindWindowW]
mov edi, eax
push 0
push str.SingleInstance_WindowClass
call ebx
mov edx, eax
test edx, edx
jne 0x4011fa
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
call esi
sub eax, edi
cmp eax, dword [0x416980]
ja 0x40123d
call esi
push 0
push str.SingleInstance_WindowClass
mov edi, eax
call ebx
mov edx, eax
test edx, edx
je 0x4011d3
mov eax, dword [0x4175b4]
mov dword [esp + 0x14], 1
mov esi, dword [eax + 4]
mov ecx, esi
lea edi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401210
sub ecx, edi
mov dword [esp + 0x1c], esi
sar ecx, 1
lea eax, [ecx*2 + 2]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x14]
push eax
push edx
push 0x4a
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
push dword [0x4175b4]
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.004026e2
mov esp, ebp
pop ebp
ret 0x10
test eax, eax
je 0x4012cc
cmp dword [0x4175b0], 3
jle 0x401249
mov edx, dword [eax + 4]
xor eax, eax
mov dword [esp + 0x28], 7
mov dword [esp + 0x24], 0
mov word [esp + 0x14], ax
cmp word [edx], ax
jne 0x40128f
xor ecx, ecx
jmp 0x4012a3
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401294
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [esp + 0x1c]
call fcn.00401d10
lea eax, [esp + 0x14]
push eax
call fcn.00401970
mov eax, dword [esp + 0x28]
cmp eax, 8
jb 0x4012cc
inc eax
push eax
push dword [esp + 0x18]
call fcn.00401f70
push 0x7f00
push 0
mov dword [esp + 0x1c], 0x30
mov dword [esp + 0x20], 3
mov dword [esp + 0x24], 0x401860
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], 0
call dword [sym.imp.USER32.dll_LoadCursorW]
mov dword [esp + 0x30], eax
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x38], 6
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], str.SingleInstance_WindowClass
mov dword [esp + 0x44], 0
call dword [sym.imp.USER32.dll_RegisterClassExW]
push 0
push ebx
push 0
push 0
push 0
push 0x80000000
push 0
push 0x80000000
push 0xcf0000
push str.SingleInstance
push str.SingleInstance_WindowClass
push 0
call dword [sym.imp.USER32.dll_CreateWindowExW]
test eax, eax
je 0x401249
mov esi, dword [sym.imp.USER32.dll_GetMessageW]
lea eax, [esp + 0x48]
push 0
push 0
push 0
push eax
call esi
test eax, eax
je 0x4013b2
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
mov ebx, dword [sym.imp.USER32.dll_DispatchMessageW]
lea eax, [esp + 0x48]
push eax
call edi
lea eax, [esp + 0x48]
push eax
call ebx
push 0
push 0
push 0
lea eax, [esp + 0x54]
push eax
call esi
test eax, eax
jne 0x401393
push dword [0x4175b4]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [esp + 0x64]
mov eax, dword [esp + 0x50]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004026e2
mov esp, ebp
pop ebp
ret 0x10
push str.stoi_argument_out_of_range
call fcn.004026b5
push str.invalid_stoi_argument
call fcn.00402675
int3