Function at 0x14001104b
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
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:
jmp 0x14001a720
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
mov eax, 0x16a8
call fcn.14001119a
sub rsp, rax
lea rbp, [rsp + 0x30]
lea rdi, [rsp + 0x30]
mov ecx, 0x41e
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x16c8]
mov rax, qword [0x14002c018]
xor rax, rbp
mov qword [rbp + 0x1668], rax
lea rcx, [0x1400320fe]
call fcn.14001189d
movzx eax, byte [0x1400271d3]
mov byte [rbp + 0x10], al
lea rax, [rbp + 0x11]
mov rdi, rax
xor eax, eax
mov ecx, 0xff
rep stosb byte [rdi], al
movzx eax, byte [0x1400271d3]
mov byte [rbp + 0x130], al
lea rax, [rbp + 0x131]
mov rdi, rax
xor eax, eax
mov ecx, 0x3ff
rep stosb byte [rdi], al
lea r9, [rbp + 0x130]
lea r8, [rbp + 0x10]
lea rdx, str.http:___255_____1023s
mov rcx, qword [rbp + 0x1690]
call fcn.140011618
cmp eax, 2
je 0x14001a7fb
lea rdx, str.Error:_Invalid_URL_format.
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140011104
lea rdx, [0x14001105a]
mov rcx, rax
call qword [sym.imp.MSVCP140D.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]
xor eax, eax
jmp 0x14001afe2
lea rdx, [rbp + 0x550]
mov cx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [rbp + 0x704], eax
cmp dword [rbp + 0x704], 0
je 0x14001a854
lea rdx, str.Error:_WSAStartup_failed__code
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140011104
mov edx, dword [rbp + 0x704]
mov rcx, rax
call qword [sym.imp.MSVCP140D.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]
lea rdx, [0x14001105a]
mov rcx, rax
call qword [sym.imp.MSVCP140D.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]
xor eax, eax
jmp 0x14001afe2
lea rax, [rbp + 0x728]
mov rdi, rax
xor eax, eax
mov ecx, 0x30
rep stosb byte [rdi], al
mov dword [rbp + 0x72c], 2
mov dword [rbp + 0x730], 1
mov dword [rbp + 0x734], 6
mov qword [rbp + 0x778], 0
lea r9, [rbp + 0x778]
lea r8, [rbp + 0x728]
lea rdx, str.http
lea rcx, [rbp + 0x10]
call qword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [rbp + 0x704], eax
cmp dword [rbp + 0x704], 0
je 0x14001a8fd
lea rdx, str.Error:_getaddrinfo_failed__code
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140011104
mov edx, dword [rbp + 0x704]
mov rcx, rax
call qword [sym.imp.MSVCP140D.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]
lea rdx, [0x14001105a]
mov rcx, rax
call qword [sym.imp.MSVCP140D.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]
xor eax, eax
jmp 0x14001afe2
mov r8d, 6
mov edx, 1
mov ecx, 2
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rbp + 0x798], rax
cmp qword [rbp + 0x798], 0xffffffffffffffff
jne 0x14001a97e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp + 0x1634], eax
lea rdx, str.Error:_socket_creation_failed__code
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140011104
mov ecx, dword [rbp + 0x1634]
mov edx, ecx
mov rcx, rax
call qword [sym.imp.MSVCP140D.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]
lea rdx, [0x14001105a]
mov rcx, rax
call qword [sym.imp.MSVCP140D.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, qword [rbp + 0x778]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
call qword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
jmp 0x14001afe2
mov rax, qword [rbp + 0x778]
mov r8d, dword [rax + 0x10]
mov rax, qword [rbp + 0x778]
mov rdx, qword [rax + 0x20]
mov rcx, qword [rbp + 0x798]
call qword [sym.imp.WS2_32.dll_connect]
mov dword [rbp + 0x704], eax
cmp dword [rbp + 0x704], 0xffffffff
jne 0x14001aa17
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp + 0x1634], eax
lea rdx, str.Error:_connect_failed__code
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140011104
mov ecx, dword [rbp + 0x1634]
mov edx, ecx
mov rcx, rax
call qword [sym.imp.MSVCP140D.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]
lea rdx, [0x14001105a]
mov rcx, rax
call qword [sym.imp.MSVCP140D.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, qword [rbp + 0x778]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
mov rcx, qword [rbp + 0x798]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
jmp 0x14001afe2
lea rdx, [rbp + 0x130]
lea rcx, [rbp + 0x12f8]
call fcn.140011401
mov qword [rbp + 0x1638], rax
mov rax, qword [rbp + 0x1638]
mov qword [rbp + 0x1640], rax
mov r8, qword [rbp + 0x1640]
lea rdx, str.GET__
lea rcx, [rbp + 0x1338]
call fcn.1400118cf
mov qword [rbp + 0x1648], rax
mov rax, qword [rbp + 0x1648]
mov qword [rbp + 0x1650], rax
lea r8, str._HTTP_1.1_r_n
mov rdx, qword [rbp + 0x1650]
lea rcx, [rbp + 0x7b8]
call fcn.1400117f3
nop
lea rcx, [rbp + 0x1338]
call fcn.1400111a9
nop
lea rcx, [rbp + 0x12f8]
call fcn.1400111a9
lea rdx, [rbp + 0x10]
lea rcx, [rbp + 0x1378]
call fcn.140011401
mov qword [rbp + 0x1638], rax
mov rax, qword [rbp + 0x1638]
mov qword [rbp + 0x1640], rax
mov r8, qword [rbp + 0x1640]
lea rdx, str.Host:
lea rcx, [rbp + 0x13b8]
call fcn.1400118cf
mov qword [rbp + 0x1648], rax
mov rax, qword [rbp + 0x1648]
mov qword [rbp + 0x1650], rax
lea r8, [0x1400272e0]
mov rdx, qword [rbp + 0x1650]
lea rcx, [rbp + 0x13f8]
call fcn.1400117f3
mov qword [rbp + 0x1658], rax
mov rax, qword [rbp + 0x1658]
mov qword [rbp + 0x1660], rax
mov rdx, qword [rbp + 0x1660]
lea rcx, [rbp + 0x7b8]
call fcn.140011212
nop
lea rcx, [rbp + 0x13f8]
call fcn.1400111a9
nop
lea rcx, [rbp + 0x13b8]
call fcn.1400111a9
nop
lea rcx, [rbp + 0x1378]
call fcn.1400111a9
lea rdx, str.Connection:_close_r_n_r_n
lea rcx, [rbp + 0x7b8]
call fcn.1400110af
lea rcx, [rbp + 0x7b8]
call fcn.14001177b
mov qword [rbp + 0x1638], rax
lea rcx, [rbp + 0x7b8]
call fcn.1400110d7
xor r9d, r9d
mov rcx, qword [rbp + 0x1638]
mov r8d, ecx
mov rdx, rax
mov rcx, qword [rbp + 0x798]
call qword [sym.imp.WS2_32.dll_send]
mov dword [rbp + 0x704], eax
cmp dword [rbp + 0x704], 0xffffffff
jne 0x14001ac44
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp + 0x1634], eax
lea rdx, str.Error:_send_failed__code
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140011104
mov ecx, dword [rbp + 0x1634]
mov edx, ecx
mov rcx, rax
call qword [sym.imp.MSVCP140D.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]
lea rdx, [0x14001105a]
mov rcx, rax
call qword [sym.imp.MSVCP140D.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, qword [rbp + 0x778]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
mov rcx, qword [rbp + 0x798]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov qword [rbp + 0x1438], 0
lea rcx, [rbp + 0x7b8]
call fcn.1400111a9
mov rax, qword [rbp + 0x1438]
jmp 0x14001afe2
mov edx, 0x20
lea rcx, [rbp + 0x7f8]
call fcn.140011087
lea rcx, [rbp + 0x7f8]
call fcn.14001161d
nop
xor r9d, r9d
mov r8d, 0x400
lea rdx, [rbp + 0x840]
mov rcx, qword [rbp + 0x798]
call qword [sym.imp.WS2_32.dll_recv]
mov dword [rbp + 0x704], eax
cmp dword [rbp + 0x704], 0
jle 0x14001ad43
lea rax, [rbp + 0x1458]
mov qword [rbp + 0x1488], rax
movsxd rax, dword [rbp + 0x704]
lea rax, [rbp + rax + 0x840]
mov qword [rbp + 0x1638], rax
lea rdx, [rbp + 0x14a8]
lea rcx, [rbp + 0x7f8]
call fcn.1400118ca
mov qword [rbp + 0x1640], rax
mov rax, qword [rbp + 0x1640]
mov qword [rbp + 0x1648], rax
mov rdx, qword [rbp + 0x1648]
mov rcx, qword [rbp + 0x1488]
call fcn.1400113fc
mov qword [rbp + 0x1650], rax
mov rax, qword [rbp + 0x1638]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x840]
mov r8, qword [rbp + 0x1650]
lea rdx, [rbp + 0x14d8]
lea rcx, [rbp + 0x7f8]
call fcn.1400116fe
lea rcx, [rbp + 0x14d8]
call fcn.1400116f9
nop
lea rcx, [rbp + 0x14a8]
call fcn.1400116f9
jmp 0x14001ade6
cmp dword [rbp + 0x704], 0
jne 0x14001ad56
jmp 0x14001adf1
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp + 0x1634], eax
lea rdx, str.Error:_recv_failed__code
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140011104
mov ecx, dword [rbp + 0x1634]
mov edx, ecx
mov rcx, rax
call qword [sym.imp.MSVCP140D.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]
lea rdx, [0x14001105a]
mov rcx, rax
call qword [sym.imp.MSVCP140D.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, qword [rbp + 0x778]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
mov rcx, qword [rbp + 0x798]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov qword [rbp + 0x1508], 0
lea rcx, [rbp + 0x7f8]
call fcn.1400112b7
nop
lea rcx, [rbp + 0x7b8]
call fcn.1400111a9
mov rax, qword [rbp + 0x1508]
jmp 0x14001afe2
xor eax, eax
cmp eax, 1
jne 0x14001ac62
mov rcx, qword [rbp + 0x778]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
mov rcx, qword [rbp + 0x798]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
lea rax, [rbp + 0x1548]
mov qword [rbp + 0x1578], rax
lea rax, [rbp + 0x1598]
mov qword [rbp + 0x15c8], rax
lea rcx, [rbp + 0x1524]
call fcn.140011221
mov qword [rbp + 0x1638], rax
mov rdx, qword [rbp + 0x1578]
lea rcx, [rbp + 0x7f8]
call fcn.1400118ca
mov qword [rbp + 0x1640], rax
mov rdx, qword [rbp + 0x15c8]
lea rcx, [rbp + 0x7f8]
call fcn.1400117fd
mov qword [rbp + 0x1648], rax
mov rax, qword [rbp + 0x1638]
mov r9, rax
mov r8, qword [rbp + 0x1640]
mov rdx, qword [rbp + 0x1648]
lea rcx, [rbp + 0xc58]
call fcn.14001155a
nop
xor r8d, r8d
lea rdx, str._r_n_r_n
lea rcx, [rbp + 0xc58]
call fcn.140011334
mov qword [rbp + 0xc98], rax
cmp qword [rbp + 0xc98], 0xffffffffffffffff
jne 0x14001af20
lea rdx, str.Error:_Invalid_HTTP_response.
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140011104
lea rdx, [0x14001105a]
mov rcx, rax
call qword [sym.imp.MSVCP140D.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 qword [rbp + 0x15e8], 0
lea rcx, [rbp + 0xc58]
call fcn.1400111a9
nop
lea rcx, [rbp + 0x7f8]
call fcn.1400112b7
nop
lea rcx, [rbp + 0x7b8]
call fcn.1400111a9
mov rax, qword [rbp + 0x15e8]
jmp 0x14001afe2
mov rax, qword [rbp + 0xc98]
add rax, 4
mov qword [rbp + 0xc98], rax
lea rcx, [rbp + 0x7f8]
call fcn.1400113ca
sub rax, qword [rbp + 0xc98]
mov qword [rbp + 0xcb8], rax
mov rcx, qword [rbp + 0xcb8]
call fcn.1400113de
mov qword [rbp + 0x1608], rax
mov rax, qword [rbp + 0x1608]
mov qword [rbp + 0xcd8], rax
mov rdx, qword [rbp + 0xc98]
lea rcx, [rbp + 0x7f8]
call fcn.140011884
mov r8, qword [rbp + 0xcb8]
mov rdx, rax
mov rcx, qword [rbp + 0xcd8]
call fcn.140011479
mov rax, qword [rbp + 0x1698]
mov rcx, qword [rbp + 0xcb8]
mov qword [rax], rcx
mov rax, qword [rbp + 0xcd8]
mov qword [rbp + 0x1628], rax
lea rcx, [rbp + 0xc58]
call fcn.1400111a9
nop
lea rcx, [rbp + 0x7f8]
call fcn.1400112b7
nop
lea rcx, [rbp + 0x7b8]
call fcn.1400111a9
mov rax, qword [rbp + 0x1628]
mov rdi, rax
lea rcx, [rbp - 0x30]
lea rdx, [0x140026108]
call fcn.140011735
mov rax, rdi
mov rcx, qword [rbp + 0x1668]
xor rcx, rbp
call fcn.14001146f
lea rsp, [rbp + 0x1678]
pop rdi
pop rbp
ret