Function at 0x401f80
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create raw socket
Create tcp socket
Create udp socket
Receive data
Receive data on socket
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x4a0
xor r8d, r8d
mov edx, 1
mov qword [rsp + 0x30], 0
lea rsi, [rsp + 0x60]
mov rbx, rcx
mov ecx, 2
mov qword [rsp + 0x38], 0
call qword [sym.imp.WS2_32.dll_socket]
mov rcx, qword [rbx]
mov rdi, rax
call qword [sym.imp.WS2_32.dll_inet_addr]
movzx ecx, word [rbx + 0x40]
mov dword [rsp + 0x34], eax
mov eax, 2
mov word [rsp + 0x30], ax
call qword [sym.imp.WS2_32.dll_htons]
lea rdx, [rsp + 0x30]
mov rcx, rdi
mov r8d, 0x10
mov word [rsp + 0x32], ax
call qword [sym.imp.WS2_32.dll_connect]
lea rax, [rsi + 0x10]
mov rcx, rsi
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x60], rax
mov rax, qword [rbx + 0x28]
mov byte [rsp + 0x70], 0
lea rdx, [rax + 4]
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.reserve_unsigned_long_long_
movabs rax, 0x7fffffffffffffff
sub rax, qword [rsp + 0x68]
cmp rax, 3
jbe 0x40246a
lea rdx, str.GET
mov r8d, 4
mov rcx, rsi
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___._M_append_char_const__unsigned_long_long_
mov rdx, qword [rbx + 0x20]
mov rcx, rsi
mov r8, qword [rbx + 0x28]
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___._M_append_char_const__unsigned_long_long_
movabs rax, 0x7fffffffffffffff
sub rax, qword [rsp + 0x68]
cmp rax, 0x10
jbe 0x40245e
lea rdx, str._HTTP_1.1_r_nHost:
mov r8d, 0x11
mov rcx, rsi
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___._M_append_char_const__unsigned_long_long_
lea r13, [rsp + 0x80]
lea rdx, [r13 + 0x10]
mov qword [rsp + 0x80], rdx
mov rcx, qword [rax]
lea rdx, [rax + 0x10]
cmp rcx, rdx
je 0x402400
mov qword [rsp + 0x80], rcx
mov rcx, qword [rax + 0x10]
mov qword [rsp + 0x90], rcx
mov rcx, qword [rax + 8]
mov qword [rsp + 0x88], rcx
mov rcx, r13
mov qword [rax], rdx
mov qword [rax + 8], 0
mov byte [rax + 0x10], 0
mov r8, qword [rbx + 8]
mov rdx, qword [rbx]
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___._M_append_char_const__unsigned_long_long_
lea rbx, [rsp + 0xa0]
lea rdx, [rbx + 0x10]
mov qword [rsp + 0xa0], rdx
mov rcx, qword [rax]
lea rdx, [rax + 0x10]
cmp rcx, rdx
je 0x4023e4
mov qword [rsp + 0xa0], rcx
mov rcx, qword [rax + 0x10]
mov qword [rsp + 0xb0], rcx
mov rcx, qword [rax + 8]
mov qword [rsp + 0xa8], rcx
mov qword [rax], rdx
mov qword [rax + 8], 0
mov byte [rax + 0x10], 0
movabs rax, 0x7fffffffffffffff
sub rax, qword [rsp + 0xa8]
cmp rax, 0x16
jbe 0x402452
lea rdx, str._r_nConnection:_close_r_n_r_n
mov r8d, 0x17
mov rcx, rbx
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___._M_append_char_const__unsigned_long_long_
lea r14, [rsp + 0x40]
lea rdx, [r14 + 0x10]
mov qword [rsp + 0x40], rdx
mov rcx, qword [rax]
lea rdx, [rax + 0x10]
cmp rcx, rdx
je 0x4023d5
mov qword [rsp + 0x40], rcx
mov rcx, qword [rax + 0x10]
mov qword [rsp + 0x50], rcx
mov rcx, qword [rax + 8]
mov byte [rax + 0x10], 0
mov qword [rsp + 0x48], rcx
mov qword [rax], rdx
mov qword [rax + 8], 0
mov rcx, qword [rsp + 0xa0]
lea rax, [rbx + 0x10]
cmp rcx, rax
je 0x4021ce
call sym.operator_delete_void_
mov rcx, qword [rsp + 0x80]
lea rax, [r13 + 0x10]
cmp rcx, rax
je 0x4021e4
call sym.operator_delete_void_
mov rcx, qword [rsp + 0x60]
lea rax, [rsi + 0x10]
cmp rcx, rax
je 0x4021f7
call sym.operator_delete_void_
xor r9d, r9d
mov r8d, dword [rsp + 0x48]
mov rcx, rdi
mov rdx, qword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_send]
lea rax, [rsi + 0x10]
mov byte [rsp + 0x70], 0
mov rbp, qword [sym.imp.WS2_32.dll_recv]
movabs r12, 0x7fffffffffffffff
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], 0
jmp 0x40225f
movsxd r8, eax
mov rax, r12
sub rax, qword [rsp + 0x68]
cmp r8, rax
ja 0x402430
mov rdx, rbx
mov rcx, rsi
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___._M_append_char_const__unsigned_long_long_
xor r9d, r9d
mov r8d, 0x400
mov rdx, rbx
mov rcx, rdi
call rbp
test eax, eax
jg 0x402240
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
xor r8d, r8d
mov r9d, 4
mov rcx, rsi
lea rdx, str._r_n_r_n
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.find_char_const__unsigned_long_long__unsigned_long_long__const
cmp rax, 0xffffffffffffffff
je 0x402412
mov r9, qword [rsp + 0x68]
add rax, 4
cmp rax, r9
ja 0x40243c
lea rdx, [r13 + 0x10]
mov rbx, r9
mov qword [rsp + 0x80], rdx
mov rdx, qword [rsp + 0x60]
sub rbx, rax
lea rdi, [rdx + rax]
add rdx, r9
je 0x4022da
test rdi, rdi
je 0x402476
cmp rbx, 0xf
mov qword [rsp + 0x28], rbx
ja 0x402390
cmp rbx, 1
jne 0x402420
movzx eax, byte [rdi]
mov byte [rsp + 0x90], al
lea rax, [r13 + 0x10]
mov qword [rsp + 0x88], rbx
mov byte [rax + rbx], 0
mov rax, qword [rsp + 0x88]
lea rcx, [rax + 1]
call sym.operator_new___unsigned_long_long_
mov rbp, qword [rsp + 0x88]
mov rcx, rax
add r13, 0x10
mov rbx, rax
mov rdi, qword [rsp + 0x80]
mov r8, rbp
mov rdx, rdi
call sym.memcpy
cmp rdi, r13
mov byte [rbx + rbp], 0
je 0x402354
mov rcx, rdi
call sym.operator_delete_void_
mov rcx, qword [rsp + 0x60]
add rsi, 0x10
cmp rcx, rsi
je 0x402367
call sym.operator_delete_void_
mov rcx, qword [rsp + 0x40]
add r14, 0x10
cmp rcx, r14
je 0x40237a
call sym.operator_delete_void_
mov rax, rbx
add rsp, 0x4a0
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
lea rdx, [rsp + 0x28]
xor r8d, r8d
mov rcx, r13
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___._M_create_unsigned_long_long__unsigned_long_long_
mov rdx, qword [rsp + 0x28]
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x90], rdx
mov r8, rbx
mov rdx, rdi
mov rcx, rax
call sym.memcpy
mov rbx, qword [rsp + 0x28]
mov rax, qword [rsp + 0x80]
jmp 0x402301
movdqu xmm2, xmmword [rax + 0x10]
movaps xmmword [rsp + 0x50], xmm2
jmp 0x4021a0
movdqu xmm1, xmmword [rax + 0x10]
movaps xmmword [rsp + 0xb0], xmm1
jmp 0x402128
movdqu xmm0, xmmword [rax + 0x10]
movaps xmmword [rsp + 0x90], xmm0
jmp 0x4020c6
xor ebx, ebx
jmp 0x402354
lea rax, [r13 + 0x10]
test rbx, rbx
je 0x402301
jmp 0x4023b5
lea rcx, [0x004a60d0]
call method.std.__throw_length_error_char_const_
lea rdx, [0x004a6119]
mov r8, rax
lea rcx, [0x004a6130]
call method.std.__throw_out_of_range_fmt_char_const__..._
lea rcx, [0x004a60d0]
call method.std.__throw_length_error_char_const_
lea rcx, [0x004a60d0]
call method.std.__throw_length_error_char_const_
lea rcx, [0x004a60d0]
call method.std.__throw_length_error_char_const_
lea rcx, [0x004a6168]
call method.std.__throw_logic_error_char_const_
mov rcx, qword [rsp + 0x80]
add r13, 0x10
mov rbx, rax
cmp rcx, r13
je 0x40249b
call sym.operator_delete_void_
mov rcx, qword [rsp + 0x60]
add rsi, 0x10
cmp rcx, rsi
je 0x4024ae
call sym.operator_delete_void_
mov rcx, qword [rsp + 0x40]
add r14, 0x10
cmp rcx, r14
je 0x4024c1
call sym.operator_delete_void_
mov rcx, rbx
call dbg._Unwind_Resume
mov rbx, rax
jmp 0x40249b