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

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x1c8
mov ebx, dword [ecx]
mov esi, dword [ecx + 4]
call fcn.0040a4b0
cmp ebx, 2
jle 0x4aa546
mov ebx, dword [esi + 8]
lea eax, [ebp - 0x1a0]
mov dword [ebp - 0x1a8], eax
test ebx, ebx
je 0x4aa587
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
mov dword [ebp - 0x1b8], eax
lea edi, [ebx + eax]
cmp eax, 0xf
ja 0x4aa502
mov eax, dword [ebp - 0x1a8]
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.00495990
mov edx, dword [ebp - 0x1a8]
mov eax, dword [ebp - 0x1b8]
mov ebx, dword [sym.imp.msvcrt.dll__errno]
mov dword [ebp - 0x1a4], eax
mov byte [edx + eax], 0
mov edi, dword [ebp - 0x1a8]
call ebx
mov eax, dword [eax]
mov dword [ebp - 0x1c0], eax
call ebx
mov dword [eax], 0
lea eax, [ebp - 0x1b8]
mov dword [esp + 8], 0xa
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.msvcrt.dll_strtol
mov dword [ebp - 0x1bc], eax
cmp edi, dword [ebp - 0x1b8]
je 0x4aa62b
call ebx
cmp dword [eax], 0x22
je 0x4aa61f
call ebx
cmp dword [eax], 0
je 0x4aa537
lea ecx, [ebp - 0x1a8]
call fcn.00494ff0
lea eax, [ebp - 0x1a8]
mov dword [esp], 0x202
mov dword [esp + 4], eax
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov edi, eax
push ebx
push ebx
test eax, eax
jne 0x4aa4e2
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 2
call dword [sym.imp.WS2_32.dll_socket]
sub esp, 0xc
mov ebx, eax
cmp eax, 0xffffffff
je 0x4aa593
mov word [ebp - 0x1b8], 2
movzx eax, word [ebp - 0x1bc]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_htons]
push edx
mov word [ebp - 0x1b6], ax
mov eax, dword [esi + 4]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_inet_addr]
push ecx
mov dword [ebp - 0x1b4], eax
lea eax, [ebp - 0x1b8]
mov dword [esp + 8], 0x10
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.WS2_32.dll_connect]
sub esp, 0xc
add eax, 1
je 0x4aa5bc
mov dword [esp + 4], str.Connected_to_the_server_
mov dword [esp], 0x4b48a0
call fcn.004a6dd0
mov edx, dword [esi + 4]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.004a6dd0
mov dword [esp + 4], 0x4b509b
mov dword [esp], eax
call fcn.004a6dd0
mov ecx, eax
mov eax, dword [ebp - 0x1bc]
mov dword [esp], eax
call fcn.0046d3e0
push edx
call fcn.004015e0
mov dword [esp], ebx
call dword [sym.imp.WS2_32.dll_closesocket]
push ecx
call dword [sym.imp.WS2_32.dll_WSACleanup]
lea esp, [ebp - 0x10]
mov eax, edi
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov dword [esp + 4], str.WSAStartup_failed.
mov edi, 1
mov dword [esp], 0x4b4760
call fcn.004a6dd0
call fcn.004015e0
jmp 0x4aa4d4
lea eax, [ebp - 0x1b8]
mov dword [esp + 4], 0
lea ecx, [ebp - 0x1a8]
mov dword [esp], eax
call fcn.004977b0
mov dword [ebp - 0x1a8], eax
mov eax, dword [ebp - 0x1b8]
push edx
mov dword [ebp - 0x1a0], eax
push edx
jmp 0x4aa33b
call ebx
mov edx, dword [ebp - 0x1c0]
mov dword [eax], edx
jmp 0x4aa3c7
mov dword [esp + 4], str.Usage:
mov edi, 1
mov dword [esp], 0x4b4760
call fcn.004a6dd0
mov edx, dword [esi]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.004a6dd0
mov dword [esp + 4], str._host_port
mov dword [esp], eax
call fcn.004a6dd0
call fcn.004015e0
jmp 0x4aa4d4
mov dword [esp], 0x4b50b8
call fcn.004ab3e0
mov dword [esp + 4], str.Socket_creation_failed.
mov edi, 1
mov dword [esp], 0x4b4760
call fcn.004a6dd0
call fcn.004015e0
call dword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x4aa4d4
mov dword [esp + 4], str.Connection_failed.
mov dword [esp], 0x4b4760
call fcn.004a6dd0
mov edx, dword [esi + 4]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.004a6dd0
mov dword [esp + 4], 0x4b509b
mov dword [esp], eax
call fcn.004a6dd0
mov ecx, eax
mov eax, dword [ebp - 0x1bc]
mov dword [esp], eax
call fcn.0046d3e0
push esi
call fcn.004015e0
mov dword [esp], ebx
call dword [sym.imp.WS2_32.dll_closesocket]
push edi
mov edi, 1
call dword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x4aa4d4
mov dword [esp], str.stoi
call fcn.004ab520
mov dword [esp], str.stoi
call fcn.004ab480
lea esi, [esi]
nop
sub esp, 0x1c
mov ecx, 0x4fc03c
call fcn.004a0640
mov dword [esp], 0x4015d0
call fcn.004014d0
add esp, 0x1c
ret