Function at 0x10045e99
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x350
mov eax, dword [0x100b5350]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
xor edi, edi
xorps xmm0, xmm0
mov dword [ebp - 0x328], ecx
mov dword [ebp - 0x31c], ebx
movlpd qword [ebp - 0x340], xmm0
mov dword [ebp - 0x338], edi
mov dword [ebp - 0x324], edi
test ecx, ecx
je 0x10045ef2
mov edx, dword [ebp + 0xc]
mov eax, edi
test edx, edx
je 0x10045ef2
cmp dword [ecx + eax*8], 0xffffffff
jne 0x10045f08
inc eax
cmp eax, edx
jb 0x10045ee7
push ebx
call fcn.100465b0
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100704e7
leave
ret
test ebx, ebx
jle 0x10045f2d
lea eax, [ebp - 0x350]
push eax
mov dword [ebp - 0x324], ebx
call fcn.1003dd2b
mov esi, eax
lea edi, [ebp - 0x340]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop ecx
xor edi, edi
mov ebx, dword [ebp - 0x328]
xor ecx, ecx
or eax, 0xffffffff
mov esi, edi
xor edx, edx
mov dword [ebp - 0x310], esi
mov dword [ebp - 0x20c], edi
mov dword [ebp - 0x108], ecx
mov dword [ebp - 0x314], eax
mov dword [ebp - 0x318], edx
xor eax, eax
cmp dword [ebx + edx*8], 0xffffffff
mov word [ebx + edx*8 + 6], ax
je 0x10046055
movzx eax, word [ebx + edx*8 + 4]
mov dword [ebp - 0x320], eax
test eax, 0x710
mov eax, dword [ebx + edx*8]
je 0x10046055
mov edx, dword [ebp - 0x314]
cmp eax, edx
cmova edx, eax
mov dword [ebp - 0x314], edx
mov edx, dword [ebp - 0x320]
test edx, 0x300
je 0x10045fda
xor edx, edx
test esi, esi
je 0x10045fb7
cmp dword [ebp + edx*4 - 0x30c], eax
je 0x10045fb7
inc edx
cmp edx, esi
jb 0x10045fa9
cmp edx, esi
jne 0x10045fd4
cmp esi, 0x40
jae 0x10045fd4
mov dword [ebp + edx*4 - 0x30c], eax
mov esi, dword [ebp - 0x310]
inc esi
mov dword [ebp - 0x310], esi
mov edx, dword [ebp - 0x320]
test dl, 0x10
je 0x10046016
xor edx, edx
test edi, edi
je 0x10045ff3
cmp dword [ebp + edx*4 - 0x208], eax
je 0x10045ff3
inc edx
cmp edx, edi
jb 0x10045fe5
cmp edx, edi
jne 0x10046010
cmp edi, 0x40
jae 0x10046010
mov dword [ebp + edx*4 - 0x208], eax
mov edi, dword [ebp - 0x20c]
inc edi
mov dword [ebp - 0x20c], edi
mov edx, dword [ebp - 0x320]
test edx, 0x600
je 0x1004604f
xor edx, edx
test ecx, ecx
je 0x10046032
cmp dword [ebp + edx*4 - 0x104], eax
je 0x10046032
inc edx
cmp edx, ecx
jb 0x10046024
cmp edx, ecx
jne 0x1004604f
cmp ecx, 0x40
jae 0x1004604f
mov dword [ebp + edx*4 - 0x104], eax
mov ecx, dword [ebp - 0x108]
inc ecx
mov dword [ebp - 0x108], ecx
mov edx, dword [ebp - 0x318]
inc edx
mov dword [ebp - 0x318], edx
cmp edx, dword [ebp + 0xc]
jb 0x10045f5a
mov ebx, dword [ebp - 0x31c]
test esi, esi
jne 0x1004607b
test edi, edi
jne 0x1004607b
test ecx, ecx
je 0x10045ef2
xor edx, edx
test ebx, ebx
lea eax, [ebp - 0x330]
cmovs eax, edx
mov dword [ebp - 0x318], eax
mov eax, dword [ebp - 0x314]
inc eax
mov dword [ebp - 0x314], eax
test ebx, ebx
jle 0x100460ca
mov eax, dword [ebp - 0x324]
cdq
mov dword [ebp - 0x31c], 0x3e8
idiv dword [ebp - 0x31c]
imul edx, edx, 0x3e8
mov dword [ebp - 0x330], eax
mov dword [ebp - 0x32c], edx
jmp 0x100460da
jne 0x100460da
and dword [ebp - 0x330], 0
and dword [ebp - 0x32c], 0
push dword [ebp - 0x318]
xor edx, edx
test ecx, ecx
lea eax, [ebp - 0x108]
cmove eax, edx
push eax
xor ecx, ecx
test edi, edi
lea eax, [ebp - 0x20c]
cmove eax, ecx
push eax
lea eax, [ebp - 0x310]
test esi, esi
cmove eax, ecx
push eax
push dword [ebp - 0x314]
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x10046190
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x10046133
cmp dword [0x100b7400], 0
jne 0x10046196
cmp eax, 0x2714
jne 0x10046196
test ebx, ebx
jle 0x10046173
lea eax, [ebp - 0x350]
push eax
call fcn.1003dd2b
sub esp, 0xc
mov edi, esp
lea esi, [ebp - 0x340]
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.1003dcef
mov ecx, ebx
sub ecx, eax
add esp, 0x20
mov dword [ebp - 0x324], ecx
test ecx, ecx
jle 0x1004618a
mov esi, dword [ebp - 0x310]
mov edi, dword [ebp - 0x20c]
mov ecx, dword [ebp - 0x108]
jmp 0x1004609b
xor ebx, ebx
mov eax, ebx
jmp 0x10046192
xor ebx, ebx
test eax, eax
jns 0x1004619e
or eax, 0xffffffff
jmp 0x10045ef9
jne 0x100461a7
xor eax, eax
jmp 0x10045ef9
mov esi, dword [ebp - 0x328]
mov eax, dword [ebp + 0xc]
mov edi, ebx
add esi, 6
xor ecx, ecx
cmp dword [esi - 6], 0xffffffff
mov word [esi], cx
je 0x10046216
lea eax, [ebp - 0x310]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x100461db
mov eax, 0x300
or word [esi], ax
lea eax, [ebp - 0x20c]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x100461f2
or word [esi], 0x10
lea eax, [ebp - 0x108]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1004620d
mov eax, 0x400
or word [esi], ax
mov eax, dword [ebp + 0xc]
cmp word [esi], bx
je 0x10046216
inc edi
add esi, 8
dec eax
mov dword [ebp + 0xc], eax
jne 0x100461b5
mov eax, edi
jmp 0x10045ef9