Function at 0x481810
Capabilities:
Check for time delay via gettickcount
Get socket status

Disassembly:
sub esp, 0x324
mov eax, dword [0x5b4a28]
xor eax, esp
mov dword [esp + 0x320], eax
mov eax, dword [esp + 0x334]
push ebx
mov ebx, dword [esp + 0x32c]
push ebp
mov ebp, dword [esp + 0x334]
push esi
xor esi, esi
push edi
xor edi, edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], esi
cmp ebx, 0xffffffff
jne 0x481886
cmp ebp, ebx
jne 0x481886
cmp dword [esp + 0x340], ebx
jne 0x481886
cmp eax, esi
je 0x48187f
jge 0x481878
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
jmp 0x481b01
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
jmp 0x481b01
cmp eax, esi
jle 0x481899
mov edi, eax
call fcn.00482820
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edx
xor ecx, ecx
xor edx, edx
or esi, 0xffffffff
mov dword [esp + 0x24], ecx
mov dword [esp + 0x128], edx
cmp ebx, 0xffffffff
je 0x4818cf
mov edx, 1
mov ecx, edx
mov dword [esp + 0x12c], ebx
mov dword [esp + 0x128], edx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], ecx
mov esi, ebx
cmp ebp, 0xffffffff
je 0x481937
xor eax, eax
test edx, edx
je 0x4818ee
lea ebx, [ebx]
cmp dword [esp + eax*4 + 0x12c], ebp
je 0x4818ee
inc eax
cmp eax, edx
jb 0x4818e0
cmp eax, edx
jne 0x481905
cmp edx, 0x40
jae 0x481905
mov dword [esp + eax*4 + 0x12c], ebp
inc dword [esp + 0x128]
xor eax, eax
test ecx, ecx
je 0x48191b
jmp 0x481910
cmp dword [esp + eax*4 + 0x28], ebp
je 0x48191b
inc eax
cmp eax, ecx
jb 0x481910
cmp eax, ecx
jne 0x481931
cmp ecx, 0x40
jae 0x481931
mov dword [esp + eax*4 + 0x28], ebp
mov ecx, dword [esp + 0x24]
inc ecx
mov dword [esp + 0x24], ecx
cmp ebp, esi
jbe 0x481937
mov esi, ebp
mov edx, dword [esp + 0x340]
xor eax, eax
mov dword [esp + 0x22c], eax
cmp edx, 0xffffffff
je 0x481984
mov dword [esp + 0x230], edx
mov dword [esp + 0x22c], 1
test ecx, ecx
je 0x48196d
cmp dword [esp + eax*4 + 0x28], edx
je 0x48196d
inc eax
cmp eax, ecx
jb 0x481962
cmp eax, ecx
jne 0x48197e
cmp ecx, 0x40
jae 0x48197e
mov dword [esp + eax*4 + 0x28], edx
inc dword [esp + 0x24]
cmp edx, esi
jbe 0x481984
mov esi, edx
mov ebp, dword [sym.imp.WS2_32.dll_select]
xor ebx, ebx
cmp dword [esp + 0x10], ebx
lea eax, [esp + 0x1c]
setl bl
dec ebx
and ebx, eax
inc esi
jmp 0x4819a0
mov eax, dword [esp + 0x10]
xor ecx, ecx
cmp eax, ecx
jle 0x4819d1
mov eax, 0x10624dd3
imul edi
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x1c], eax
imul eax, eax, 0x3e8
mov ecx, edi
sub ecx, eax
imul ecx, ecx, 0x3e8
jmp 0x4819d7
jne 0x4819db
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
push ebx
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x234]
push eax
lea ecx, [esp + 0x134]
push ecx
push esi
call ebp
cmp eax, 0xffffffff
jne 0x481a54
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x481a1b
cmp dword [0x5c2f90], 0
jne 0x481870
cmp eax, 0x2714
jne 0x481870
cmp dword [esp + 0x10], 0
jle 0x4819a0
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
push edx
push eax
call fcn.00482820
push edx
push eax
call fcn.00482850
mov edi, dword [esp + 0x20]
sub edi, eax
add esp, 0x10
test edi, edi
jg 0x4819a0
xor eax, eax
jmp 0x481b01
test eax, eax
js 0x481870
je 0x48187f
mov edi, dword [esp + 0x338]
xor esi, esi
cmp edi, 0xffffffff
je 0x481a99
lea ecx, [esp + 0x128]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x481a87
mov esi, 1
lea edx, [esp + 0x24]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x481a99
or esi, 4
mov edi, dword [esp + 0x33c]
cmp edi, 0xffffffff
je 0x481acc
lea eax, [esp + 0x128]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x481aba
or esi, 8
lea ecx, [esp + 0x24]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x481acc
or esi, 4
mov edi, dword [esp + 0x340]
cmp edi, 0xffffffff
je 0x481aff
lea edx, [esp + 0x22c]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x481aed
or esi, 2
lea eax, [esp + 0x24]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x481aff
or esi, 4
mov eax, esi
mov ecx, dword [esp + 0x330]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004b2f5a
add esp, 0x324
ret