Function at 0x4e9d40
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
push 0xffffffffffffffff
push 0x60937b
mov eax, dword fs:[0]
push eax
sub esp, 0x30c
mov eax, dword [0x698b9c]
xor eax, ebp
mov dword [ebp - 0x34], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x318], ecx
cmp dword [ebp + 0x10], 0xc
je 0x4e9d81
mov eax, 7
jmp 0x4ea2fa
mov ecx, dword [ebp - 0x318]
call fcn.0050bfe0
cmp eax, 0xffffffff
je 0x4e9d9b
mov eax, 6
jmp 0x4ea2fa
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
push 0
push 1
push 2
call sub.WS2_32.dll_socket
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x4e9df6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x276d
jne 0x4e9dee
mov ecx, dword [ebp - 0x318]
mov ecx, dword [ecx + 0x10]
call fcn.004ea450
mov ecx, eax
call fcn.004ed680
lea edx, [ebp - 0x2ec]
push edx
push 0x101
call sub.WS2_32.dll_WSAStartup
test eax, eax
jne 0x4e9dee
jmp 0x4e9da1
or eax, 0xffffffff
jmp 0x4ea2fa
push 1
mov eax, dword [ebp - 0x14]
push eax
call fcn.004ea320
add esp, 8
cmp eax, 0xffffffff
jne 0x4e9e1a
mov ecx, dword [ebp - 0x14]
push ecx
call sub.WS2_32.dll_closesocket
or eax, 0xffffffff
jmp 0x4ea2fa
push 0x615bf4
call fcn.005c5422
add esp, 4
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4e9e52
push 0x615c04
push pe_nt_image_headers32
lea edx, [ebp - 0x134]
push edx
call fcn.00403460
add esp, 0xc
lea eax, [ebp - 0x134]
mov dword [ebp - 0x10], eax
push 0
mov ecx, dword [ebp - 0x10]
push ecx
lea ecx, [ebp - 0x158]
call fcn.004022d0
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x18]
cmp dword [edx + 8], 0
jne 0x4e9f5c
push 0
push 0x615c10
push 0x615c18
lea ecx, [ebp - 0x158]
call fcn.004042a0
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x4e9f5c
push 0
push 0x615c20
push 0x615c28
lea ecx, [ebp - 0x158]
call fcn.004042f0
mov dword [ebp - 0x28], eax
push 0
push 0x615c30
push 0x615c38
lea ecx, [ebp - 0x158]
call fcn.004042a0
mov dword [ebp - 0x24], eax
push 0
push 0x615c40
push 0x615c48
lea ecx, [ebp - 0x158]
call fcn.004042f0
mov dword [ebp - 0x20], eax
push 0
push 0x615c50
push 0x615c58
lea ecx, [ebp - 0x158]
call fcn.004042f0
mov dword [ebp - 0x2f0], eax
cmp dword [ebp - 0x2f0], 0
je 0x4e9f39
push pe_nt_image_headers32
lea eax, [ebp - 0x134]
push eax
mov ecx, dword [ebp - 0x2f0]
push ecx
call fcn.004039c0
add esp, 0xc
test eax, eax
jbe 0x4e9f39
lea edx, [ebp - 0x134]
mov dword [ebp - 0x1c], edx
jmp 0x4e9f53
push 0
push 0x615c60
push 0x615c68
lea ecx, [ebp - 0x158]
call fcn.004042f0
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x2c]
mov dword [eax + 8], ecx
mov edx, dword [ebp - 0x18]
cmp dword [edx + 8], 0
je 0x4ea0cf
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 8]
cmp dword [ecx], 0
je 0x4ea0cf
mov dword [ebp - 0x2f4], 0
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 8]
cmp dword [eax], 1
jne 0x4e9fdf
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp - 0x18]
movzx eax, word [edx + 4]
push eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
push edx
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 8]
mov edx, dword [ecx + 0x10]
push edx
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 8]
mov edx, dword [ecx + 0xc]
push edx
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 8]
movzx edx, word [ecx + 8]
push edx
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 8]
mov edx, dword [ecx + 4]
push edx
mov eax, dword [ebp - 0x14]
push eax
call fcn.00408a20
add esp, 0x20
mov dword [ebp - 0x2f4], eax
jmp 0x4ea091
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 8]
cmp dword [edx], 2
jne 0x4ea039
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp - 0x18]
movzx edx, word [ecx + 4]
push edx
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
push ecx
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 8]
mov ecx, dword [eax + 0x10]
push ecx
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 8]
mov ecx, dword [eax + 0xc]
push ecx
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 8]
movzx ecx, word [eax + 8]
push ecx
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 8]
mov ecx, dword [eax + 4]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call fcn.00408e90
add esp, 0x20
mov dword [ebp - 0x2f4], eax
jmp 0x4ea091
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 8]
cmp dword [ecx], 3
jne 0x4ea091
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp - 0x18]
movzx ecx, word [eax + 4]
push ecx
mov edx, dword [ebp - 0x18]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 8]
mov eax, dword [edx + 0x10]
push eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 8]
mov eax, dword [edx + 0xc]
push eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 8]
movzx eax, word [edx + 8]
push eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 8]
mov eax, dword [edx + 4]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.00409080
add esp, 0x20
mov dword [ebp - 0x2f4], eax
cmp dword [ebp - 0x2f4], 0
jne 0x4ea0ca
mov edx, dword [ebp - 0x14]
push edx
call sub.WS2_32.dll_closesocket
mov dword [ebp - 0x308], 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x158]
call fcn.00402380
mov eax, dword [ebp - 0x308]
jmp 0x4ea2fa
jmp 0x4ea26b
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
push ecx
call fcn.00408710
add esp, 4
mov dword [ebp - 0x300], eax
mov edx, dword [ebp - 0x18]
movzx eax, word [edx + 4]
push eax
call sub.WS2_32.dll_htons
mov word [ebp - 0x302], ax
mov ecx, 2
mov word [ebp - 0x304], cx
cmp dword [ebp - 0x300], 0xffffffff
jne 0x4ea161
mov edx, dword [ebp - 0x14]
push edx
call sub.WS2_32.dll_closesocket
cmp dword [0x69aaa4], 1
jg 0x4ea13a
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
push ecx
push str.NS_Channel_Tcp::Connect__s_cant_be_resolved.
push 0x7c
push 0x615ca0
push 1
call fcn.00401310
add esp, 0x14
mov dword [ebp - 0x30c], 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x158]
call fcn.00402380
mov eax, dword [ebp - 0x30c]
jmp 0x4ea2fa
cmp dword [0x69aaa4], 1
jg 0x4ea197
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 4]
push eax
mov ecx, dword [ebp - 0x300]
push ecx
call sub.WS2_32.dll_inet_ntoa
push eax
push str.NS_Channel_Tcp::Connect_Socket_connecting_to__s:_d_...
push 0x80
push 0x615d04
push 1
call fcn.00401310
add esp, 0x18
push 0x10
lea edx, [ebp - 0x304]
push edx
mov eax, dword [ebp - 0x14]
push eax
call sub.WS2_32.dll_connect
test eax, eax
je 0x4ea249
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x4ea218
mov ecx, dword [ebp - 0x14]
push ecx
call sub.WS2_32.dll_closesocket
cmp dword [0x69aaa4], 1
jg 0x4ea1ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.NS_Channel_Tcp::Connect_connect_error___d.
push 0x8e
push 0x615d5c
push 1
call fcn.00401310
add esp, 0x14
mov dword [ebp - 0x310], 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x158]
call fcn.00402380
mov eax, dword [ebp - 0x310]
jmp 0x4ea2fa
push 0
mov ecx, dword [ebp - 0x318]
call fcn.004e9cc0
cmp dword [0x69aaa4], 1
jg 0x4ea247
push str.NS_Channel_Tcp::Connect__connecting_is_in_progress....
push 0x94
push 0x615dc0
push 1
call fcn.00401310
add esp, 0x10
jmp 0x4ea26b
cmp dword [0x69aaa4], 1
jg 0x4ea26b
push str.NS_Channel_Tcp::Connect_connected.
push 0x9b
push str....._network_serviceNS_Channel_Tcp.cpp
push 1
call fcn.00401310
add esp, 0x10
mov edx, dword [ebp - 0x318]
mov eax, dword [ebp - 0x14]
mov dword [edx + 0x24], eax
mov ecx, dword [ebp - 0x318]
push ecx
mov edx, dword [ebp - 0x318]
mov ecx, dword [edx + 0x10]
call fcn.004ea450
mov ecx, eax
call fcn.004ed770
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x4ea2b1
mov eax, dword [ebp - 0x318]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x318]
mov eax, dword [edx + 0x30]
call eax
jmp 0x4ea2d9
push 1
mov ecx, dword [ebp - 0x318]
call fcn.004e9cf0
push 0
mov ecx, dword [ebp + 0x14]
push ecx
push 0
mov edx, dword [ebp - 0x318]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x318]
mov edx, dword [eax + 0x14]
call edx
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x314], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x158]
call fcn.00402380
mov eax, dword [ebp - 0x314]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x34]
xor ecx, ebp
call fcn.005bfcb8
mov esp, ebp
pop ebp
ret 0x10