Function at 0x402750
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x598ff8
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push esi
mov eax, dword [0x601018]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
cmp dword [edi + 0x1058], 0
je 0x4029bd
mov dword [esp + 0xc], 3
mov ecx, 1
cmp dword [esp + 0xc], ecx
jne 0x4027bc
push str.stop
lea ebx, [edi + 0x450]
lea edx, [edi + 0x28]
call fcn.0042b270
add esp, 4
xor eax, eax
mov dword [edi + 0x2c], eax
mov dword [edi + 0x850], eax
mov eax, dword [edi + 0xc]
mov esi, dword [eax]
cmp esi, eax
je 0x4029a9
lea eax, [edi + 0x20]
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx]
test eax, eax
je 0x4027e1
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea edx, [esp + 0x14]
mov dword [esp + 0x48], 0
mov ebx, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
push edx
call ebx
test eax, eax
jne 0x402802
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
cmp dword [edi + 0xc54], 0
je 0x40289a
lea eax, [esp + 0x2c]
push eax
call ebx
test eax, eax
jne 0x402822
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
lea ecx, [esp + 0x1c]
push ecx
call ebx
test eax, eax
jne 0x402839
xor ecx, ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], eax
jmp 0x402841
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
sub ecx, dword [esp + 0x14]
push 0
sbb eax, dword [esp + 0x1c]
push 0x3e8
push eax
push ecx
call fcn.00596e30
mov ecx, dword [0x61023c]
push ecx
mov ecx, dword [0x610238]
push ecx
push edx
push eax
call fcn.00596bf0
cmp dword [esi + 0x20], 0x10
lea ecx, [esi + 0xc]
jb 0x402877
mov ecx, dword [ecx]
push edx
mov edx, dword [esp + 0x10]
push eax
push edx
push ecx
push str.lowering___s__to_run_level___d_
lea ebx, [edi + 0x450]
lea edx, [edi + 0x28]
mov ecx, 1
call fcn.0042b270
add esp, 0x14
mov ecx, dword [esi + 0x28]
mov eax, dword [ecx]
mov ebx, dword [esp + 0xc]
mov edx, dword [eax + 0xc]
push ebx
call edx
cmp dword [edi + 0xc54], 0
je 0x402945
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
jne 0x4028cd
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
lea ecx, [esp + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
jne 0x4028e8
xor ecx, ecx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], eax
jmp 0x4028f0
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
sub ecx, dword [esp + 0x14]
push 0
sbb eax, dword [esp + 0x1c]
push 0x3e8
push eax
push ecx
call fcn.00596e30
mov ecx, dword [0x61023c]
push ecx
mov ecx, dword [0x610238]
push ecx
push edx
push eax
call fcn.00596bf0
cmp dword [esi + 0x20], 0x10
lea ecx, [esi + 0xc]
jb 0x402926
mov ecx, dword [ecx]
push edx
push eax
push ebx
push ecx
push str.lowered___s__to_run_level___d__took___I64d__ms
lea ebx, [edi + 0x450]
lea edx, [edi + 0x28]
mov ecx, 1
call fcn.0042b270
add esp, 0x14
cmp byte [esi + 0x31], 0
jne 0x402987
mov eax, dword [esi + 8]
cmp byte [eax + 0x31], 0
jne 0x40296c
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x31], 0
jne 0x402987
mov edi, edi
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x31], 0
je 0x402960
jmp 0x402987
mov eax, dword [esi + 4]
cmp byte [eax + 0x31], 0
jne 0x402985
cmp esi, dword [eax + 8]
jne 0x402985
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x31], 0
je 0x402975
mov esi, eax
mov dword [esp + 0x48], 0xffffffff
mov edx, dword [esp + 0x10]
mov eax, dword [edx]
test eax, eax
je 0x4029a0
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp esi, dword [edi + 0xc]
jne 0x4027d0
dec dword [esp + 0xc]
jns 0x402790
mov dword [edi + 0x1058], 0
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret