Function at 0x140001070
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Convert ip address from string
Create tcp socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
lea rbp, [rsp - 0x14f0]
mov eax, 0x15f0
call fcn.14000a1b0
sub rsp, rax
mov rbx, rdx
mov ecx, 0x202
lea rdx, [rbp + 0x350]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x1400010c6
mov edx, eax
lea rcx, str.WSAStartup_failed:__d_n
call fcn.140001010
mov eax, 1
jmp 0x140001390
mov edx, 1
mov esi, 2
mov r8d, 6
mov ecx, esi
call qword [sym.imp.WS2_32.dll_socket]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x14000110b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.socket_failed_with_error:__d_n
call fcn.140001010
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 1
jmp 0x140001390
mov word [rsp + 0x38], si
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov ecx, eax
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x3a], ax
lea r8, [rsp + 0x3c]
mov rdx, qword [rbx + 0x10]
mov ecx, esi
call qword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jg 0x140001166
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.WS2_32.dll_gethostbyname]
test rax, rax
je 0x1400011ac
mov rdx, qword [rax + 0x18]
test rdx, rdx
je 0x1400011ac
movsx r8, word [rax + 0x12]
mov rdx, qword [rdx]
lea rcx, [rsp + 0x3c]
call sub.VCRUNTIME140.dll_memcpy
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x38]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x1400011d1
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.connect_failed_with_error:__d_n
call fcn.140001010
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 1
jmp 0x140001390
lea rcx, str.Could_not_resolve_hostname_n
call fcn.140001010
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 1
jmp 0x140001390
movups xmm0, xmmword [str.GET___HTTP_1.1_r_nHost:]
movaps xmmword [rsp + 0x50], xmm0
mov eax, dword [0x14000c4e8]
mov dword [rsp + 0x60], eax
movzx eax, word [0x14000c4ec]
mov word [rsp + 0x64], ax
movzx eax, byte [0x14000c4ee]
mov byte [rsp + 0x66], al
xor edx, edx
mov r8d, 0x3e9
lea rcx, [rsp + 0x67]
call sub.VCRUNTIME140.dll_memset
lea rcx, [rsp + 0x50]
dec rcx
nop dword [rax + rax]
lea rcx, [rcx + 1]
cmp byte [rcx], 0
jne 0x140001220
mov r8, qword [rbx + 0x10]
xor edx, edx
nop
movzx eax, byte [r8 + rdx]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140001230
movdqa xmm0, xmmword [0x14000cc60]
mov dword [rsp + 0x30], 0xc8fa6aa0
mov dword [rsp + 0x34], 0xdba54e89
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov edx, 0x374
mov eax, dword [rdx + rcx]
mov r8d, 0x138
test al, 1
jne 0x1400012c9
or eax, 1
mov dword [rdx + rcx], eax
lea rbx, [r8 + rcx]
mov byte [rbx + 0x18], 1
lea rax, [rbx + 0x17]
lea rcx, [rsp + 0x37]
cmp rbx, rcx
ja 0x1400012ac
lea rcx, [rsp + 0x20]
cmp rax, rcx
jb 0x1400012ac
movups xmmword [rbx], xmm0
movsd xmm0, qword [rsp + 0x30]
movsd qword [rbx + 0x10], xmm0
jmp 0x1400012ba
movups xmmword [rbx], xmm0
movsd xmm0, qword [rsp + 0x30]
movsd qword [rbx + 0x10], xmm0
lea rcx, [0x14000b1a0]
call fcn.14000944c
nop
jmp 0x1400012cd
lea rbx, [rcx + r8]
mov rcx, rbx
call fcn.1400056e0
lea r11, [rsp + 0x50]
dec r11
nop dword [rax]
lea r11, [r11 + 1]
cmp byte [r11], 0
jne 0x1400012e0
xor ecx, ecx
nop dword [rax]
movzx eax, byte [rbx + rcx]
mov byte [r11 + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x1400012f0
lea rax, [rsp + 0x50]
mov r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp byte [rax + r8], 0
jne 0x140001310
xor r9d, r9d
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_send]
xor edx, edx
mov r8d, 0x1000
lea rcx, [rbp + 0x4f0]
call sub.VCRUNTIME140.dll_memset
xor r9d, r9d
mov r8d, 0x1000
lea rdx, [rbp + 0x4f0]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x140001373
lea r8, [rbp + 0x4f0]
mov edx, eax
lea rcx, str._.s_n
call fcn.140001010
jmp 0x14000137f
lea rcx, str.Failed_to_receive_response_n
call fcn.140001010
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
lea r11, [rsp + 0x15f0]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret