Function at 0x402cc0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get socket status
Initialize winsock library
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
mov eax, 0x1208
call fcn.00405f60
mov eax, dword [0x40a008]
xor eax, esp
mov dword [esp + 0x1204], eax
push esi
push edi
lea eax, [esp + 0x208]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x402d0f
mov eax, dword [esp + 0x208]
cmp al, 2
jne 0x402d09
shr eax, 8
cmp al, 2
je 0x402d0f
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 0xb0
lea eax, [esp + 0x42]
mov dword [esp + 0x3c], 0xc0
push 0
push eax
mov word [esp + 0x48], 0x164
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [esp + 0x38]
xor eax, eax
xorps xmm0, xmm0
movlpd qword [esp + 0xee], xmm0
mov dword [esp + 0xf6], eax
mov dword [esp + 0xfa], eax
call fcn.00403110
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [0x40a67c], eax
cmp eax, 0xffffffff
je 0x402fc9
mov esi, dword [sym.imp.WS2_32.dll_send]
mov ecx, 2
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
xorps xmm0, xmm0
movaps xmmword [esp + 0x20], xmm0
push 0x22b8
mov word [esp + 0x24], cx
call dword [sym.imp.WS2_32.dll_htons]
push str.10.0.0.2
mov word [esp + 0x26], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
push 0x404980
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, 0x40755c
mov dword [esp + 0x2c], eax
call fcn.00404740
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 0x10
lea eax, [esp + 0x24]
mov byte [0x40a66c], 0
push eax
push dword [0x40a67c]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x402e29
nop
push 0x404980
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.connect_failed
call fcn.00404740
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 0x10
lea eax, [esp + 0x24]
push eax
push dword [0x40a67c]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x402df0
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 1
push eax
push 0x8004667e
push dword [0x40a67c]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push 0x404980
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, 0x407578
mov dword [esp + 0x20], 1
mov dword [esp + 0x24], 0
call fcn.00404740
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_____]
nop dword [eax + eax]
mov eax, dword [0x40a67c]
lea ecx, [esp + 0x18]
push ecx
push 0
push 0
lea ecx, [esp + 0x10c]
mov dword [esp + 0x110], eax
push ecx
push eax
mov dword [esp + 0x114], 1
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
js 0x403000
lea eax, [esp + 0x100]
push eax
push dword [0x40a67c]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x402edd
call fcn.00401ff0
cmp eax, 0xffffffff
je 0x402f70
cmp byte [0x40a66d], 0
jne 0x402f24
push 0x404980
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, 0x4075ac
call fcn.00404740
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 0
push 0xc6
lea eax, [esp + 0x40]
push eax
push dword [0x40a67c]
call esi
push 1
call edi
jmp 0x402e80
push 0xffa
lea eax, [esp + 0x212]
mov dword [esp + 0x20c], 0xffa
push 0
push eax
mov word [esp + 0x218], 0x165
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [esp + 0x208]
push 0
push 0x1000
push eax
push dword [0x40a67c]
call esi
push 1
call edi
jmp 0x402e80
push str.select
call fcn.00401130
add esp, 4
mov byte [0x40a66e], 1
call fcn.00403040
push 0
push dword [0x40a67c]
call dword [sym.imp.WS2_32.dll_shutdown]
push dword [0x40a67c]
call dword [sym.imp.WS2_32.dll_closesocket]
push 6
push 1
push 2
mov byte [0x40a66d], 0
call dword [sym.imp.WS2_32.dll_socket]
mov dword [0x40a67c], eax
mov ecx, 2
cmp eax, 0xffffffff
jne 0x402d82
mov edx, str.socket_failed
push 0x404980
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.00404740
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_____]
mov ecx, dword [esp + 0x120c]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.0040520e
mov esp, ebp
pop ebp
ret
push 0x407584
call fcn.00401130
add esp, 4
mov byte [0x40a66e], 1
call fcn.00403040
push 0
push dword [0x40a67c]
call dword [sym.imp.WS2_32.dll_shutdown]
push dword [0x40a67c]
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov edx, 0x4075b4
jmp 0x402fce