Function at 0x4c9110
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 0x5b83cb
mov eax, dword fs:[0]
push eax
sub esp, 0x30c
mov eax, dword [0x64786c]
xor eax, ebp
mov dword [ebp - 0x30], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x318], ecx
cmp dword [ebp + 0x10], 0xc
je 0x4c9151
mov eax, 7
jmp 0x4c96ab
mov ecx, dword [ebp - 0x318]
call fcn.004d3f80
cmp eax, 0xffffffff
je 0x4c916b
mov eax, 6
jmp 0x4c96ab
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x14], eax
push 0
push 1
push 2
call sub.WS2_32.dll_socket
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x4c91c6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x276d
jne 0x4c91be
mov ecx, dword [ebp - 0x318]
mov ecx, dword [ecx + 0x10]
call fcn.004c9800
mov ecx, eax
call fcn.004cc730
lea edx, [ebp - 0x2ec]
push edx
push 0x101
call sub.WS2_32.dll_WSAStartup
test eax, eax
jne 0x4c91be
jmp 0x4c9171
or eax, 0xffffffff
jmp 0x4c96ab
push 1
mov eax, dword [ebp - 0x10]
push eax
call fcn.004c96d0
add esp, 8
cmp eax, 0xffffffff
jne 0x4c91ea
mov ecx, dword [ebp - 0x10]
push ecx
call sub.WS2_32.dll_closesocket
or eax, 0xffffffff
jmp 0x4c96ab
push 0x5c32e0
push 0x100
lea edx, [ebp - 0x134]
push edx
call fcn.00403300
add esp, 0xc
push 0
lea eax, [ebp - 0x134]
push eax
lea ecx, [ebp - 0x158]
call fcn.00402250
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x14]
cmp dword [ecx + 8], 0
jne 0x4c9310
push 0
push 0x5c32ec
push 0x5c32f4
lea ecx, [ebp - 0x158]
call fcn.00403f10
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x4c9310
push 0
push 0x5c32fc
push 0x5c3304
lea ecx, [ebp - 0x158]
call fcn.00403f60
mov dword [ebp - 0x24], eax
push 0
push 0x5c330c
push 0x5c3314
lea ecx, [ebp - 0x158]
call fcn.00403f10
mov dword [ebp - 0x20], eax
push 0
push 0x5c331c
push 0x5c3324
lea ecx, [ebp - 0x158]
call fcn.00403f60
mov dword [ebp - 0x1c], eax
push 0
push 0x5c332c
push 0x5c3334
lea ecx, [ebp - 0x158]
call fcn.00403f60
mov dword [ebp - 0x2f0], eax
cmp dword [ebp - 0x2f0], 0
je 0x4c92ed
push 0x100
lea edx, [ebp - 0x134]
push edx
mov eax, dword [ebp - 0x2f0]
push eax
call fcn.00403810
add esp, 0xc
test eax, eax
jbe 0x4c92ed
lea ecx, [ebp - 0x134]
mov dword [ebp - 0x18], ecx
jmp 0x4c9307
push 0
push 0x5c333c
push 0x5c3344
lea ecx, [ebp - 0x158]
call fcn.00403f60
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 0x14]
lea eax, [ebp - 0x28]
mov dword [edx + 8], eax
mov ecx, dword [ebp - 0x14]
cmp dword [ecx + 8], 0
je 0x4c9483
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 8]
cmp dword [eax], 0
je 0x4c9483
mov dword [ebp - 0x2f4], 0
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 8]
cmp dword [edx], 1
jne 0x4c9393
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp - 0x14]
movzx edx, word [ecx + 4]
push edx
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
push ecx
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 8]
mov ecx, dword [eax + 0x10]
push ecx
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 8]
mov ecx, dword [eax + 0xc]
push ecx
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 8]
movzx ecx, word [eax + 8]
push ecx
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 8]
mov ecx, dword [eax + 4]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call fcn.00407cc0
add esp, 0x20
mov dword [ebp - 0x2f4], eax
jmp 0x4c9445
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 8]
cmp dword [ecx], 2
jne 0x4c93ed
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp - 0x14]
movzx ecx, word [eax + 4]
push ecx
mov edx, dword [ebp - 0x14]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 8]
mov eax, dword [edx + 0x10]
push eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 8]
mov eax, dword [edx + 0xc]
push eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 8]
movzx eax, word [edx + 8]
push eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 8]
mov eax, dword [edx + 4]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.00408120
add esp, 0x20
mov dword [ebp - 0x2f4], eax
jmp 0x4c9445
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 8]
cmp dword [eax], 3
jne 0x4c9445
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp - 0x14]
movzx eax, word [edx + 4]
push eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx]
push edx
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 8]
mov edx, dword [ecx + 0x10]
push edx
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 8]
mov edx, dword [ecx + 0xc]
push edx
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 8]
movzx edx, word [ecx + 8]
push edx
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 8]
mov edx, dword [ecx + 4]
push edx
mov eax, dword [ebp - 0x10]
push eax
call fcn.00408310
add esp, 0x20
mov dword [ebp - 0x2f4], eax
cmp dword [ebp - 0x2f4], 0
jne 0x4c947e
mov ecx, dword [ebp - 0x10]
push ecx
call sub.WS2_32.dll_closesocket
mov dword [ebp - 0x308], 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x158]
call fcn.00402300
mov eax, dword [ebp - 0x308]
jmp 0x4c96ab
jmp 0x4c961c
mov edx, dword [ebp - 0x14]
mov eax, dword [edx]
push eax
call fcn.004079a0
add esp, 4
mov dword [ebp - 0x300], eax
mov ecx, dword [ebp - 0x14]
movzx edx, word [ecx + 4]
push edx
call sub.WS2_32.dll_htons
mov word [ebp - 0x302], ax
mov eax, 2
mov word [ebp - 0x304], ax
cmp dword [ebp - 0x300], 0xffffffff
jne 0x4c9515
mov ecx, dword [ebp - 0x10]
push ecx
call sub.WS2_32.dll_closesocket
cmp dword [0x653730], 1
jg 0x4c94ee
mov edx, dword [ebp - 0x14]
mov eax, dword [edx]
push eax
push str.NS_Channel_Tcp::Connect__s_cant_be_resolved.
push 0x76
push 0x5c337c
push 1
call fcn.00401320
add esp, 0x14
mov dword [ebp - 0x30c], 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x158]
call fcn.00402300
mov eax, dword [ebp - 0x30c]
jmp 0x4c96ab
cmp dword [0x653730], 1
jg 0x4c9548
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 4]
push edx
mov eax, dword [ebp - 0x300]
push eax
call sub.WS2_32.dll_inet_ntoa
push eax
push str.NS_Channel_Tcp::Connect_Socket_connecting_to__s:_d_...
push 0x7a
push 0x5c33e0
push 1
call fcn.00401320
add esp, 0x18
push 0x10
lea ecx, [ebp - 0x304]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call sub.WS2_32.dll_connect
test eax, eax
je 0x4c95fa
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x4c95c9
mov eax, dword [ebp - 0x10]
push eax
call sub.WS2_32.dll_closesocket
cmp dword [0x653730], 1
jg 0x4c95a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.NS_Channel_Tcp::Connect_connect_error___d.
push 0x88
push 0x5c3438
push 1
call fcn.00401320
add esp, 0x14
mov dword [ebp - 0x310], 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x158]
call fcn.00402300
mov eax, dword [ebp - 0x310]
jmp 0x4c96ab
push 0
mov ecx, dword [ebp - 0x318]
call fcn.004c9090
cmp dword [0x653730], 1
jg 0x4c95f8
push str.NS_Channel_Tcp::Connect__connecting_is_in_progress....
push 0x8e
push 0x5c349c
push 1
call fcn.00401320
add esp, 0x10
jmp 0x4c961c
cmp dword [0x653730], 1
jg 0x4c961c
push str.NS_Channel_Tcp::Connect_connected.
push 0x95
push str....._network_serviceNS_Channel_Tcp.cpp
push 1
call fcn.00401320
add esp, 0x10
mov ecx, dword [ebp - 0x318]
mov edx, dword [ebp - 0x10]
mov dword [ecx + 0x24], edx
mov eax, dword [ebp - 0x318]
push eax
mov ecx, dword [ebp - 0x318]
mov ecx, dword [ecx + 0x10]
call fcn.004c9800
mov ecx, eax
call fcn.004cc820
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x4c9662
mov edx, dword [ebp - 0x318]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x318]
mov edx, dword [eax + 0x30]
call edx
jmp 0x4c968a
push 1
mov ecx, dword [ebp - 0x318]
call fcn.004c90c0
push 0
mov eax, dword [ebp + 0x14]
push eax
push 0
mov ecx, dword [ebp - 0x318]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x318]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x314], ecx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x158]
call fcn.00402300
mov eax, dword [ebp - 0x314]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x30]
xor ecx, ebp
call fcn.0059709c
mov esp, ebp
pop ebp
ret 0x10