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

Disassembly:
sub esp, 0x338
push ebx
push ebp
xor edx, edx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x35c], edx
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], edx
jl 0x5e5a65
jg 0x5e5a53
mov eax, dword [esp + 0x358]
cmp eax, 0x7fffffff
jb 0x5e5a6c
mov dword [esp + 0x358], connect
mov dword [esp + 0x35c], edx
mov eax, dword [esp + 0x358]
mov ebp, dword [esp + 0x34c]
mov ecx, dword [esp + 0x350]
cmp ebp, 0xffffffff
jne 0x5e5aa0
cmp ecx, ebp
jne 0x5e5aa0
cmp dword [esp + 0x354], ebp
jne 0x5e5aa0
push eax
call fcn.005e59f0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x338
ret
cmp dword [esp + 0x35c], edx
jl 0x5e5ae2
jg 0x5e5aaf
cmp eax, edx
jbe 0x5e5ae2
mov edi, eax
lea eax, [esp + 0x2c]
push eax
call fcn.005eefc0
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x18], ecx
mov ecx, dword [eax + 8]
mov dword [esp + 0x1c], edx
mov edx, dword [eax + 0xc]
add esp, 4
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x350]
mov dword [esp + 0x20], edx
xor edx, edx
xor esi, esi
or ebx, 0xffffffff
mov dword [esp + 0x3c], edx
mov dword [esp + 0x140], esi
cmp ebp, 0xffffffff
je 0x5e5b16
mov esi, 1
mov edx, esi
mov dword [esp + 0x144], ebp
mov dword [esp + 0x140], esi
mov dword [esp + 0x40], ebp
mov dword [esp + 0x3c], edx
mov ebx, ebp
cmp ecx, 0xffffffff
je 0x5e5b7b
xor eax, eax
test esi, esi
jbe 0x5e5b2f
cmp dword [esp + eax*4 + 0x144], ecx
je 0x5e5b2f
inc eax
cmp eax, esi
jb 0x5e5b21
cmp eax, esi
jne 0x5e5b4e
cmp esi, 0x40
jae 0x5e5b4e
mov dword [esp + eax*4 + 0x144], ecx
mov esi, dword [esp + 0x140]
inc esi
mov dword [esp + 0x140], esi
xor eax, eax
test edx, edx
jbe 0x5e5b5f
cmp dword [esp + eax*4 + 0x40], ecx
je 0x5e5b5f
inc eax
cmp eax, edx
jb 0x5e5b54
cmp eax, edx
jne 0x5e5b75
cmp edx, 0x40
jae 0x5e5b75
mov dword [esp + eax*4 + 0x40], ecx
mov edx, dword [esp + 0x3c]
inc edx
mov dword [esp + 0x3c], edx
cmp ecx, ebx
jbe 0x5e5b7b
mov ebx, ecx
mov ebp, dword [esp + 0x354]
xor ecx, ecx
mov dword [esp + 0x244], ecx
cmp ebp, 0xffffffff
je 0x5e5bd2
mov ecx, 1
xor eax, eax
mov dword [esp + 0x248], ebp
mov dword [esp + 0x244], ecx
test edx, edx
jbe 0x5e5bbb
lea esp, [esp]
cmp dword [esp + eax*4 + 0x40], ebp
je 0x5e5bbb
inc eax
cmp eax, edx
jb 0x5e5bb0
cmp eax, edx
jne 0x5e5bcc
cmp edx, 0x40
jae 0x5e5bcc
mov dword [esp + eax*4 + 0x40], ebp
inc dword [esp + 0x3c]
cmp ebp, ebx
jbe 0x5e5bd2
mov ebx, ebp
cmp dword [esp + 0x35c], 0
jg 0x5e5bfb
jl 0x5e5be8
cmp dword [esp + 0x358], 0
jae 0x5e5bfb
lea ebp, [ebx + 1]
mov ebx, dword [sym.imp.WS2_32.dll_select]
mov dword [esp + 0x10], 0
jmp 0x5e5c20
lea eax, [esp + 0x24]
lea ebp, [ebx + 1]
mov ebx, dword [sym.imp.WS2_32.dll_select]
mov dword [esp + 0x10], eax
jmp 0x5e5c20
mov ecx, dword [esp + 0x244]
mov esi, dword [esp + 0x140]
mov edi, edi
mov eax, dword [esp + 0x35c]
test eax, eax
jl 0x5e5c62
jg 0x5e5c37
cmp dword [esp + 0x358], 0
jbe 0x5e5c62
mov eax, 0x10624dd3
imul edi
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x24], eax
imul eax, eax, 0x3e8
mov edx, edi
sub edx, eax
imul edx, edx, 0x3e8
mov dword [esp + 0x28], edx
jmp 0x5e5c77
mov edx, dword [esp + 0x358]
or edx, eax
jne 0x5e5c77
xor eax, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x10]
push eax
neg ecx
sbb ecx, ecx
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x24c]
and ecx, eax
push ecx
neg esi
sbb esi, esi
lea ecx, [esp + 0x14c]
and esi, ecx
push esi
push ebp
call ebx
cmp eax, 0xffffffff
jne 0x5e5d48
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x5e5ccb
cmp dword [0x6b8fa8], 0
jne 0x5e5d4c
cmp eax, 0x2714
jne 0x5e5d4c
cmp dword [esp + 0x35c], 0
jl 0x5e5c10
jg 0x5e5ce9
cmp dword [esp + 0x358], 0
jbe 0x5e5c10
lea edx, [esp + 0x2c]
push edx
call fcn.005eefc0
mov edx, dword [esp + 0x18]
sub esp, 0xc
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [esp + 0x28]
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x2c]
mov dword [ecx + 8], edx
mov edx, dword [esp + 0x30]
mov dword [ecx + 0xc], edx
mov edx, dword [eax]
sub esp, 0x10
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov edx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
call fcn.005ef000
mov edi, dword [esp + 0x378]
sub edi, eax
add esp, 0x20
test edi, edi
jle 0x5e5d5c
jmp 0x5e5c10
test eax, eax
jge 0x5e5d5a
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x338
ret
jne 0x5e5d69
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x338
ret
mov edi, dword [esp + 0x34c]
xor esi, esi
cmp edi, 0xffffffff
je 0x5e5da0
lea ecx, [esp + 0x140]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5e5d8e
mov esi, 1
lea edx, [esp + 0x3c]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5e5da0
or esi, 4
mov edi, dword [esp + 0x350]
cmp edi, 0xffffffff
je 0x5e5dd3
lea eax, [esp + 0x140]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5e5dc1
or esi, 8
lea ecx, [esp + 0x3c]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5e5dd3
or esi, 4
mov edi, dword [esp + 0x354]
cmp edi, 0xffffffff
je 0x5e5e06
lea edx, [esp + 0x244]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5e5df4
or esi, 2
lea eax, [esp + 0x3c]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5e5e06
or esi, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x338
ret