Function at 0x140066450
Capabilities:
Connect 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
Set socket configuration

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x970]
sub rsp, 0xa70
mov rax, qword [0x1400b3040]
xor rax, rsp
mov qword [rbp + 0x960], rax
mov r15, r8
mov rdi, rcx
cmp qword [rcx + 0x10], 0x200
jb 0x1400664e3
cmp qword [rcx + 0x18], 0xf
jbe 0x14006649a
mov rdi, qword [rcx]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, rdi
lea rdx, str.ERROR:_url_size_limit_exceeded:__s_n
mov rcx, rax
call fcn.1400653e0
xor eax, eax
mov rcx, qword [rbp + 0x960]
xor rcx, rsp
call fcn.1400731b0
mov rbx, qword [rsp + 0xab8]
add rsp, 0xa70
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
cmp qword [r8 + 0x10], 0xc8
jb 0x14006650e
cmp qword [r8 + 0x18], 0xf
jbe 0x1400664f7
mov r15, qword [r8]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, r15
lea rdx, str.ERROR:_origin_size_limit_exceeded:__s_n
jmp 0x1400664af
cmp qword [rcx + 0x18], 0xf
jbe 0x140066518
mov rcx, qword [rcx]
lea rax, [rbp + 0x760]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x68]
lea r8, [rbp + 0x560]
lea rdx, str.ws:____:__:_d__s
call fcn.140028dc0
cmp eax, 3
je 0x1400665dd
mov rcx, rdi
cmp qword [rdi + 0x18], 0xf
jbe 0x140066552
mov rcx, qword [rdi]
lea r9, [rbp + 0x760]
lea r8, [rbp + 0x560]
lea rdx, str.ws:____:____s
call fcn.140028dc0
cmp eax, 2
jne 0x14006657b
mov dword [rsp + 0x68], 0x50
jmp 0x1400665dd
mov rcx, rdi
cmp qword [rdi + 0x18], 0xf
jbe 0x140066588
mov rcx, qword [rdi]
lea r9, [rsp + 0x68]
lea r8, [rbp + 0x560]
lea rdx, str.ws:____:__:_d
call fcn.140028dc0
cmp eax, 2
je 0x1400665d6
mov rcx, rdi
cmp qword [rdi + 0x18], 0xf
jbe 0x1400665b2
mov rcx, qword [rdi]
lea r8, [rbp + 0x560]
lea rdx, str.ws:____:__
call fcn.140028dc0
cmp eax, 1
jne 0x140066676
mov dword [rsp + 0x68], 0x50
mov byte [rbp + 0x760], 0
mov r12d, dword [rsp + 0x68]
xorps xmm0, xmm0
movups xmmword [rsp + 0x40], xmm0
xor r13d, r13d
mov qword [rsp + 0x50], r13
mov qword [rsp + 0x58], r13
lea rax, [rbp + 0x560]
mov r14, 0xffffffffffffffff
mov r8, r14
nop dword [rax + rax]
inc r8
cmp byte [rax + r8], r13b
jne 0x140066610
lea rdx, [rbp + 0x560]
lea rcx, [rsp + 0x40]
call fcn.140002c80
nop
mov ecx, 0x202
lea rdx, [rbp - 0x50]
call qword [sym.imp.WS2_32.dll_WSAStartup]
mov ebx, eax
test eax, eax
je 0x14006669a
lea rdx, str.WSAStartup_failed:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140008c90
mov edx, ebx
mov rcx, rax
call qword [sym.imp.MSVCP140.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, [0x140008e70]
mov rcx, rax
call qword [sym.imp.MSVCP140.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 rsi, r14
jmp 0x1400667b3
cmp qword [rdi + 0x18], 0xf
jbe 0x140066680
mov rdi, qword [rdi]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, rdi
lea rdx, str.ERROR:_Could_not_parse_WebSocket_url:__s_n
jmp 0x1400664af
mov rsi, r14
xorps xmm0, xmm0
movups xmmword [rsp + 0x78], xmm0
movups xmmword [rbp - 0x78], xmm0
movups xmmword [rbp - 0x68], xmm0
mov dword [rbp - 0x80], 1
mov r9d, r12d
lea r8, [0x14009ffb0]
mov edx, reloc.WS2_32.dll_recv
lea rcx, [rbp + 0x150]
call fcn.140066ca0
lea rcx, [rsp + 0x40]
cmp qword [rsp + 0x58], 0xf
cmova rcx, qword [rsp + 0x40]
lea r9, [rsp + 0x60]
lea r8, [rsp + 0x78]
lea rdx, [rbp + 0x150]
call qword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x140066754
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0x400
lea rbx, [0x1400b5840]
mov qword [rsp + 0x20], rbx
mov r9d, 0x400
mov r8d, eax
xor edx, edx
mov ecx, 0x12ff
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, rbx
lea rdx, str.getaddrinfo:__s_n
mov rcx, rax
call fcn.1400653e0
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov esi, 1
jmp 0x1400667b3
mov rbx, qword [rsp + 0x60]
test rbx, rbx
je 0x1400667a9
nop
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, 0xffffffffffffffff
je 0x14006679b
mov r8d, dword [rbx + 0x10]
mov rdx, qword [rbx + 0x20]
mov rcx, rax
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x1400667a4
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rsi, r14
mov rbx, qword [rbx + 0x28]
test rbx, rbx
jne 0x140066760
mov rbx, qword [rsp + 0x60]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
nop
mov rdx, qword [rsp + 0x58]
cmp rdx, 0xf
jbe 0x1400667f3
inc rdx
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400667ee
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400667ee
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140073454
cmp rsi, 0xffffffffffffffff
jne 0x140066826
mov ebx, dword [rsp + 0x68]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9d, ebx
lea r8, [rbp + 0x560]
lea rdx, str.Unable_to_connect_to__s:_d_n
mov rcx, rax
call fcn.1400653e0
jmp 0x1400664b7
lea r9, [rbp + 0x760]
lea r8, str.GET___s_HTTP_1.1_r_n
mov edx, 0x400
lea rcx, [rbp + 0x160]
call fcn.140067270
lea rax, [rbp + 0x160]
mov r8, r14
nop
inc r8
cmp byte [rax + r8], 0
jne 0x140066850
xor r9d, r9d
lea rdx, [rbp + 0x160]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
mov eax, dword [rsp + 0x68]
lea r9, [rbp + 0x560]
mov edx, 0x400
lea rcx, [rbp + 0x160]
cmp eax, 0x50
jne 0x1400668ac
lea r8, str.Host:__s_r_n
call fcn.140067270
lea rax, [rbp + 0x160]
mov r8, r14
nop
inc r8
cmp byte [rax + r8], 0
jne 0x1400668a0
jmp 0x1400668d0
mov dword [rsp + 0x20], eax
lea r8, str.Host:__s:_d_r_n
call fcn.140067270
lea rax, [rbp + 0x160]
mov r8, r14
inc r8
cmp byte [rax + r8], 0
jne 0x1400668c6
xor r9d, r9d
lea rdx, [rbp + 0x160]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
lea r8, str.Upgrade:_websocket_r_n
mov edx, 0x400
lea rcx, [rbp + 0x160]
call fcn.140067270
lea rax, [rbp + 0x160]
mov r8, r14
inc r8
cmp byte [rax + r8], 0
jne 0x140066905
xor r9d, r9d
lea rdx, [rbp + 0x160]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
lea r8, str.Connection:_Upgrade_r_n
mov edx, 0x400
lea rcx, [rbp + 0x160]
call fcn.140067270
lea rax, [rbp + 0x160]
mov r8, r14
inc r8
cmp byte [rax + r8], 0
jne 0x140066944
xor r9d, r9d
lea rdx, [rbp + 0x160]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
cmp qword [r15 + 0x10], 0
je 0x1400669bd
cmp qword [r15 + 0x18], 0xf
jbe 0x140066972
mov r15, qword [r15]
mov r9, r15
lea r8, str.Origin:__s_r_n
mov edx, 0x400
lea rcx, [rbp + 0x160]
call fcn.140067270
lea rax, [rbp + 0x160]
mov r8, r14
nop word [rax + rax]
inc r8
cmp byte [rax + r8], 0
jne 0x1400669a0
xor r9d, r9d
lea rdx, [rbp + 0x160]
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 + 0x160]
call fcn.140067270
lea rax, [rbp + 0x160]
mov r8, r14
nop
inc r8
cmp byte [rax + r8], 0
jne 0x1400669e0
xor r9d, r9d
lea rdx, [rbp + 0x160]
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 + 0x160]
call fcn.140067270
lea rax, [rbp + 0x160]
mov r8, r14
nop
inc r8
cmp byte [rax + r8], 0
jne 0x140066a20
xor r9d, r9d
lea rdx, [rbp + 0x160]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
lea r8, [0x14009ff10]
mov edx, 0x400
lea rcx, [rbp + 0x160]
call fcn.140067270
lea rax, [rbp + 0x160]
nop dword [rax]
inc r14
cmp byte [rax + r14], 0
jne 0x140066a60
mov r8, r14
xor r9d, r9d
lea rdx, [rbp + 0x160]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
mov ebx, r13d
lea r14, [rbp + 0x160]
dec r14
nop dword [rax]
cmp ebx, 2
jl 0x140066aaa
cmp ebx, 0x3ff
jge 0x140066ad8
cmp byte [r14 - 1], 0xd
je 0x140066ad8
cmp byte [r14], 0xa
je 0x140066ad8
movsxd rax, ebx
lea rdx, [rbp + 0x160]
add rdx, rax
xor r9d, r9d
mov r8d, 1
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x1400664b7
inc ebx
inc r14
jmp 0x140066a90
movsxd rax, ebx
cmp rax, 0x400
jae 0x140066c93
mov byte [rbp + rax + 0x160], 0
cmp ebx, 0x3ff
jne 0x140066b1b
cmp qword [rdi + 0x18], 0xf
jbe 0x140066b01
mov rdi, qword [rdi]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, rdi
lea rdx, str.ERROR:_Got_invalid_status_line_connecting_to:__s_n
jmp 0x1400664af
lea r8, [rsp + 0x60]
lea rdx, str.HTTP_1.1__d
lea rcx, [rbp + 0x160]
call fcn.140028dc0
cmp eax, 1
jne 0x140066c60
cmp dword [rsp + 0x60], 0x65
jne 0x140066c60
lea r14, [rbp + 0x160]
nop
mov ebx, r13d
lea rdi, [r14 - 1]
cmp ebx, 2
jl 0x140066b6f
cmp ebx, 0x3ff
jge 0x140066b9d
cmp byte [rdi - 1], 0xd
je 0x140066b9d
cmp byte [rdi], 0xa
je 0x140066b9d
movsxd rax, ebx
lea rdx, [rbp + 0x160]
add rdx, rax
xor r9d, r9d
mov r8d, 1
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x1400664b7
inc ebx
inc rdi
jmp 0x140066b57
cmp byte [rbp + 0x160], 0xd
jne 0x140066b50
cmp byte [rbp + 0x161], 0xa
jne 0x140066b50
mov dword [rsp + 0x6c], 1
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x6c]
mov edx, 6
mov r8d, 1
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_setsockopt]
mov dword [rsp + 0x70], 1
lea r8, [rsp + 0x70]
mov edx, 0x8004667e
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov ecx, 0x60
call fcn.1400731d0
mov qword [rsp + 0x60], rax
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
lea rcx, vtable._RealWebSocket.0
mov qword [rax], rcx
mov qword [rax + 8], r13
mov qword [rax + 0x10], r13
mov qword [rax + 0x18], r13
mov qword [rax + 0x20], r13
mov qword [rax + 0x28], r13
mov qword [rax + 0x30], r13
mov qword [rax + 0x38], r13
mov qword [rax + 0x40], r13
mov qword [rax + 0x48], r13
mov qword [rax + 0x50], rsi
mov dword [rax + 0x58], 3
mov word [rax + 0x5c], 1
jmp 0x1400664b9
cmp qword [rdi + 0x18], 0xf
jbe 0x140066c6a
mov rdi, qword [rdi]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea r9, [rbp + 0x160]
mov r8, rdi
lea rdx, str.ERROR:_Got_bad_status_connecting_to__s:__s
mov rcx, rax
call fcn.1400653e0
jmp 0x1400664b7
call fcn.140073668
int3