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

Disassembly:
sub esp, 0x12c
mov eax, dword [0x10048f54]
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 0x10017145
push str._CSock_invalid_socket_r_n
push str.ppsjy:
call fcn.10015c20
add esp, 8
xor eax, eax
pop esi
mov ecx, dword [esp + 0x128]
xor ecx, esp
call fcn.100234f7
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 0x10017186
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._CSock_ioctlsocket_enable_error:_d_r_n
push str.ppsjy:
call fcn.10015c20
add esp, 0xc
xor eax, eax
jmp 0x10017379
push ebp
push edi
push str.127.0.0.1
call dword [sym.imp.WS2_32.dll_inet_addr]
mov edi, eax
call fcn.10016d20
movzx eax, ax
mov edx, 2
push 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 0x100172a5
call ebp
cmp eax, 0x2733
je 0x10017209
call ebp
push eax
push str.connect_error:_d_r_n
push str.ppsjy:
call fcn.10015c20
add esp, 0xc
xor eax, eax
jmp 0x10017377
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 0x10017257
call ebp
push eax
push str._CSock_select_error:_d_r_n
push str.ppsjy:
call fcn.10015c20
add esp, 0xc
xor eax, eax
jmp 0x10017377
cmp eax, edi
jne 0x10017274
push str._CSock_select_timeout_r_n
push str.ppsjy:
call fcn.10015c20
add esp, 8
xor eax, eax
jmp 0x10017377
mov eax, dword [esi]
lea edx, [esp + 0x24]
push edx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x1001729e
push str._CSock_fd_isset_error_r_n
push str.ppsjy:
call fcn.10015c20
add esp, 8
xor eax, eax
jmp 0x10017377
push str._CSock_success:connected_in_nonblocking_mode_r_n
jmp 0x100172aa
push str._CSock_success:connected_immediately_r_n
push str.ppsjy:
call fcn.10015c20
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 0x100172eb
call ebp
push eax
push str._CSock_ioctlsocket_disable_error:_d_r_n
push str.ppsjy:
call fcn.10015c20
add esp, 0xc
xor eax, eax
jmp 0x10017377
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 0x1001732b
call ebp
push eax
push str._CSock_setsockopt_error:_d_r_n
push str.ppsjy:
call fcn.10015c20
add esp, 0xc
xor eax, eax
jmp 0x10017377
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 0x10017360
call ebp
push eax
push str._CSock_send_error:_d_r_n
push str.ppsjy:
call fcn.10015c20
add esp, 0xc
xor eax, eax
jmp 0x10017377
push str._CSock_send_successfully_r_n
push str.ppsjy:
call fcn.10015c20
add esp, 8
mov eax, 1
pop edi
pop ebp
mov ecx, dword [esp + 0x130]
pop ebx
pop esi
xor ecx, esp
call fcn.100234f7
add esp, 0x12c
ret 8