Function at 0x1002d0ad
Capabilities:
Get socket status

Disassembly:
sub esp, 0x340
mov edx, dword [esp + 0x344]
push ebx
push ebp
xor ebp, ebp
push esi
xorps xmm0, xmm0
push edi
movlpd qword [esp + 0x24], xmm0
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x18], ebp
test edx, edx
je 0x1002d0ed
mov ecx, dword [esp + 0x358]
mov eax, ebp
test ecx, ecx
je 0x1002d0ed
cmp dword [edx + eax*8], 0xffffffff
jne 0x1002d105
inc eax
cmp eax, ecx
jb 0x1002d0e2
push dword [esp + 0x35c]
call fcn.1002d73f
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x340
ret
mov ebx, dword [esp + 0x35c]
test ebx, ebx
jle 0x1002d130
lea eax, [esp + 0x34]
push eax
mov dword [esp + 0x1c], ebx
call fcn.100309e4
mov edx, dword [esp + 0x358]
mov esi, eax
lea edi, [esp + 0x28]
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 + 0x44], esi
mov dword [esp + 0x148], edi
mov dword [esp + 0x24c], 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 0x1002d239
movzx ebx, word [edx + ebp*8 + 4]
mov dword [esp + 0x14], ebx
test ebx, 0x710
mov ebx, dword [esp + 0x10]
je 0x1002d239
mov edx, dword [esp + 0x14]
cmp eax, ebx
cmova ebx, eax
mov dword [esp + 0x10], ebx
test edx, 0x300
je 0x1002d1bb
xor edx, edx
test esi, esi
je 0x1002d1a1
cmp dword [esp + edx*4 + 0x48], eax
je 0x1002d1a1
inc edx
cmp edx, esi
jb 0x1002d196
cmp edx, esi
jne 0x1002d1b7
cmp esi, 0x40
jae 0x1002d1b7
mov dword [esp + edx*4 + 0x48], eax
mov esi, dword [esp + 0x44]
inc esi
mov dword [esp + 0x44], esi
mov edx, dword [esp + 0x14]
test dl, 0x10
je 0x1002d1f7
xor edx, edx
test edi, edi
je 0x1002d1d4
cmp dword [esp + edx*4 + 0x14c], eax
je 0x1002d1d4
inc edx
cmp edx, edi
jb 0x1002d1c6
cmp edx, edi
jne 0x1002d1f3
cmp edi, 0x40
jae 0x1002d1f3
mov dword [esp + edx*4 + 0x14c], eax
mov edi, dword [esp + 0x148]
inc edi
mov dword [esp + 0x148], edi
mov edx, dword [esp + 0x14]
test edx, 0x600
je 0x1002d232
xor edx, edx
test ecx, ecx
je 0x1002d213
cmp dword [esp + edx*4 + 0x250], eax
je 0x1002d213
inc edx
cmp edx, ecx
jb 0x1002d205
cmp edx, ecx
jne 0x1002d232
cmp ecx, 0x40
jae 0x1002d232
mov dword [esp + edx*4 + 0x250], eax
mov ecx, dword [esp + 0x24c]
inc ecx
mov dword [esp + 0x24c], ecx
mov edx, dword [esp + 0x354]
inc ebp
cmp ebp, dword [esp + 0x358]
jb 0x1002d14f
mov ebx, dword [esp + 0x35c]
test esi, esi
jne 0x1002d260
test edi, edi
jne 0x1002d260
test ecx, ecx
jne 0x1002d260
push ebx
jmp 0x1002d0f4
xor eax, eax
test ebx, ebx
lea ebp, [esp + 0x1c]
cmovs ebp, eax
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x14], eax
test ebx, ebx
jle 0x1002d299
mov eax, dword [esp + 0x18]
cdq
mov dword [esp + 0x10], 0x3e8
idiv dword [esp + 0x10]
imul edx, edx, 0x3e8
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], edx
jmp 0x1002d2a5
jne 0x1002d2a5
and dword [esp + 0x1c], 0
and dword [esp + 0x20], 0
xor edx, edx
test ecx, ecx
push ebp
lea eax, [esp + 0x250]
cmove eax, edx
push eax
xor ecx, ecx
test edi, edi
lea eax, [esp + 0x150]
cmove eax, ecx
push eax
lea eax, [esp + 0x50]
test esi, esi
cmove eax, ecx
push eax
push dword [esp + 0x24]
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x1002d34e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x1002d2f7
cmp dword [0x1009ab10], 0
jne 0x1002d354
cmp eax, 0x2714
jne 0x1002d354
test ebx, ebx
jle 0x1002d331
lea eax, [esp + 0x34]
push eax
call fcn.100309e4
sub esp, 0xc
mov edi, esp
lea esi, [esp + 0x34]
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.10030a6f
mov ecx, ebx
sub ecx, eax
add esp, 0x20
mov dword [esp + 0x18], ecx
test ecx, ecx
jle 0x1002d348
mov esi, dword [esp + 0x44]
mov edi, dword [esp + 0x148]
mov ecx, dword [esp + 0x24c]
jmp 0x1002d274
xor ebx, ebx
mov eax, ebx
jmp 0x1002d350
xor ebx, ebx
test eax, eax
jns 0x1002d35c
or eax, 0xffffffff
jmp 0x1002d0fa
jne 0x1002d365
xor eax, eax
jmp 0x1002d0fa
mov esi, dword [esp + 0x354]
mov eax, dword [esp + 0x358]
mov edi, ebx
add esi, 6
xor ecx, ecx
cmp dword [esi - 6], 0xffffffff
mov word [esi], cx
je 0x1002d3dd
lea eax, [esp + 0x44]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1002d39c
mov eax, 0x300
or word [esi], ax
lea eax, [esp + 0x148]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1002d3b4
or word [esi], 0x10
lea eax, [esp + 0x24c]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1002d3d0
mov eax, 0x400
or word [esi], ax
mov eax, dword [esp + 0x358]
cmp word [esi], bx
je 0x1002d3dd
inc edi
add esi, 8
dec eax
mov dword [esp + 0x358], eax
jne 0x1002d378
mov eax, edi
jmp 0x1002d0fa