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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
cmp dword [0x520828], 0
mov dword [ebp - 8], ecx
je 0x4781cd
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push esi
push 0x520830
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x520824]
mov esi, dword [eax]
cmp esi, eax
je 0x47804d
nop
cmp byte [esi + 0xd], 0
mov edi, dword [esi + 0x18]
jne 0x477fe7
mov eax, dword [esi + 8]
cmp byte [eax + 0xd], 0
jne 0x477fcc
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0xd], 0
jne 0x477fe7
nop dword [eax]
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0xd], 0
je 0x477fc0
jmp 0x477fe7
mov eax, dword [esi + 4]
cmp byte [eax + 0xd], 0
jne 0x477fe5
cmp esi, dword [eax + 8]
jne 0x477fe5
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0xd], 0
je 0x477fd5
mov esi, eax
cmp byte [edi + 0x58], 0
je 0x478002
call ebx
sub eax, dword [edi + 0x5c]
cmp eax, 0x7d0
jbe 0x47803b
push 5
push str.infant_socket__delete
jmp 0x47801e
cmp dword [edi + 0xb0], 2
jne 0x47803b
call ebx
sub eax, dword [edi + 0x60]
cmp eax, 0x7d0
jbe 0x47803b
push 5
push str.infant_half_connected_socket__delete
mov ecx, edi
call fcn.0047a5a0
push dword [edi + 0xb8]
mov ecx, 0x520824
push dword [edi + 0xb4]
call fcn.0047aab0
cmp esi, dword [0x520824]
jne 0x477fa0
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x520830
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x520828], 0
je 0x4781ca
cmp dword [0x520814], 0
jne 0x47807b
cmp dword [0x51f7b4], 0
je 0x4781ca
mov eax, dword [ebp - 8]
push 0xa
push dword [eax + 0x10]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [0x520814], 0
jne 0x47809f
cmp dword [0x51f7b4], 0
je 0x4781ca
cmp eax, 0xffffffff
jne 0x4780b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xa
call edi
jmp 0x4781bd
cmp eax, 0x102
je 0x4781bd
xor ebx, ebx
push 0x520830
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x520824]
mov esi, dword [eax]
cmp esi, eax
je 0x47819e
nop dword [eax]
cmp byte [esi + 0xd], 0
mov edi, dword [esi + 0x18]
jne 0x478127
mov eax, dword [esi + 8]
cmp byte [eax + 0xd], 0
jne 0x47810c
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0xd], 0
jne 0x478127
nop dword [eax]
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0xd], 0
je 0x478100
jmp 0x478127
mov eax, dword [esi + 4]
cmp byte [eax + 0xd], 0
jne 0x478125
cmp esi, dword [eax + 8]
jne 0x478125
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0xd], 0
je 0x478115
mov esi, eax
push 0
lea eax, [edi + 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
lea eax, [edi + 0x68]
push 0
setg bl
push eax
mov byte [ebp - 0x14], bl
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
lea eax, [edi + 0x6c]
push 0
setg bh
push eax
mov byte [ebp - 0x10], bh
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
setg al
mov byte [ebp - 0xc], al
test bl, bl
jne 0x478175
test bh, bh
jne 0x478175
test al, al
jne 0x478175
cmp dword [edi + 0x54], 0
jne 0x47818f
push dword [ebp - 0xc]
mov ebx, dword [ebp - 4]
lea ecx, [edi + 0x50]
push dword [ebp - 0x10]
inc ebx
push dword [ebp - 0x14]
mov dword [ebp - 4], ebx
call fcn.00477d60
jmp 0x478192
mov ebx, dword [ebp - 4]
cmp esi, dword [0x520824]
jne 0x4780e0
push 0x520830
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
test ebx, ebx
jne 0x4781b7
push 0xa
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [0x520828], 0
jne 0x477f85
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret