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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff8c
push ebx
push esi
push edi
lea esi, [ebp - 4]
mov eax, 0x489ac8
call fcn.0047ac9c
push 1
push 0x409660
call sub.KERNEL32.DLL_SetConsoleCtrlHandler
xor edx, edx
mov dword [ebp - 0x60], edx
jmp 0x409a66
mov dl, 1
mov eax, dword [0x40e940]
call fcn.0041302c
mov ebx, eax
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0x44]
mov dx, 0x2c
mov eax, ebx
call fcn.00412640
mov word [ebp - 0x2c], 0xc
lea eax, [ebp - 8]
call fcn.00409a90
mov ecx, eax
mov eax, dword [0x490930]
inc dword [ebp - 0x20]
mov edi, dword [eax]
mov edx, dword [ebp - 0x60]
call dword [edi + 0xc]
lea edx, [ebp - 8]
mov eax, ebx
mov edx, dword [edx]
call fcn.00412404
dec dword [ebp - 0x20]
lea eax, [ebp - 8]
mov edx, 2
call fcn.00486ba8
mov word [ebp - 0x2c], 0x24
lea eax, [ebp - 0xc]
call fcn.00409a90
mov ecx, eax
mov eax, ebx
inc dword [ebp - 0x20]
xor edx, edx
mov edi, dword [eax]
call dword [edi + 0xc]
lea edx, [ebp - 0xc]
mov eax, esi
call fcn.00409ac0
add dword [ebp - 0x20], 2
dec dword [ebp - 0x20]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.00486ba8
mov word [ebp - 0x2c], 0x18
cmp dword [esi], 0
jne 0x409850
mov ecx, 0x489a23
jmp 0x409871
mov edi, dword [esi]
test edi, edi
je 0x40986f
movzx eax, word [edi - 0xa]
cmp eax, 2
jne 0x40986f
mov eax, esi
call fcn.0043220c
mov edx, esi
mov eax, esi
call fcn.0040b31c
mov ecx, dword [esi]
push ecx
call fcn.00409b00
pop ecx
mov dword [ebp - 0x64], eax
cmp dword [ebp - 0x64], 0xffffffff
jne 0x4098d1
push 0xffffffffffffffff
cmp dword [esi], 0
jne 0x40988f
mov edx, 0x489a24
jmp 0x4098b0
mov ebx, dword [esi]
test ebx, ebx
je 0x4098ae
movzx eax, word [ebx - 0xa]
cmp eax, 2
jne 0x4098ae
mov eax, esi
call fcn.0043220c
mov edx, esi
mov eax, esi
call fcn.0040b31c
mov edx, dword [esi]
push edx
call fcn.0040966c
add esp, 8
inc dword [ebp - 0x60]
sub dword [ebp - 0x20], 2
mov eax, esi
mov edx, 2
call fcn.00408ba8
jmp 0x409a66
push 1
call sub.KERNEL32.DLL_GetCurrentThread
push eax
call sub.KERNEL32.DLL_SetThreadAffinityMask
lea ecx, [ebp - 0x44]
push ecx
call sub.KERNEL32.DLL_QueryPerformanceFrequency
lea eax, [ebp - 0x4c]
push eax
call sub.KERNEL32.DLL_QueryPerformanceCounter
mov edx, dword [ebp + 0x18]
push edx
mov word [ebp - 0x2c], 0x30
lea eax, [ebp - 0x10]
call fcn.00409a90
mov ecx, eax
mov eax, ebx
inc dword [ebp - 0x20]
mov edx, 1
mov edi, dword [eax]
call dword [edi + 0xc]
lea eax, [ebp - 0x10]
call fcn.00486c10
push eax
call sub.WSOCK32.DLL_htons
push eax
mov edx, dword [ebp - 0x64]
push edx
call fcn.00409b2c
add esp, 0xc
mov edi, eax
dec dword [ebp - 0x20]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.00486ba8
mov word [ebp - 0x2c], 0x18
lea ecx, [ebp - 0x54]
push ecx
call sub.KERNEL32.DLL_QueryPerformanceCounter
mov dword [ebp - 0x18], ebx
cmp dword [ebp - 0x18], 0
je 0x409979
mov eax, dword [ebp - 0x18]
mov edx, dword [eax]
mov dword [ebp - 0x14], edx
mov word [ebp - 0x2c], 0x54
mov edx, 3
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x2c], 0x3c
cmp edi, 0xffffffff
je 0x409985
push edi
call fcn.00402034
pop ecx
mov eax, dword [ebp - 0x54]
mov edx, dword [ebp - 0x50]
sub eax, dword [ebp - 0x4c]
sbb edx, dword [ebp - 0x48]
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], edx
fild qword [ebp - 0x6c]
fmul dword [0x409a8c]
mov eax, dword [ebp - 0x44]
mov edx, dword [ebp - 0x40]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x70], edx
fild qword [ebp - 0x74]
fdivp st(1)
fstp qword [ebp - 0x5c]
cmp edi, 0xffffffff
jne 0x4099f3
push 0xffffffffffffffff
cmp dword [esi], 0
jne 0x4099c7
mov eax, 0x489a25
jmp 0x4099e8
mov ebx, dword [esi]
test ebx, ebx
je 0x4099e6
movzx eax, word [ebx - 0xa]
cmp eax, 2
jne 0x4099e6
mov eax, esi
call fcn.0043220c
mov edx, esi
mov eax, esi
call fcn.0040b31c
mov eax, dword [esi]
push eax
call fcn.0040966c
add esp, 8
jmp 0x409a32
fld qword [ebp - 0x5c]
call fcn.00481088
push eax
cmp dword [esi], 0
jne 0x409a08
mov edx, 0x489a26
jmp 0x409a29
mov ebx, dword [esi]
test ebx, ebx
je 0x409a27
movzx eax, word [ebx - 0xa]
cmp eax, 2
jne 0x409a27
mov eax, esi
call fcn.0043220c
mov edx, esi
mov eax, esi
call fcn.0040b31c
mov edx, dword [esi]
push edx
call fcn.0040966c
add esp, 8
inc dword [ebp - 0x60]
mov eax, dword [0x490930]
mov edx, dword [eax]
call dword [edx + 0x14]
cmp eax, dword [ebp - 0x60]
jne 0x409a49
xor ecx, ecx
mov dword [ebp - 0x60], ecx
push 0x32
call sub.KERNEL32.DLL_Sleep
sub dword [ebp - 0x20], 2
mov eax, esi
mov edx, 2
call fcn.00408ba8
mov word [ebp - 0x2c], 0
mov eax, dword [0x490930]
mov edx, dword [eax]
call dword [edx + 0x14]
cmp eax, dword [ebp - 0x60]
jg 0x4097a8
xor eax, eax
mov edx, dword [ebp - 0x3c]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret