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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1a8
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x1a4], eax
push 0x401cf0
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov edx, str.Connection...
call fcn.00401ad0
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
lea eax, [esp + 0x10]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x4012f4
push 0x401cf0
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov edx, str.Error_initializing_Winsock
call fcn.00401ad0
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
xor al, al
mov ecx, dword [esp + 0x1a4]
xor ecx, esp
call fcn.00402129
mov esp, ebp
pop ebp
ret
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [0x406440], eax
cmp eax, 0xffffffff
jne 0x401345
push 0x401cf0
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov edx, str.Error_creating_socket
call fcn.00401ad0
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor al, al
mov ecx, dword [esp + 0x1a4]
xor ecx, esp
call fcn.00402129
mov esp, ebp
pop ebp
ret
mov eax, 2
push 0x1f90
mov word [esp + 4], ax
call dword [sym.imp.WS2_32.dll_htons]
push str.127.0.0.1
mov word [esp + 6], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [esp + 4], eax
lea eax, [esp]
push 0x10
push eax
push dword [0x406440]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4013cc
push 0x401cf0
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov edx, str.Error_connecting_to_server
call fcn.00401ad0
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push dword [0x406440]
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor al, al
mov ecx, dword [esp + 0x1a4]
xor ecx, esp
call fcn.00402129
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x1a4]
mov al, 1
xor ecx, esp
call fcn.00402129
mov esp, ebp
pop ebp
ret