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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x13c
call sym._GetProcessHeap_0
mov dword [esp + 8], 0xd8
mov dword [esp + 4], 8
mov dword [esp], eax
call sym._HeapAlloc_12
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x6cb13218
mov eax, dword [ebp + 8]
lea edi, [ebx + 0x10]
mov esi, dword [ebp + 0xc]
mov ecx, 0x20
mov dword [ebp - 0x124], edi
mov dword [ebx + 0x94], eax
mov eax, dword [ebp + 0xc]
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 8], 0
mov dword [esp + 4], 1
movzx eax, word [eax]
mov dword [esp], eax
call dword [sym.imp.ws2_32.dll_socket]
sub esp, 0xc
mov dword [ebx + 8], eax
cmp eax, 0xffffffff
je 0x6cb13360
movzx edx, word [ebx + 0x10]
mov esi, 0x10
cmp dx, 2
je 0x6cb131ef
cmp dx, 0x17
setne dl
movzx esi, dl
sub esi, 1
and esi, 0x1c
mov ecx, dword [ebp + 0x10]
test ecx, ecx
jg 0x6cb13222
mov ecx, dword [ebp - 0x124]
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], ecx
call dword [sym.imp.ws2_32.dll_connect]
sub esp, 0xc
test eax, eax
jne 0x6cb132b0
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [sym.imp.ws2_32.dll_ioctlsocket]
lea edi, [ebp - 0x114]
mov dword [esp], eax
mov dword [ebp - 0x114], 1
mov dword [ebp - 0x128], edx
mov dword [esp + 8], edi
mov dword [esp + 4], 0x8004667e
call edx
mov eax, dword [ebp - 0x124]
sub esp, 0xc
mov dword [esp + 8], esi
mov dword [esp + 4], eax
mov eax, dword [ebx + 8]
mov dword [esp], eax
call dword [sym.imp.ws2_32.dll_connect]
mov edx, dword [ebp - 0x128]
sub esp, 0xc
test eax, eax
jne 0x6cb13310
mov eax, dword [ebx + 8]
mov dword [esp + 8], edi
mov dword [ebp - 0x114], 0
mov dword [esp + 4], 0x8004667e
mov dword [esp], eax
call edx
mov eax, ebx
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
sub eax, 0x2733
cmp eax, 1
jbe 0x6cb133f2
test byte [0x6cb2c098], 4
jne 0x6cb133b0
mov eax, dword [ebx + 8]
mov dword [esp], eax
call dword [sym.imp.ws2_32.dll_closesocket]
sub esp, 4
call sym._GetProcessHeap_0
mov dword [esp + 8], ebx
xor ebx, ebx
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._HeapFree_12
mov eax, ebx
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x124], edx
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
mov edx, dword [ebp - 0x124]
sub eax, 0x2733
cmp eax, 1
jbe 0x6cb13494
mov eax, dword [ebx + 8]
mov dword [esp + 8], edi
mov dword [ebp - 0x114], 0
mov dword [esp + 4], 0x8004667e
mov dword [esp], eax
call edx
sub esp, 0xc
jmp 0x6cb132c4
test byte [0x6cb2c098], 4
je 0x6cb132e0
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
mov dword [esp + 0x14], str.unable_to_create_socket___u__n
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], 0xca
mov dword [esp + 0xc], str.netconn_create
mov dword [esp + 8], 0x6cb2d4dd
mov dword [esp + 4], 0x6cb2c098
mov dword [esp], 2
call sym._ros_dbg_log
jmp 0x6cb132e0
call sym._GetLastError_0
mov dword [esp + 0x14], str.unable_to_connect_to_host___u__n
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], 0xf2
mov dword [esp + 0xc], str.netconn_create
mov dword [esp + 8], 0x6cb2d4dd
mov dword [esp + 4], 0x6cb2c098
mov dword [esp], 2
call sym._ros_dbg_log
jmp 0x6cb132d1
imul eax, dword [ebp + 0x10], 0x3e8
lea edx, [ebp - 0x11c]
mov dword [ebp - 0x11c], 0
lea edi, [ebp - 0x114]
mov dword [ebp - 0x118], eax
mov eax, dword [ebx + 8]
mov dword [ebp - 0x114], 1
mov dword [ebp - 0x110], eax
add eax, 1
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.ws2_32.dll_select]
sub esp, 0x14
test eax, eax
jg 0x6cb13218
test eax, eax
je 0x6cb13504
mov eax, dword [ebp + 0x10]
test eax, eax
jle 0x6cb132c4
mov eax, dword [ebx + 8]
mov dword [esp + 8], edi
mov dword [ebp - 0x114], 0
mov dword [esp + 4], 0x8004667e
mov dword [esp], eax
call dword [sym.imp.ws2_32.dll_ioctlsocket]
sub esp, 0xc
jmp 0x6cb132c4
imul eax, dword [ebp + 0x10], 0x3e8
lea ecx, [ebp - 0x11c]
mov dword [ebp - 0x124], edx
mov dword [ebp - 0x11c], 0
mov dword [ebp - 0x118], eax
mov eax, dword [ebx + 8]
mov dword [ebp - 0x114], 1
mov dword [ebp - 0x110], eax
add eax, 1
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 0
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.ws2_32.dll_select]
mov edx, dword [ebp - 0x124]
sub esp, 0x14
test eax, eax
jg 0x6cb1327d
jmp 0x6cb13457
mov dword [esp], 0x2ee2
call sym._SetLastError_4
mov edx, dword [ebp + 0x10]
sub esp, 4
test edx, edx
jle 0x6cb132c4
jmp 0x6cb1346a