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

Disassembly:
push 0xffffffffffffffff
push 0x44c2a2
mov eax, dword fs:[0]
push eax
sub esp, 0x14c
mov eax, dword [0x45dd50]
xor eax, esp
mov dword [esp + 0x148], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x45dd50]
xor eax, esp
push eax
lea eax, [esp + 0x160]
mov dword fs:[0], eax
lea eax, [esp + 0x20]
push eax
mov esi, ecx
call fcn.00410850
xor edi, edi
mov dword [esp + 0x168], edi
xor ecx, ecx
mov dword [esp + 0x50], 7
mov dword [esp + 0x4c], edi
mov word [esp + 0x3c], cx
lea edx, [esp + 0x38]
push edx
mov byte [esp + 0x16c], 1
call fcn.0040be30
add esp, 4
test al, al
sete al
test al, al
je 0x418167
call fcn.004011a0
test al, al
jne 0x418167
push str.Setup
lea ecx, [esp + 0x1c]
call fcn.00404d30
push str.PlugInDevice
lea ecx, [esp + 0x20]
mov byte [esp + 0x16c], 2
call fcn.00404d30
lea edx, [esp + 0x18]
mov byte [esp + 0x168], 3
mov eax, dword [esi + 0xc]
mov eax, dword [eax + 8]
lea ecx, [esi + 0xc]
push edx
lea edx, [esp + 0x20]
push edx
call eax
mov esi, dword [esi + 4]
cmp dword [esi], 0x1af5
mov eax, dword [eax]
jne 0x41812e
lea ecx, [esi + 4]
cmp ecx, edi
je 0x41812e
cmp dword [ecx + 0x20], edi
je 0x41812e
push eax
push 0x3e8
call fcn.00429637
mov ecx, eax
call fcn.00429721
mov byte [esp + 0x168], 2
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418156
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x168], 1
mov eax, dword [esp + 0x18]
jmp 0x418207
push str.Setup
lea ecx, [esp + 0x20]
call fcn.00404d30
push str.ReadySetup
lea ecx, [esp + 0x1c]
mov byte [esp + 0x16c], 4
call fcn.00404d30
lea eax, [esp + 0x1c]
mov byte [esp + 0x168], 5
mov edx, dword [esi + 0xc]
mov edx, dword [edx + 8]
lea ecx, [esi + 0xc]
push eax
lea eax, [esp + 0x1c]
push eax
call edx
mov esi, dword [esi + 4]
cmp dword [esi], 0x1af5
mov eax, dword [eax]
jne 0x4181d3
lea ecx, [esi + 4]
cmp ecx, edi
je 0x4181d3
cmp dword [ecx + 0x20], edi
je 0x4181d3
push eax
push 0x3e8
call fcn.00429637
mov ecx, eax
call fcn.00429721
mov byte [esp + 0x168], 4
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4181fb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x168], 1
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418223
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebp
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [esp + 0x18], eax
lea ecx, [esp + 0x38]
push ecx
call fcn.0040be30
add esp, 4
test al, al
je 0x4182bf
push 0x103
lea edx, [esp + 0x59]
push 0
push edx
call fcn.00431a80
add esp, 0xc
mov byte [esp + 0x54], 0x71
mov byte [esp + 0x55], 0
mov byte [esp + 0x56], 0
call fcn.0041cd80
cmp eax, 4
jne 0x41827d
mov byte [esp + 0x55], 1
mov byte [esp + 0x56], 0
call fcn.0041cd80
cmp eax, 3
jne 0x418291
mov byte [esp + 0x55], 2
mov byte [esp + 0x56], 2
call fcn.0041cd80
cmp eax, 6
jne 0x4182a5
mov byte [esp + 0x55], 3
mov byte [esp + 0x56], 0
lea eax, [esp + 0x54]
push 3
push eax
lea esi, [esp + 0x40]
call fcn.0040b5e0
add esp, 8
push 0x3e8
call edi
call fcn.004011a0
mov bl, al
test bl, bl
jne 0x4182e2
push 0xc8
call edi
call ebp
sub eax, dword [esp + 0x18]
cmp eax, 0x1d4c0
jbe 0x418235
cmp dword [esp + 0x50], 8
jb 0x4182f6
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.0042123b
add esp, 4
mov eax, dword [esp + 0x2c]
xor esi, esi
xor edx, edx
mov dword [esp + 0x50], 7
mov dword [esp + 0x4c], esi
mov word [esp + 0x3c], dx
cmp eax, esi
je 0x418331
mov ecx, dword [esp + 0x18]
mov edi, dword [esp + 0x30]
push ecx
call fcn.00412560
mov edx, dword [esp + 0x30]
add esp, 4
push edx
call fcn.0042123b
add esp, 4
mov eax, dword [esp + 0x20]
push eax
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
call fcn.0042123b
add esp, 4
mov al, bl
mov ecx, dword [esp + 0x160]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x148]
xor ecx, esp
call fcn.0042eb3c
add esp, 0x158
ret