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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1054
call fcn.004067c0
mov eax, dword [0x40d018]
xor eax, ebp
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x1054], ecx
mov dword [ebp - 0x10], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x1024], 0
mov dword [ebp - 0x1034], 0xffff
mov dword [ebp - 0x1030], 1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x1054]
mov byte [eax + 8], 0
mov ecx, dword [ebp - 0x1054]
mov edx, dword [ecx + 4]
mov dword [ebp - 0x102c], edx
mov eax, 1
test eax, eax
je 0x4052d6
cmp dword [ebp + 8], 0
je 0x405039
mov ecx, dword [ebp - 0x1054]
call fcn.00405590
push 0x1000
lea ecx, [ebp - 0x1020]
push ecx
mov edx, dword [ebp - 0x1054]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x1054]
mov edx, dword [eax + 8]
call edx
mov dword [ebp - 0x1028], eax
cmp dword [ebp - 0x1028], 0
jge 0x40511d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x1038], eax
cmp dword [ebp - 0x1038], 0x2733
je 0x4050bd
cmp dword [ebp - 0x1038], 0x271e
je 0x4050bd
cmp dword [ebp - 0x10], 0
je 0x4050b4
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x1040], eax
mov ecx, dword [ebp - 0x1040]
push ecx
call sub.mfc90.dll_Ordinal_266
add esp, 4
mov dword [ebp - 0x10], 0
xor eax, eax
jmp 0x4052f6
cmp dword [ebp - 0x1038], 0x2733
jne 0x405118
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x102c]
jbe 0x405110
cmp dword [ebp - 0x10], 0
je 0x4050ff
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x1044], edx
mov eax, dword [ebp - 0x1044]
push eax
call sub.mfc90.dll_Ordinal_266
add esp, 4
mov dword [ebp - 0x10], 0
mov ecx, dword [ebp - 0x1054]
mov byte [ecx + 8], 1
xor eax, eax
jmp 0x4052f6
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4052d1
cmp dword [ebp - 0x1028], 0
jne 0x405169
cmp dword [ebp - 8], 0xa
jl 0x40515c
mov edx, dword [ebp - 0x10]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
movzx ecx, word [eax + 6]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
mov edx, dword [ebp - 4]
mov word [edx + 6], ax
mov eax, dword [ebp - 4]
movzx ecx, word [eax + 8]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
mov edx, dword [ebp - 4]
mov word [edx + 8], ax
mov eax, dword [ebp - 0x10]
jmp 0x4052f6
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x1028]
mov byte [ebp + eax - 0x1020], 0
mov ecx, dword [ebp - 8]
add ecx, dword [ebp - 0x1028]
cmp dword [ebp - 0x1024], ecx
jg 0x40520d
mov edx, dword [ebp - 0x1024]
add edx, 0x4000
mov dword [ebp - 0x1024], edx
mov eax, dword [ebp - 0x1024]
add eax, 1
push eax
call sub.mfc90.dll_Ordinal_265
add esp, 4
mov dword [ebp - 0x1048], eax
mov ecx, dword [ebp - 0x1048]
mov dword [ebp - 0x103c], ecx
cmp dword [ebp - 0x103c], 0
jne 0x4051d5
jmp 0x4052d6
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x103c]
push ecx
call sub.MSVCR90.dll_memcpy
add esp, 0xc
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x104c], edx
mov eax, dword [ebp - 0x104c]
push eax
call sub.mfc90.dll_Ordinal_266
add esp, 4
mov ecx, dword [ebp - 0x103c]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x1028]
push edx
lea eax, [ebp - 0x1020]
push eax
mov ecx, dword [ebp - 0x10]
add ecx, dword [ebp - 8]
push ecx
call sub.MSVCR90.dll_memcpy
add esp, 0xc
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0x1028]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 8]
mov byte [eax], 0
cmp dword [ebp - 0x1030], 0
je 0x405291
cmp dword [ebp - 8], 0xa
jl 0x405291
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 4], ecx
mov edx, 0x407688
mov eax, dword [ebp - 4]
mov cx, word [eax]
cmp cx, word [edx]
jne 0x40528f
mov edx, dword [ebp - 4]
mov eax, dword [edx + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohl]
mov ecx, dword [ebp - 4]
mov dword [ecx + 2], eax
mov edx, dword [ebp - 4]
mov eax, dword [edx + 2]
mov dword [ebp - 0x1034], eax
mov dword [ebp - 0x1030], 0
jmp 0x405291
jmp 0x4052d6
mov ecx, dword [ebp - 0x1034]
cmp ecx, dword [ebp - 8]
jg 0x4052d1
mov edx, dword [ebp - 0x10]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
movzx ecx, word [eax + 6]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
mov edx, dword [ebp - 4]
mov word [edx + 6], ax
mov eax, dword [ebp - 4]
movzx ecx, word [eax + 8]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
mov edx, dword [ebp - 4]
mov word [edx + 8], ax
mov eax, dword [ebp - 0x10]
jmp 0x4052f6
jmp 0x40501b
cmp dword [ebp - 0x10], 0
je 0x4052f4
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x1050], eax
mov ecx, dword [ebp - 0x1050]
push ecx
call sub.mfc90.dll_Ordinal_266
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00405de0
mov esp, ebp
pop ebp
ret 4