Function at 0x140070730
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 [0x14012e7c0]
xor rax, rsp
mov qword [rbp + 0x960], rax
mov r15, r8
mov rdi, rcx
cmp qword [rcx + 0x10], 0x200
jb 0x1400707c3
cmp qword [rcx + 0x18], 0xf
jbe 0x14007077a
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.14006f6c0
xor eax, eax
mov rcx, qword [rbp + 0x960]
xor rcx, rsp
call fcn.1400d8150
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 0x1400707ee
cmp qword [r8 + 0x18], 0xf
jbe 0x1400707d7
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 0x14007078f
cmp qword [rcx + 0x18], 0xf
jbe 0x1400707f8
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.1400299a0
cmp eax, 3
je 0x1400708bd
mov rcx, rdi
cmp qword [rdi + 0x18], 0xf
jbe 0x140070832
mov rcx, qword [rdi]
lea r9, [rbp + 0x760]
lea r8, [rbp + 0x560]
lea rdx, str.ws:____:____s
call fcn.1400299a0
cmp eax, 2
jne 0x14007085b
mov dword [rsp + 0x68], 0x50
jmp 0x1400708bd
mov rcx, rdi
cmp qword [rdi + 0x18], 0xf
jbe 0x140070868
mov rcx, qword [rdi]
lea r9, [rsp + 0x68]
lea r8, [rbp + 0x560]
lea rdx, str.ws:____:__:_d
call fcn.1400299a0
cmp eax, 2
je 0x1400708b6
mov rcx, rdi
cmp qword [rdi + 0x18], 0xf
jbe 0x140070892
mov rcx, qword [rdi]
lea r8, [rbp + 0x560]
lea rdx, str.ws:____:__
call fcn.1400299a0
cmp eax, 1
jne 0x140070956
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 0x1400708f0
lea rdx, [rbp + 0x560]
lea rcx, [rsp + 0x40]
call fcn.140002e80
nop
mov ecx, 0x202
lea rdx, [rbp - 0x50]
call qword [sym.imp.WS2_32.dll_WSAStartup]
mov ebx, eax
test eax, eax
je 0x14007097a
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.140008fa0
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, [0x140009180]
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 0x140070a93
cmp qword [rdi + 0x18], 0xf
jbe 0x140070960
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 0x14007078f
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, [0x140115e90]
mov edx, reloc.WS2_32.dll_recv
lea rcx, [rbp + 0x150]
call fcn.140070f80
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 0x140070a34
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0x400
lea rbx, [0x140130a10]
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.14006f6c0
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov esi, 1
jmp 0x140070a93
mov rbx, qword [rsp + 0x60]
test rbx, rbx
je 0x140070a89
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 0x140070a7b
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 0x140070a84
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rsi, r14
mov rbx, qword [rbx + 0x28]
test rbx, rbx
jne 0x140070a40
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 0x140070ad3
inc rdx
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140070ace
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140070ace
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400d83f4
cmp rsi, 0xffffffffffffffff
jne 0x140070b06
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.14006f6c0
jmp 0x140070797
lea r9, [rbp + 0x760]
lea r8, str.GET___s_HTTP_1.1_r_n
mov edx, 0x400
lea rcx, [rbp + 0x160]
call fcn.140071550
lea rax, [rbp + 0x160]
mov r8, r14
nop
inc r8
cmp byte [rax + r8], 0
jne 0x140070b30
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 0x140070b8c
lea r8, str.Host:__s_r_n
call fcn.140071550
lea rax, [rbp + 0x160]
mov r8, r14
nop
inc r8
cmp byte [rax + r8], 0
jne 0x140070b80
jmp 0x140070bb0
mov dword [rsp + 0x20], eax
lea r8, str.Host:__s:_d_r_n
call fcn.140071550
lea rax, [rbp + 0x160]
mov r8, r14
inc r8
cmp byte [rax + r8], 0
jne 0x140070ba6
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.140071550
lea rax, [rbp + 0x160]
mov r8, r14
inc r8
cmp byte [rax + r8], 0
jne 0x140070be5
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.140071550
lea rax, [rbp + 0x160]
mov r8, r14
inc r8
cmp byte [rax + r8], 0
jne 0x140070c24
xor r9d, r9d
lea rdx, [rbp + 0x160]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
cmp qword [r15 + 0x10], 0
je 0x140070c9d
cmp qword [r15 + 0x18], 0xf
jbe 0x140070c52
mov r15, qword [r15]
mov r9, r15
lea r8, str.Origin:__s_r_n
mov edx, 0x400
lea rcx, [rbp + 0x160]
call fcn.140071550
lea rax, [rbp + 0x160]
mov r8, r14
nop word [rax + rax]
inc r8
cmp byte [rax + r8], 0
jne 0x140070c80
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.140071550
lea rax, [rbp + 0x160]
mov r8, r14
nop
inc r8
cmp byte [rax + r8], 0
jne 0x140070cc0
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.140071550
lea rax, [rbp + 0x160]
mov r8, r14
nop
inc r8
cmp byte [rax + r8], 0
jne 0x140070d00
xor r9d, r9d
lea rdx, [rbp + 0x160]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
lea r8, [0x140115de4]
mov edx, 0x400
lea rcx, [rbp + 0x160]
call fcn.140071550
lea rax, [rbp + 0x160]
nop dword [rax]
inc r14
cmp byte [rax + r14], 0
jne 0x140070d40
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 0x140070d8a
cmp ebx, 0x3ff
jge 0x140070db8
cmp byte [r14 - 1], 0xd
je 0x140070db8
cmp byte [r14], 0xa
je 0x140070db8
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 0x140070797
inc ebx
inc r14
jmp 0x140070d70
movsxd rax, ebx
cmp rax, 0x400
jae 0x140070f73
mov byte [rbp + rax + 0x160], 0
cmp ebx, 0x3ff
jne 0x140070dfb
cmp qword [rdi + 0x18], 0xf
jbe 0x140070de1
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 0x14007078f
lea r8, [rsp + 0x60]
lea rdx, str.HTTP_1.1__d
lea rcx, [rbp + 0x160]
call fcn.1400299a0
cmp eax, 1
jne 0x140070f40
cmp dword [rsp + 0x60], 0x65
jne 0x140070f40
lea r14, [rbp + 0x160]
nop
mov ebx, r13d
lea rdi, [r14 - 1]
cmp ebx, 2
jl 0x140070e4f
cmp ebx, 0x3ff
jge 0x140070e7d
cmp byte [rdi - 1], 0xd
je 0x140070e7d
cmp byte [rdi], 0xa
je 0x140070e7d
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 0x140070797
inc ebx
inc rdi
jmp 0x140070e37
cmp byte [rbp + 0x160], 0xd
jne 0x140070e30
cmp byte [rbp + 0x161], 0xa
jne 0x140070e30
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.1400d8170
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 0x140070799
cmp qword [rdi + 0x18], 0xf
jbe 0x140070f4a
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.14006f6c0
jmp 0x140070797
call fcn.1400d8608
int3