Function at 0x1002fc44
Capabilities:
Get socket status

Disassembly:
sub esp, 0x34c
mov eax, dword [0x100a5688]
xor eax, esp
mov dword [esp + 0x348], eax
mov edx, dword [esp + 0x350]
push ebx
mov ebx, dword [esp + 0x35c]
push ebp
xor ebp, ebp
push esi
xorps xmm0, xmm0
push edi
mov dword [esp + 0x14], edx
mov dword [esp + 0x20], ebx
movlpd qword [esp + 0x2c], xmm0
mov dword [esp + 0x34], ebp
mov dword [esp + 0x18], ebp
test edx, edx
je 0x1002fca1
mov ecx, dword [esp + 0x364]
mov eax, ebp
test ecx, ecx
je 0x1002fca1
cmp dword [edx + eax*8], 0xffffffff
jne 0x1002fcc1
inc eax
cmp eax, ecx
jb 0x1002fc96
push ebx
call fcn.1003030b
pop ecx
mov ecx, dword [esp + 0x358]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1005ae75
add esp, 0x34c
ret
test ebx, ebx
jle 0x1002fce2
lea eax, [esp + 0x3c]
push eax
mov dword [esp + 0x1c], ebx
call fcn.1002799f
mov edx, dword [esp + 0x18]
mov esi, eax
lea edi, [esp + 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop ecx
movsd dword es:[edi], dword [esi]
mov esi, ebp
mov edi, ebp
mov ecx, ebp
or ebx, 0xffffffff
mov dword [esp + 0x4c], esi
mov dword [esp + 0x150], edi
mov dword [esp + 0x254], ecx
mov dword [esp + 0x10], ebx
xor eax, eax
mov word [edx + ebp*8 + 6], ax
mov eax, dword [edx + ebp*8]
cmp eax, 0xffffffff
je 0x1002fde8
movzx ebx, word [edx + ebp*8 + 4]
mov dword [esp + 0x1c], ebx
test ebx, 0x710
mov ebx, dword [esp + 0x10]
je 0x1002fde8
mov edx, dword [esp + 0x1c]
cmp eax, ebx
cmova ebx, eax
mov dword [esp + 0x10], ebx
test edx, 0x300
je 0x1002fd6d
xor edx, edx
test esi, esi
je 0x1002fd53
cmp dword [esp + edx*4 + 0x50], eax
je 0x1002fd53
inc edx
cmp edx, esi
jb 0x1002fd48
cmp edx, esi
jne 0x1002fd69
cmp esi, 0x40
jae 0x1002fd69
mov dword [esp + edx*4 + 0x50], eax
mov esi, dword [esp + 0x4c]
inc esi
mov dword [esp + 0x4c], esi
mov edx, dword [esp + 0x1c]
test dl, 0x10
je 0x1002fda9
xor edx, edx
test edi, edi
je 0x1002fd86
cmp dword [esp + edx*4 + 0x154], eax
je 0x1002fd86
inc edx
cmp edx, edi
jb 0x1002fd78
cmp edx, edi
jne 0x1002fda5
cmp edi, 0x40
jae 0x1002fda5
mov dword [esp + edx*4 + 0x154], eax
mov edi, dword [esp + 0x150]
inc edi
mov dword [esp + 0x150], edi
mov edx, dword [esp + 0x1c]
test edx, 0x600
je 0x1002fde4
xor edx, edx
test ecx, ecx
je 0x1002fdc5
cmp dword [esp + edx*4 + 0x258], eax
je 0x1002fdc5
inc edx
cmp edx, ecx
jb 0x1002fdb7
cmp edx, ecx
jne 0x1002fde4
cmp ecx, 0x40
jae 0x1002fde4
mov dword [esp + edx*4 + 0x258], eax
mov ecx, dword [esp + 0x254]
inc ecx
mov dword [esp + 0x254], ecx
mov edx, dword [esp + 0x14]
inc ebp
cmp ebp, dword [esp + 0x364]
jb 0x1002fd01
mov ebx, dword [esp + 0x20]
test esi, esi
jne 0x1002fe0a
test edi, edi
jne 0x1002fe0a
test ecx, ecx
je 0x1002fca1
xor eax, eax
test ebx, ebx
lea ebp, [esp + 0x24]
cmovs ebp, eax
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
test ebx, ebx
jle 0x1002fe43
mov eax, dword [esp + 0x18]
cdq
mov dword [esp + 0x20], 0x3e8
idiv dword [esp + 0x20]
imul edx, edx, 0x3e8
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], edx
jmp 0x1002fe4f
jne 0x1002fe4f
and dword [esp + 0x24], 0
and dword [esp + 0x28], 0
xor edx, edx
test ecx, ecx
push ebp
lea eax, [esp + 0x258]
cmove eax, edx
push eax
xor ecx, ecx
test edi, edi
lea eax, [esp + 0x158]
cmove eax, ecx
push eax
lea eax, [esp + 0x58]
test esi, esi
cmove eax, ecx
push eax
push dword [esp + 0x20]
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x1002fef8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x1002fea1
cmp dword [0x100a73d8], 0
jne 0x1002fefe
cmp eax, 0x2714
jne 0x1002fefe
test ebx, ebx
jle 0x1002fedb
lea eax, [esp + 0x3c]
push eax
call fcn.1002799f
sub esp, 0xc
mov edi, esp
lea esi, [esp + 0x3c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
sub esp, 0x10
mov esi, eax
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.10027963
mov ecx, ebx
sub ecx, eax
add esp, 0x20
mov dword [esp + 0x18], ecx
test ecx, ecx
jle 0x1002fef2
mov esi, dword [esp + 0x4c]
mov edi, dword [esp + 0x150]
mov ecx, dword [esp + 0x254]
jmp 0x1002fe1e
xor ebx, ebx
mov eax, ebx
jmp 0x1002fefa
xor ebx, ebx
test eax, eax
jns 0x1002ff06
or eax, 0xffffffff
jmp 0x1002fca8
jne 0x1002ff0f
xor eax, eax
jmp 0x1002fca8
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x364]
mov edi, ebx
add esi, 6
xor ecx, ecx
cmp dword [esi - 6], 0xffffffff
mov word [esi], cx
je 0x1002ff84
lea eax, [esp + 0x4c]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1002ff43
mov eax, 0x300
or word [esi], ax
lea eax, [esp + 0x150]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1002ff5b
or word [esi], 0x10
lea eax, [esp + 0x254]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1002ff77
mov eax, 0x400
or word [esi], ax
mov eax, dword [esp + 0x364]
cmp word [esi], bx
je 0x1002ff84
inc edi
add esi, 8
dec eax
mov dword [esp + 0x364], eax
jne 0x1002ff1f
mov eax, edi
jmp 0x1002fca8