Function at 0x1000deb0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1ac
lea eax, [ebp - 0x190]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [ebp - 0x194], eax
mov ecx, dword [0x1001cb00]
and ecx, 0x10000
je 0x1000defb
push str.openSocketw.c:_enter_OpenSocket_n
push 0x1001c0d0
call fcn.1000e8bd
add esp, 8
push 0x1001c0d0
call fcn.1000eb4b
add esp, 4
mov word [ebp - 0x1a8], 2
mov edx, dword [0x1001cb00]
and edx, 0x10000
je 0x1000df31
push str.openSocketw.c:_1_n
push 0x1001c0d0
call fcn.1000e8bd
add esp, 8
push 0x1001c0d0
call fcn.1000eb4b
add esp, 4
mov ax, word [ebp + 8]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x1a6], ax
mov ecx, dword [0x1001cb00]
and ecx, 0x10000
je 0x1000df73
movzx edx, word [ebp - 0x1a6]
push edx
push str.openSocketw.c:_2__04X_n
call fcn.1000ea85
add esp, 8
push 0x1001c0d0
call fcn.1000eb4b
add esp, 4
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x1a4], eax
mov ecx, dword [0x1001cb00]
and ecx, 0x10000
je 0x1000dfba
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_inet_addr]
push eax
mov eax, dword [ebp + 0xc]
push eax
push str.openSocketw.c:_peer:_s_d_n
call fcn.1000ea85
add esp, 0xc
push 0x1001c0d0
call fcn.1000eb4b
add esp, 4
mov ecx, dword [0x1001cb00]
and ecx, 0x10000
je 0x1000dfe7
push str.openSocketw.c:_6_n
push 0x1001c0d0
call fcn.1000e8bd
add esp, 8
push 0x1001c0d0
call fcn.1000eb4b
add esp, 4
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x1ac], eax
mov edx, dword [0x1001cb00]
and edx, 0x10000
je 0x1000e026
push str.openSocketw.c:_7_n
push 0x1001c0d0
call fcn.1000e8bd
add esp, 8
push 0x1001c0d0
call fcn.1000eb4b
add esp, 4
mov eax, dword [0x1001cb00]
and eax, 0x10000
je 0x1000e04b
mov ecx, dword [ebp - 0x1ac]
push ecx
push str.openSocketw.c:_socket_is__d_n
push 0x1001c0d0
call fcn.1000e8bd
add esp, 0xc
mov edx, dword [0x1001cb00]
and edx, 0x10000
je 0x1000e082
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.1000efa4
add esp, 4
push eax
push str.openSocketw.c:_setsockopt__s__d_n
push 0x1001c0d0
call fcn.1000e8bd
add esp, 0x10
mov dword [ebp - 0x198], 0x10
mov eax, dword [0x1001cb00]
and eax, 0x10000
je 0x1000e0b7
push str.openSocketw.c:_8_n
push 0x1001c0d0
call fcn.1000e8bd
add esp, 8
push 0x1001c0d0
call fcn.1000eb4b
add esp, 4
mov ecx, dword [ebp - 0x198]
push ecx
lea edx, [ebp - 0x1a8]
push edx
mov eax, dword [ebp - 0x1ac]
push eax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x1000e11f
mov ecx, dword [0x1001cb00]
and ecx, 0x10000
je 0x1000e106
mov edx, dword [0x1001cb18]
push edx
call fcn.1000efa4
add esp, 4
push eax
push str.openSocketw.c:_connect_Socket_error:__s__n
push 0x1001c0d0
call fcn.1000e8bd
add esp, 0xc
mov eax, dword [ebp - 0x1ac]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebp - 0x1ac], 0
jmp 0x1000e13f
mov ecx, dword [ebp + 0xc]
push ecx
push str.openSocketw.c:_Connected_to_host:__s__n
push 0x1001c0d0
call fcn.1000e8bd
add esp, 0xc
mov dword [0x1001cb18], 0
push 0x1001c0d0
call fcn.1000eb4b
add esp, 4
mov eax, dword [ebp - 0x1ac]
mov esp, ebp
pop ebp
ret 8