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

Disassembly:
sub esp, 0x328
mov eax, dword [0x6a21bc]
xor eax, esp
mov dword [esp + 0x324], eax
mov eax, dword [esp + 0x338]
push ebx
push ebp
push esi
xor esi, esi
push edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], esi
cmp eax, 0x7fffffff
jl 0x5b67d4
mov dword [esp + 0x10], closesocket
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x33c]
mov ebp, dword [esp + 0x340]
or ebx, 0xffffffff
cmp edi, ebx
jne 0x5b681c
cmp ebp, ebx
jne 0x5b681c
cmp dword [esp + 0x344], ebx
jne 0x5b681c
cmp eax, esi
je 0x5b6815
jge 0x5b680e
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, ebx
jmp 0x5b6ad2
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
jmp 0x5b6ad2
cmp eax, esi
jle 0x5b6831
mov dword [esp + 0x14], eax
call fcn.005bf820
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
xor edx, edx
mov dword [esp + 0x230], edx
mov dword [esp + 0x28], esi
cmp edi, 0xffffffff
je 0x5b6862
mov esi, 1
mov edx, esi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x28], esi
mov dword [esp + 0x234], edi
mov dword [esp + 0x230], edx
mov ebx, edi
cmp ebp, 0xffffffff
je 0x5b68ca
xor eax, eax
test esi, esi
je 0x5b687b
lea ecx, [ecx]
cmp dword [esp + eax*4 + 0x2c], ebp
je 0x5b687b
inc eax
cmp eax, esi
jb 0x5b6870
cmp eax, esi
jne 0x5b6891
cmp esi, 0x40
jae 0x5b6891
mov dword [esp + eax*4 + 0x2c], ebp
mov esi, dword [esp + 0x28]
inc esi
mov dword [esp + 0x28], esi
xor eax, eax
test edx, edx
je 0x5b68a5
cmp dword [esp + eax*4 + 0x234], ebp
je 0x5b68a5
inc eax
cmp eax, edx
jb 0x5b6897
cmp eax, edx
jne 0x5b68c4
cmp edx, 0x40
jae 0x5b68c4
mov dword [esp + eax*4 + 0x234], ebp
mov edx, dword [esp + 0x230]
inc edx
mov dword [esp + 0x230], edx
cmp ebp, ebx
jbe 0x5b68ca
mov ebx, ebp
mov edi, dword [esp + 0x344]
xor ecx, ecx
mov dword [esp + 0x12c], ecx
cmp edi, 0xffffffff
je 0x5b692c
mov ecx, 1
xor eax, eax
mov dword [esp + 0x130], edi
mov dword [esp + 0x12c], ecx
test edx, edx
je 0x5b690f
jmp 0x5b6900
cmp dword [esp + eax*4 + 0x234], edi
je 0x5b690f
add eax, ecx
cmp eax, edx
jb 0x5b6900
cmp eax, edx
jne 0x5b6926
cmp edx, 0x40
jae 0x5b6926
mov dword [esp + eax*4 + 0x234], edi
add dword [esp + 0x230], ecx
cmp edi, ebx
jbe 0x5b692c
mov ebx, edi
mov ebp, dword [sym.imp.WS2_32.dll_select]
xor eax, eax
cmp dword [esp + 0x10], eax
lea edx, [esp + 0x20]
setl al
lea edi, [eax - 1]
and edi, edx
inc ebx
jmp 0x5b6960
mov ecx, dword [esp + 0x12c]
mov esi, dword [esp + 0x28]
jmp 0x5b6960
mov eax, dword [esp + 0x10]
xor edx, edx
cmp eax, edx
jle 0x5b6995
mov eax, 0x10624dd3
imul dword [esp + 0x14]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [esp + 0x14]
mov dword [esp + 0x20], eax
imul eax, eax, 0x3e8
sub edx, eax
imul edx, edx, 0x3e8
jmp 0x5b699b
jne 0x5b699f
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], edx
neg ecx
sbb ecx, ecx
push edi
lea edx, [esp + 0x130]
and ecx, edx
lea eax, [esp + 0x234]
push eax
neg esi
sbb esi, esi
lea eax, [esp + 0x30]
push ecx
and esi, eax
push esi
push ebx
call ebp
cmp eax, 0xffffffff
jne 0x5b6a1e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x5b69e3
cmp dword [0x7188e0], 0
jne 0x5b6a22
cmp eax, 0x2714
jne 0x5b6a22
cmp dword [esp + 0x10], 0
jle 0x5b6950
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push ecx
push edx
call fcn.005bf820
push edx
push eax
call fcn.005bf850
mov ecx, dword [esp + 0x20]
sub ecx, eax
add esp, 0x10
mov dword [esp + 0x14], ecx
test ecx, ecx
jle 0x5b6815
jmp 0x5b6950
test eax, eax
jns 0x5b6a2a
or eax, 0xffffffff
jmp 0x5b6ad2
je 0x5b6815
mov edi, dword [esp + 0x33c]
xor esi, esi
cmp edi, 0xffffffff
je 0x5b6a67
lea eax, [esp + 0x28]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5b6a52
mov esi, 1
lea ecx, [esp + 0x230]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5b6a67
or esi, 4
mov edi, dword [esp + 0x340]
cmp edi, 0xffffffff
je 0x5b6a9a
lea edx, [esp + 0x28]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5b6a85
or esi, 8
lea eax, [esp + 0x230]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5b6a9a
or esi, 4
mov edi, dword [esp + 0x344]
cmp edi, 0xffffffff
je 0x5b6ad0
lea ecx, [esp + 0x12c]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5b6abb
or esi, 2
lea edx, [esp + 0x230]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5b6ad0
or esi, 4
mov eax, esi
mov ecx, dword [esp + 0x334]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005211a0
add esp, 0x328
ret