Function at 0x49fc70
Capabilities:
Connect socket
Get socket status
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x22c
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x134], 1
mov esi, dword [eax]
lea eax, [ebp - 0x134]
push eax
push 0x8004667e
push esi
call sub.ws2_32.dll_ioctlsocket
cmp eax, 0xffffffff
je 0x49fcca
mov eax, dword [ebp + 0x10]
test byte [eax], 1
je 0x49fcd4
mov edx, dword [eax + 0x18]
movups xmm0, xmmword [eax + 4]
lea ecx, [eax + 0x14]
mov bx, 0x17
mov edi, 0x1c
mov dword [ebp - 0x1c], edx
mov edx, 0x1c
jmp 0x49fcee
call sub.ws2_32.dll_WSAGetLastError
jmp 0x49fdc3
mov dword [ebp - 0x18], esi
lea ecx, [eax + 2]
xorps xmm0, xmm0
mov edi, 0x10
mov bx, 2
mov edx, 6
mov esi, dword [ebp - 0x18]
movzx eax, word [eax + edx]
mov ecx, dword [ecx]
mov word [ebp - 0x134], bx
rol ax, 8
mov word [ebp - 0x132], ax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x130], ecx
movups xmmword [ebp - 0x12c], xmm0
mov dword [ebp - 0x11c], eax
push edi
lea ebx, [ebp - 0x134]
push ebx
push esi
call sub.ws2_32.dll_connect
cmp eax, 0xffffffff
je 0x49fd50
mov byte [ebp - 0x14], 4
mov dword [ebp - 0x134], 0
push ebx
push 0x8004667e
push esi
call sub.ws2_32.dll_ioctlsocket
cmp eax, 0xffffffff
jne 0x49fdad
jmp 0x49fdbb
call sub.ws2_32.dll_WSAGetLastError
mov edi, eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x134], 0
push ebx
push 0x8004667e
push esi
call sub.ws2_32.dll_ioctlsocket
cmp eax, 0xffffffff
je 0x49fdbb
mov ecx, edi
call fcn.004a8d20
cmp al, 0xd
jne 0x49fdad
mov edi, dword [ebp + 0x14]
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x1c]
mov edx, edi
or edx, eax
or edx, ecx
jne 0x49fdd9
mov eax, dword [0x587340]
mov edi, dword [ebp + 8]
mov ecx, dword [0x587344]
mov dword [edi + 4], ecx
mov dword [edi], eax
jmp 0x49fdcc
movsd xmm0, qword [ebp - 0x14]
mov edi, dword [ebp + 8]
movsd qword [edi], xmm0
jmp 0x49fdcc
call sub.ws2_32.dll_WSAGetLastError
mov edi, dword [ebp + 8]
mov dword [edi + 4], eax
mov dword [edi], 0
mov eax, edi
add esp, 0x22c
pop esi
pop edi
pop ebx
pop ebp
ret
cmp edi, 0x7fffffff
mov edx, 0x7fffffff
cmovae edi, edx
test eax, eax
mov eax, ecx
cmovne edi, edx
mov edx, 0x10624dd3
mul edx
mov eax, 1
mov dword [ebp - 0x24], edi
shr edx, 6
test edi, edi
cmovne eax, edx
cmp ecx, 0x3e8
cmovae eax, edx
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x12c]
push 0xfc
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x230]
mov dword [ebp - 0x238], 1
mov dword [ebp - 0x234], esi
push 0xfc
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x24]
mov dword [ebp - 0x134], 1
mov dword [ebp - 0x130], esi
lea ecx, [ebp - 0x238]
push eax
push ebx
push ecx
push 0
push 1
call sub.ws2_32.dll_select
test eax, eax
je 0x49fe98
mov edi, dword [ebp + 8]
cmp eax, 0xffffffff
jne 0x49fea7
call sub.ws2_32.dll_WSAGetLastError
mov byte [edi], 0
mov byte [edi + 3], 0
mov word [edi + 1], 0
mov dword [edi + 4], eax
jmp 0x49fdcc
mov edi, dword [ebp + 8]
mov byte [edi], 2
mov dword [edi + 4], 0x58735c
jmp 0x49fedf
cmp dword [ebp - 0x238], 1
je 0x49fedc
lea eax, [ebp - 0x30]
push dword [ebp + 0xc]
push eax
call fcn.004a0810
add esp, 8
mov eax, dword [ebp - 0x2c]
cmp al, 4
setne cl
or cl, byte [ebp - 0x30]
test cl, 1
je 0x49fedc
mov ecx, dword [ebp - 0x28]
mov dword [edi], eax
mov dword [edi + 4], ecx
jmp 0x49fdcc
mov byte [edi], 4
lea eax, [ebp - 0x14]
push eax
call fcn.0045f620
add esp, 4
jmp 0x49fdcc