Function at 0x4022e8
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x7d4
mov eax, dword [ebp + 8]
cmp byte [eax], 0
je 0x4026d9
mov eax, dword [ebp + 0x10]
cmp byte [eax], 0
je 0x4026d9
mov dword [esp + 8], 0x200
mov dword [esp + 4], 0
mov dword [esp], 0x40c2f0
call sub.msvcrt.dll_memset
mov dword [esp + 8], 0x200
mov dword [esp + 4], 0
lea eax, [ebp - 0x208]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov dword [esp + 8], 0x200
mov dword [esp + 4], 0
lea eax, [ebp - 0x408]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov dword [esp + 8], 0x200
mov dword [esp + 4], 0
lea eax, [ebp - 0x608]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov dword [esp], 0x406020
call fcn.00401290
mov dword [esp + 4], eax
lea eax, [ebp - 0x408]
mov dword [esp], eax
call sub.msvcrt.dll_strcat
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
lea eax, [ebp - 0x408]
mov dword [esp], eax
call sub.msvcrt.dll_strcat
mov dword [esp], 0x405da0
call fcn.00401290
mov dword [esp + 4], eax
lea eax, [ebp - 0x408]
mov dword [esp], eax
call sub.msvcrt.dll_strcat
mov dword [esp], 0x405d20
call fcn.00401290
mov dword [esp + 4], eax
lea eax, [ebp - 0x408]
mov dword [esp], eax
call sub.msvcrt.dll_strcat
mov dword [esp], 0x405f20
call fcn.00401290
mov dword [esp + 4], eax
lea eax, [ebp - 0x408]
mov dword [esp], eax
call sub.msvcrt.dll_strcat
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
lea eax, [ebp - 0x408]
mov dword [esp], eax
call sub.msvcrt.dll_strcat
mov dword [esp], 0x405d20
call fcn.00401290
mov dword [esp + 4], eax
lea eax, [ebp - 0x408]
mov dword [esp], eax
call sub.msvcrt.dll_strcat
mov dword [esp], 0x405e20
call fcn.00401290
mov dword [esp + 4], eax
lea eax, [ebp - 0x408]
mov dword [esp], eax
call sub.msvcrt.dll_strcat
mov dword [esp], 0x405d20
call fcn.00401290
mov dword [esp + 4], eax
lea eax, [ebp - 0x408]
mov dword [esp], eax
call sub.msvcrt.dll_strcat
mov dword [esp], 0x405ea0
call fcn.00401290
mov dword [esp + 4], eax
lea eax, [ebp - 0x408]
mov dword [esp], eax
call sub.msvcrt.dll_strcat
mov dword [esp], 0x405d20
call fcn.00401290
mov dword [esp + 4], eax
lea eax, [ebp - 0x408]
mov dword [esp], eax
call sub.msvcrt.dll_strcat
mov dword [esp], 0x405fa0
call fcn.00401290
mov dword [esp + 4], eax
lea eax, [ebp - 0x408]
mov dword [esp], eax
call sub.msvcrt.dll_strcat
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov dword [esp], eax
call fcn.00401990
mov dword [esp + 4], eax
lea eax, [ebp - 0x408]
mov dword [esp], eax
call sub.msvcrt.dll_strcat
mov dword [esp], 0x405d20
call fcn.00401290
mov dword [esp + 4], eax
lea eax, [ebp - 0x408]
mov dword [esp], eax
call sub.msvcrt.dll_strcat
mov dword [esp], 0x405d20
call fcn.00401290
mov dword [esp + 4], eax
lea eax, [ebp - 0x408]
mov dword [esp], eax
call sub.msvcrt.dll_strcat
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], eax
lea eax, [ebp - 0x408]
mov dword [esp], eax
call sub.msvcrt.dll_strcat
lea eax, [ebp - 0x798]
mov dword [esp + 4], eax
mov dword [esp], 0x202
call sub.WSOCK32.DLL_WSAStartup
sub esp, 8
mov dword [esp + 8], 6
mov dword [esp + 4], 1
mov dword [esp], 2
call sub.WSOCK32.DLL_socket
sub esp, 0xc
mov dword [ebp - 0x79c], eax
mov dword [esp], 0x50
call sub.WSOCK32.DLL_htons
sub esp, 4
mov word [ebp - 0x7b6], ax
mov word [ebp - 0x7b8], 2
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00402254
mov dword [esp], eax
call sub.WSOCK32.DLL_inet_addr
sub esp, 4
mov dword [ebp - 0x7b4], eax
mov dword [esp + 8], 0x10
lea eax, [ebp - 0x7b8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x79c]
mov dword [esp], eax
call sub.WSOCK32.DLL_connect
sub esp, 0xc
lea eax, [ebp - 0x408]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x408]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x79c]
mov dword [esp], eax
call sub.WSOCK32.DLL_send
sub esp, 0x10
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x200
lea eax, [ebp - 0x208]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x79c]
mov dword [esp], eax
call sub.WSOCK32.DLL_recv
sub esp, 0x10
mov eax, dword [ebp - 0x79c]
mov dword [esp], eax
call sub.WSOCK32.DLL_closesocket
sub esp, 4
call sub.WSOCK32.DLL_WSACleanup
mov dword [esp], 0x405d20
call fcn.00401290
mov dword [esp + 4], eax
lea eax, [ebp - 0x608]
mov dword [esp], eax
call sub.msvcrt.dll_strcat
lea eax, [ebp - 0x208]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov ebx, eax
lea eax, [ebp - 0x608]
mov dword [esp + 4], eax
lea eax, [ebp - 0x208]
mov dword [esp], eax
call fcn.00401478
add eax, 2
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
lea eax, [ebp - 0x208]
mov dword [esp], eax
call fcn.004013e2
mov dword [esp + 4], eax
mov dword [esp], 0x40c2f0
call sub.msvcrt.dll_strcat
mov dword [ebp - 0x7bc], 0x40c2f0
jmp 0x4026d9
mov eax, dword [ebp - 0x7bc]
mov ebx, dword [ebp - 4]
leave
ret