Function at 0x402310
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Execute command
Initialize winsock library
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x404733
mov eax, dword fs:[0]
push eax
sub esp, 0x2a4
mov eax, dword [0x408008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x1b8]
mov dword [ebp - 4], 0
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x4027da
mov eax, 0x101
cmp word [ebp - 0x1b8], ax
jne 0x4027da
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
je 0x4027da
mov eax, 2
push 0x400
mov word [ebp - 0x24], ax
call dword [sym.imp.WS2_32.dll_htons]
cmp dword [ebp + 0x1c], 0x10
lea ecx, [ebp + 8]
mov word [ebp - 0x22], ax
cmovae ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WS2_32.dll_inet_addr]
mov esi, dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x24]
push 0x10
push eax
push edi
call esi
test eax, eax
je 0x4023e9
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push 0xfa
call ebx
push 0x10
lea eax, [ebp - 0x24]
push eax
push edi
call esi
test eax, eax
jne 0x4023d5
push 0xb8
lea eax, [ebp - 0x278]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x278], 0x40550c
lea ecx, [ebp - 0x208]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::constructor_void_]
push 0
push 0
lea eax, [ebp - 0x268]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0x278]
mov dword [ebp - 0x14], 1
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_istream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char_____bool_]
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0x278]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ifstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x278]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0x27c], eax
lea eax, [ebp - 0x268]
mov ecx, eax
mov dword [ebp - 0x27c], eax
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void_]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x268]
mov dword [ebp - method.std::basic_filebuf_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov byte [ebp - 0x220], 0
mov byte [ebp - 0x22b], 0
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov eax, dword [0x408598]
mov dword [ebp - 0x228], eax
mov eax, dword [0x40859c]
mov dword [ebp - 0x21c], 0
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x230], 0
push 0x40
push 0x21
push str.C:_to
mov byte [ebp - 4], 4
call dword [sym.imp.MSVCP140.dll_struct__iobuf____cdecl_std::_Fiopen_char_const___int__int_]
mov esi, eax
add esp, 0xc
test esi, esi
je 0x40260d
lea ecx, [ebp - 0x268]
mov byte [ebp - 0x220], 1
mov byte [ebp - 0x22b], 0
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
lea eax, [ebp - 0x1bc]
mov dword [ebp - 0x14], 0
push eax
lea eax, [ebp - 0x1c0]
mov dword [ebp - 0x1c0], 0
push eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x1bc], 0
push eax
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__get_stream_buffer_pointers]
mov edx, dword [ebp - 0x1bc]
add esp, 0x10
mov ecx, dword [ebp - 0x1c0]
mov eax, dword [ebp - 0x14]
push edx
push ecx
push eax
push edx
push ecx
push eax
lea ecx, [ebp - 0x268]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_char____char____int___char____char____int__]
mov eax, dword [0x408598]
lea ecx, [ebp - 0x268]
mov dword [ebp - 0x228], eax
mov eax, dword [0x40859c]
mov dword [ebp - 0x224], eax
lea eax, [ebp - 0x280]
push eax
mov dword [ebp - 0x21c], esi
mov dword [ebp - 0x230], 0
call dword [sym.imp.MSVCP140.dll_public:_class_std::locale___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::getloc_void_]
mov ecx, eax
mov byte [ebp - 4], 5
call fcn.00403540
mov esi, eax
mov ecx, esi
call dword [sym.imp.MSVCP140.dll_public:_bool___thiscall_std::codecvt_base::always_noconv_void_const]
test al, al
je 0x4025bb
mov dword [ebp - 0x230], 0
jmp 0x4025cd
lea ecx, [ebp - 0x268]
mov dword [ebp - 0x230], esi
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x27c]
test ecx, ecx
je 0x4025ec
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x4025ec
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x278]
mov eax, dword [ebp - 0x278]
push 0
push 0
mov eax, dword [eax + 4]
add ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool_]
jmp 0x402628
mov eax, dword [ebp - 0x278]
lea ecx, [ebp - 0x278]
push 0
push 2
mov eax, dword [eax + 4]
add ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
lea eax, [ebp - 0x298]
push eax
lea ecx, [ebp - 0x278]
call dword [sym.imp.MSVCP140.dll_public:_class_std::fpos_struct__Mbstatet____thiscall_std::basic_istream_char__struct_std::char_traits_char__::tellg_void_]
push 2
push 0
push 0
mov esi, dword [eax + 8]
lea ecx, [ebp - 0x278]
add esi, dword [eax]
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::seekg_long_long___int64___int_]
lea eax, [ebp - 0x2b0]
push eax
lea ecx, [ebp - 0x278]
call dword [sym.imp.MSVCP140.dll_public:_class_std::fpos_struct__Mbstatet____thiscall_std::basic_istream_char__struct_std::char_traits_char__::tellg_void_]
sub esp, 0x18
xorps xmm0, xmm0
mov ecx, esp
mov ebx, dword [eax + 8]
add ebx, dword [eax]
mov eax, esi
cdq
mov dword [ecx], eax
mov dword [ecx + 4], edx
mov dword [ecx + 8], 0
mov dword [ecx + 0xc], 0
movq qword [ecx + 0x10], xmm0
lea ecx, [ebp - 0x278]
mov dword [ebp - 0x14], ebx
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::seekg_class_std::fpos_struct__Mbstatet__]
push ebx
call fcn.00403936
mov ebx, eax
lea ecx, [ebp - 0x278]
mov eax, dword [ebp - 0x14]
add esp, 4
cdq
mov dword [ebp - 0x27c], ebx
push edx
push eax
push ebx
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::read_char___long_long___int64__]
lea ecx, [ebp - 0x268]
call fcn.004034d0
test eax, eax
jne 0x4026e9
push eax
mov eax, dword [ebp - 0x278]
lea ecx, [ebp - 0x278]
push 2
mov eax, dword [eax + 4]
add ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov eax, dword [ebp - 0x278]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x26c], 6
jne 0x4027ca
mov eax, dword [ebp - 0x14]
mov esi, ebx
push 0
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push 4
push eax
push edi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x4027ca
mov ecx, dword [ebp - 0x14]
mov eax, ecx
cdq
and edx, 0x3ff
add eax, edx
sar eax, 0xa
mov dword [ebp - 0x1c0], eax
and ecx, 0x800003ff
jns 0x402747
dec ecx
or ecx, 0xfffffc00
inc ecx
xor ebx, ebx
mov dword [ebp - 0x1bc], ecx
test eax, eax
jle 0x40277c
push 0
push 0x400
push esi
push edi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x4027ca
inc ebx
add esi, 0x400
cmp ebx, dword [ebp - 0x1c0]
jl 0x402753
mov ecx, dword [ebp - 0x1bc]
test ecx, ecx
je 0x402790
push 0
push ecx
push esi
push edi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x4027ca
push 1
push dword [ebp - 0x27c]
call fcn.004038d5
add esp, 8
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
push str.pause
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
add esp, 4
lea ecx, [ebp - 0x278]
xor esi, esi
call fcn.00402840
jmp 0x4027dd
lea ecx, [ebp - 0x278]
or esi, 0xffffffff
call fcn.00402840
jmp 0x4027dd
or esi, 0xffffffff
mov edx, dword [ebp + 0x1c]
cmp edx, 0x10
jb 0x402813
mov ecx, dword [ebp + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x402809
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x402809
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004038d5
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004038c4
mov esp, ebp
pop ebp
ret