Function at 0x10016e80
Capabilities:
Connect socket
Get socket status
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x12c
mov eax, dword [0x10048ff4]
xor eax, esp
mov dword [esp + 0x128], eax
mov eax, dword [esp + 0x130]
push esi
mov esi, ecx
mov dword [esp + 8], eax
mov eax, dword [esi]
cmp eax, 0xffffffff
jne 0x10016ed5
push str._CSock_invalid_socket_r_n
push str.ppsjy:
call fcn.10015a10
add esp, 8
xor eax, eax
pop esi
mov ecx, dword [esp + 0x128]
xor ecx, esp
call fcn.100233b7
add esp, 0x12c
ret 8
push ebx
mov ebx, dword [sym.imp.WS2_32.dll_ioctlsocket]
lea ecx, [esp + 8]
push ecx
push 0x8004667e
push eax
mov dword [esp + 0x14], 1
call ebx
cmp eax, 0xffffffff
jne 0x10016f16
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._CSock_ioctlsocket_enable_error:_d_r_n
push str.ppsjy:
call fcn.10015a10
add esp, 0xc
xor eax, eax
jmp 0x10017105
push ebp
push edi
push str.127.0.0.1
call dword [sym.imp.WS2_32.dll_inet_addr]
mov edx, 2
push 0x1f98
mov edi, eax
mov word [esp + 0x12c], dx
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esi]
mov word [esp + 0x12a], ax
push 0x10
lea eax, [esp + 0x12c]
push eax
push ecx
mov dword [esp + 0x138], edi
call dword [sym.imp.WS2_32.dll_connect]
mov ebp, dword [sym.imp.WS2_32.dll_WSAGetLastError]
xor edi, edi
cmp eax, 0xffffffff
jne 0x10017031
call ebp
cmp eax, 0x2733
je 0x10016f95
call ebp
push eax
push str.connect_error:_d_r_n
push str.ppsjy:
call fcn.10015a10
add esp, 0xc
xor eax, eax
jmp 0x10017103
mov edx, dword [esi]
lea eax, [esp + 0x1c]
push eax
push edi
lea ecx, [esp + 0x2c]
push ecx
push edi
push edi
mov dword [esp + 0x3c], edx
mov dword [esp + 0x38], 1
mov dword [esp + 0x30], 3
mov dword [esp + 0x34], edi
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x10016fe3
call ebp
push eax
push str._CSock_select_error:_d_r_n
push str.ppsjy:
call fcn.10015a10
add esp, 0xc
xor eax, eax
jmp 0x10017103
cmp eax, edi
jne 0x10017000
push str._CSock_select_timeout_r_n
push str.ppsjy:
call fcn.10015a10
add esp, 8
xor eax, eax
jmp 0x10017103
mov eax, dword [esi]
lea edx, [esp + 0x24]
push edx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x1001702a
push str._CSock_fd_isset_error_r_n
push str.ppsjy:
call fcn.10015a10
add esp, 8
xor eax, eax
jmp 0x10017103
push str._CSock_success:connected_in_nonblocking_mode_r_n
jmp 0x10017036
push str._CSock_success:connected_immediately_r_n
push str.ppsjy:
call fcn.10015a10
mov edx, dword [esi]
add esp, 8
lea ecx, [esp + 0x10]
push ecx
push 0x8004667e
push edx
mov dword [esp + 0x1c], edi
call ebx
cmp eax, 0xffffffff
jne 0x10017077
call ebp
push eax
push str._CSock_ioctlsocket_disable_error:_d_r_n
push str.ppsjy:
call fcn.10015a10
add esp, 0xc
xor eax, eax
jmp 0x10017103
mov ecx, dword [esi]
push 4
lea eax, [esp + 0x1c]
push eax
push 0x1005
push 0xffff
push ecx
mov dword [esp + 0x2c], 0x7d0
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x100170b7
call ebp
push eax
push str._CSock_setsockopt_error:_d_r_n
push str.ppsjy:
call fcn.10015a10
add esp, 0xc
xor eax, eax
jmp 0x10017103
mov edx, dword [esp + 0x144]
mov eax, dword [esp + 0x14]
mov ecx, dword [esi]
push edi
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x100170ec
call ebp
push eax
push str._CSock_send_error:_d_r_n
push str.ppsjy:
call fcn.10015a10
add esp, 0xc
xor eax, eax
jmp 0x10017103
push str._CSock_send_successfully_r_n
push str.ppsjy:
call fcn.10015a10
add esp, 8
mov eax, 1
pop edi
pop ebp
mov ecx, dword [esp + 0x130]
pop ebx
pop esi
xor ecx, esp
call fcn.100233b7
add esp, 0x12c
ret 8