Function at 0x140016f70
Capabilities:
Connect socket
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header
Set socket configuration

Disassembly:
push rbp
push rdi
push r15
lea rbp, [rsp - 0x7e0]
sub rsp, 0x8e0
mov rax, qword [0x1400a8040]
xor rax, rsp
mov qword [rbp + 0x7c0], rax
cmp qword [rcx + 0x10], 0x200
mov r15, r8
mov rdi, rcx
jb 0x140016fd2
cmp qword [rcx + 0x18], 0x10
jb 0x140016faf
mov rdi, qword [rcx]
mov ecx, 2
call fcn.140057d9c
mov rcx, rax
lea rdx, str.ERROR:_url_size_limit_exceeded:__s_n
mov r8, rdi
call fcn.140015fe0
xor eax, eax
jmp 0x14001730a
cmp qword [r8 + 0x10], 0xc8
jb 0x140017009
cmp qword [r8 + 0x18], 0x10
jb 0x140016fe6
mov r15, qword [r8]
mov ecx, 2
call fcn.140057d9c
mov rcx, rax
lea rdx, str.ERROR:_origin_size_limit_exceeded:__s_n
mov r8, r15
call fcn.140015fe0
xor eax, eax
jmp 0x14001730a
cmp qword [rcx + 0x18], 0x10
jb 0x140017013
mov rcx, qword [rcx]
lea rax, [rbp + 0x5c0]
lea r9, [rsp + 0x68]
mov qword [rsp + 0x20], rax
lea r8, [rbp + 0x3c0]
lea rdx, str.ws:____:__:_d__s
call fcn.140016030
cmp eax, 3
je 0x1400170d8
cmp qword [rdi + 0x18], 0x10
mov rcx, rdi
jb 0x14001704d
mov rcx, qword [rdi]
lea r9, [rbp + 0x5c0]
lea r8, [rbp + 0x3c0]
lea rdx, str.ws:____:____s
call fcn.140016030
cmp eax, 2
jne 0x140017076
mov dword [rsp + 0x68], 0x50
jmp 0x1400170d8
cmp qword [rdi + 0x18], 0x10
mov rcx, rdi
jb 0x140017083
mov rcx, qword [rdi]
lea r9, [rsp + 0x68]
lea r8, [rbp + 0x3c0]
lea rdx, str.ws:____:__:_d
call fcn.140016030
cmp eax, 2
je 0x1400170d1
cmp qword [rdi + 0x18], 0x10
mov rcx, rdi
jb 0x1400170ad
mov rcx, qword [rdi]
lea r8, [rbp + 0x3c0]
lea rdx, str.ws:____:__
call fcn.140016030
cmp eax, 1
jne 0x1400171ef
mov dword [rsp + 0x68], 0x50
mov byte [rbp + 0x5c0], 0
mov qword [rsp + 0x918], rsi
lea rax, [rbp + 0x3c0]
mov qword [rsp + 0x8d8], r12
xor r12d, r12d
mov qword [rsp + 0x8d0], r14
mov r14, 0xffffffffffffffff
mov r8, r14
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x58], select
inc r8
cmp byte [rax + r8], r12b
jne 0x140017117
lea rdx, [rbp + 0x3c0]
mov qword [rsp + 0x908], rbx
lea rcx, [rsp + 0x40]
call fcn.1400022d0
mov r9d, dword [rsp + 0x68]
lea r8, [0x14009a0a0]
xorps xmm0, xmm0
lea rcx, [rbp - 0x58]
movups xmmword [rsp + 0x78], xmm0
mov edx, reloc.WS2_32.dll_recv
mov dword [rbp - 0x80], 1
mov rsi, r14
movups xmmword [rbp - 0x78], xmm0
movups xmmword [rbp - 0x68], xmm0
call fcn.1400177a0
cmp qword [rsp + 0x58], 0x10
lea rcx, [rsp + 0x40]
lea r9, [rsp + 0x60]
cmovae rcx, qword [rsp + 0x40]
lea r8, [rsp + 0x78]
lea rdx, [rbp - 0x58]
call qword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x14001721c
mov qword [rsp + 0x30], r12
lea rbx, [0x1400c45a0]
mov dword [rsp + 0x28], 0x400
mov r9d, 0x400
mov r8d, eax
mov qword [rsp + 0x20], rbx
xor edx, edx
mov ecx, 0x12ff
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
mov ecx, 2
call fcn.140057d9c
mov rcx, rax
lea rdx, str.getaddrinfo:__s_n
mov r8, rbx
call fcn.140015fe0
mov esi, 1
jmp 0x140017281
cmp qword [rdi + 0x18], 0x10
jb 0x1400171f9
mov rdi, qword [rdi]
mov ecx, 2
call fcn.140057d9c
mov rcx, rax
lea rdx, str.ERROR:_Could_not_parse_WebSocket_url:__s_n
mov r8, rdi
call fcn.140015fe0
xor eax, eax
jmp 0x14001730a
mov rbx, qword [rsp + 0x60]
test rbx, rbx
je 0x140017278
nop word [rax + rax]
mov r8d, dword [rbx + 0xc]
mov edx, dword [rbx + 8]
mov ecx, dword [rbx + 4]
call qword [sym.imp.WS2_32.dll_socket]
mov rsi, rax
cmp rax, r14
je 0x14001726a
mov r8d, dword [rbx + 0x10]
mov rcx, rax
mov rdx, qword [rbx + 0x20]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, r14d
jne 0x140017273
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rsi, r14
mov rbx, qword [rbx + 0x28]
test rbx, rbx
jne 0x140017230
mov rbx, qword [rsp + 0x60]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
mov rdx, qword [rsp + 0x58]
cmp rdx, 0x10
jb 0x1400172be
mov rcx, qword [rsp + 0x40]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400172b9
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001772b
call fcn.140051220
cmp rsi, r14
jne 0x140017325
mov ecx, 2
call fcn.140057d9c
mov r9d, dword [rsp + 0x68]
lea r8, [rbp + 0x3c0]
mov rcx, rax
lea rdx, str.Unable_to_connect_to__s:_d_n
call fcn.140015fe0
xor eax, eax
mov rbx, qword [rsp + 0x908]
mov rsi, qword [rsp + 0x918]
mov r12, qword [rsp + 0x8d8]
mov r14, qword [rsp + 0x8d0]
mov rcx, qword [rbp + 0x7c0]
xor rcx, rsp
call fcn.140051200
add rsp, 0x8e0
pop r15
pop rdi
pop rbp
ret
lea r9, [rbp + 0x5c0]
mov edx, 0x400
lea r8, str.GET___s_HTTP_1.1_r_n
lea rcx, [rbp - 0x40]
call fcn.140017c70
lea rax, [rbp - 0x40]
mov r8, r14
nop dword [rax + rax]
inc r8
cmp byte [rax + r8], r12b
jne 0x140017350
xor r9d, r9d
lea rdx, [rbp - 0x40]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
mov eax, dword [rsp + 0x68]
lea r9, [rbp + 0x3c0]
lea rcx, [rbp - 0x40]
mov edx, 0x400
cmp eax, 0x50
jne 0x1400173a0
lea r8, str.Host:__s_r_n
call fcn.140017c70
lea rax, [rbp - 0x40]
mov r8, r14
inc r8
cmp byte [rax + r8], r12b
jne 0x140017395
jmp 0x1400173c0
lea r8, str.Host:__s:_d_r_n
mov dword [rsp + 0x20], eax
call fcn.140017c70
lea rax, [rbp - 0x40]
mov r8, r14
inc r8
cmp byte [rax + r8], r12b
jne 0x1400173b7
xor r9d, r9d
lea rdx, [rbp - 0x40]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
lea r8, str.Upgrade:_websocket_r_n
mov edx, 0x400
lea rcx, [rbp - 0x40]
call fcn.140017c70
lea rax, [rbp - 0x40]
mov r8, r14
nop dword [rax]
inc r8
cmp byte [rax + r8], r12b
jne 0x1400173f0
xor r9d, r9d
lea rdx, [rbp - 0x40]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
lea r8, str.Connection:_Upgrade_r_n
mov edx, 0x400
lea rcx, [rbp - 0x40]
call fcn.140017c70
lea rax, [rbp - 0x40]
mov r8, r14
inc r8
cmp byte [rax + r8], r12b
jne 0x140017425
xor r9d, r9d
lea rdx, [rbp - 0x40]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
cmp qword [r15 + 0x10], r12
je 0x140017489
cmp qword [r15 + 0x18], 0x10
jb 0x14001744e
mov r15, qword [r15]
mov r9, r15
lea r8, str.Origin:__s_r_n
mov edx, 0x400
lea rcx, [rbp - 0x40]
call fcn.140017c70
lea rax, [rbp - 0x40]
mov r8, r14
nop dword [rax]
inc r8
cmp byte [rax + r8], r12b
jne 0x140017470
xor r9d, r9d
lea rdx, [rbp - 0x40]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
lea r8, str.Sec_WebSocket_Key:_x3JJHMbDL1EzLkh9GBhXDw_r_n
mov edx, 0x400
lea rcx, [rbp - 0x40]
call fcn.140017c70
lea rax, [rbp - 0x40]
mov r8, r14
inc r8
cmp byte [rax + r8], r12b
jne 0x1400174a5
xor r9d, r9d
lea rdx, [rbp - 0x40]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
lea r8, str.Sec_WebSocket_Version:_13_r_n
mov edx, 0x400
lea rcx, [rbp - 0x40]
call fcn.140017c70
lea rax, [rbp - 0x40]
mov r8, r14
nop word [rax + rax]
inc r8
cmp byte [rax + r8], r12b
jne 0x1400174e0
xor r9d, r9d
lea rdx, [rbp - 0x40]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
lea r8, [0x14009a304]
mov edx, 0x400
lea rcx, [rbp - 0x40]
call fcn.140017c70
lea rax, [rbp - 0x40]
inc r14
cmp byte [rax + r14], r12b
jne 0x140017512
mov r8, r14
lea rdx, [rbp - 0x40]
xor r9d, r9d
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
lea r15, [rbp - 0x40]
mov ebx, r12d
lea r14, [r15 - 1]
nop dword [rax]
cmp ebx, 2
jl 0x14001755a
cmp ebx, 0x3ff
jge 0x140017583
cmp byte [r14 - 1], 0xd
je 0x140017583
cmp byte [r14], 0xa
je 0x140017583
xor r9d, r9d
movsxd rax, ebx
lea rdx, [rbp - 0x40]
mov rcx, rsi
add rdx, rax
lea r8d, [r9 + 1]
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x1400172e8
inc ebx
inc r14
jmp 0x140017540
movsxd rax, ebx
cmp rax, 0x400
jae 0x140017731
mov byte [rbp + rax - 0x40], r12b
cmp ebx, 0x3ff
jne 0x1400175ca
cmp qword [rdi + 0x18], 0x10
jb 0x1400175a9
mov rdi, qword [rdi]
mov ecx, 2
call fcn.140057d9c
mov rcx, rax
lea rdx, str.ERROR:_Got_invalid_status_line_connecting_to:__s_n
mov r8, rdi
call fcn.140015fe0
jmp 0x1400172e8
lea r8, [rsp + 0x60]
lea rdx, str.HTTP_1.1__d
lea rcx, [rbp - 0x40]
call fcn.140016030
cmp eax, 1
jne 0x1400176fc
cmp dword [rsp + 0x60], 0x65
jne 0x1400176fc
mov ebx, r12d
lea rdi, [r15 - 1]
nop word [rax + rax]
cmp ebx, 2
jl 0x140017618
cmp ebx, 0x3ff
jge 0x140017641
cmp byte [rdi - 1], 0xd
je 0x140017641
cmp byte [rdi], 0xa
je 0x140017641
xor r9d, r9d
movsxd rax, ebx
lea rdx, [rbp - 0x40]
mov rcx, rsi
add rdx, rax
lea r8d, [r9 + 1]
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x1400172e8
inc ebx
inc rdi
jmp 0x140017600
cmp byte [rbp - 0x40], 0xd
jne 0x1400175f3
cmp byte [rbp - 0x3f], 0xa
jne 0x1400175f3
mov edx, 6
mov dword [rsp + 0x6c], 1
lea r9, [rsp + 0x6c]
mov dword [rsp + 0x20], 4
mov rcx, rsi
lea r8d, [rdx - 5]
call qword [sym.imp.WS2_32.dll_setsockopt]
lea r8, [rsp + 0x70]
mov dword [rsp + 0x70], 1
mov edx, 0x8004667e
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov ecx, 0x60
call fcn.140051228
mov qword [rsp + 0x60], rax
lea rcx, vtable._RealWebSocket.0
xorps xmm0, xmm0
movups xmmword [rax], xmm0
movups xmmword [rax + 0x10], xmm0
movups xmmword [rax + 0x20], xmm0
movups xmmword [rax + 0x30], xmm0
movups xmmword [rax + 0x40], xmm0
movups xmmword [rax + 0x50], xmm0
mov qword [rax], rcx
mov qword [rax + 8], r12
mov qword [rax + 0x10], r12
mov qword [rax + 0x18], r12
mov qword [rax + 0x20], r12
mov qword [rax + 0x28], r12
mov qword [rax + 0x30], r12
mov qword [rax + 0x38], r12
mov qword [rax + 0x40], r12
mov qword [rax + 0x48], r12
mov qword [rax + 0x50], rsi
mov dword [rax + 0x58], 3
mov word [rax + 0x5c], 1
jmp 0x1400172ea
cmp qword [rdi + 0x18], 0x10
jb 0x140017706
mov rdi, qword [rdi]
mov ecx, 2
call fcn.140057d9c
mov rcx, rax
lea r9, [rbp - 0x40]
mov r8, rdi
lea rdx, str.ERROR:_Got_bad_status_connecting_to__s:__s
call fcn.140015fe0
jmp 0x1400172e8
call fcn.1400578f0
int3
call fcn.140051928
int3