Function at 0x4028a3
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1018
call fcn.0046ad30
mov dword [ebp - 0x80c], 0
mov dword [ebp - 0x404], 0
cmp dword [ebp - 0x80c], 0x100
jae 0x402909
lea eax, [ebp - 0x80c]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 8]
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x402909
mov eax, dword [ebp - 0x80c]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 8]
mov dword [ebp + eax*4 - 0x808], edx
mov eax, dword [ebp - 0x80c]
add eax, 1
mov dword [ebp - 0x80c], eax
xor ecx, ecx
test ecx, ecx
jne 0x4028c4
cmp dword [ebp - 0x404], 0x100
jae 0x402954
lea edx, [ebp - 0x404]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x402954
mov edx, dword [ebp - 0x404]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
mov dword [ebp + edx*4 - 0x400], ecx
mov edx, dword [ebp - 0x404]
add edx, 1
mov dword [ebp - 0x404], edx
xor eax, eax
test eax, eax
jne 0x40290f
push 0
push 0
lea ecx, [ebp - 0x404]
push ecx
lea edx, [ebp - 0x80c]
push edx
push 0
call sub.WS2_32.dll_select
mov dword [ebp - 0x408], eax
cmp dword [ebp - 0x408], 0
jge 0x402998
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 4
je 0x402998
mov eax, dword [ebp + 8]
push eax
call fcn.00405f6d
add esp, 4
cmp dword [ebp - 0x408], 0
jle 0x40295a
lea ecx, [ebp - 0x80c]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 8]
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x402b10
lea ecx, [ebp - 0x1014]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x534]
push eax
call fcn.00409247
add esp, 8
test eax, eax
jge 0x4029e5
mov ecx, dword [ebp + 8]
push ecx
call fcn.00405f6d
add esp, 4
mov edx, dword [ebp - 0x1014]
mov dword [ebp - 0x1018], edx
cmp dword [ebp - 0x1018], 0x20
jge 0x402a04
mov dword [ebp - 0x1018], 0x20
cmp dword [ebp - 0x1018], 0x800
jle 0x402a1a
mov dword [ebp - 0x1018], 0x800
mov eax, dword [ebp - 0x1018]
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
shl eax, 5
mov dword [ebp - 0x1018], eax
mov eax, dword [ebp - 0x1018]
push eax
lea ecx, [ebp - 0x100c]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00403161
add esp, 0xc
lea eax, [ebp - 0x100c]
mov dword [ebp - 0x1010], eax
cmp dword [ebp - 0x1018], 0
jle 0x402b10
mov ecx, dword [ebp - 0x1010]
xor edx, edx
mov dl, byte [ecx]
cmp edx, 1
jne 0x402ab7
mov eax, dword [ebp - 0x1018]
mov dword [ebp - 0x1014], eax
push 1
lea ecx, [ebp - 0x1014]
push ecx
mov edx, dword [ebp - 0x1010]
push edx
mov eax, dword [ebp - 0x1010]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004041f4
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov edx, dword [ebp - 0x1014]
mov dword [ebp - 0x1018], edx
jmp 0x402b0b
mov eax, dword [ebp - 0x1010]
xor ecx, ecx
mov cl, byte [eax]
test ecx, ecx
jne 0x402ada
mov edx, dword [ebp - 0x1010]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00405e69
add esp, 8
jmp 0x402aed
mov ecx, dword [ebp - 0x1010]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.004049a9
add esp, 8
mov eax, dword [ebp - 0x1010]
add eax, 0x20
mov dword [ebp - 0x1010], eax
mov ecx, dword [ebp - 0x1018]
sub ecx, 0x20
mov dword [ebp - 0x1018], ecx
jmp 0x402a58
lea edx, [ebp - 0x404]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x402b29
jmp 0x402b2e
jmp 0x4028c4
mov esp, ebp
pop ebp
ret