Function at 0x14000c400
Capabilities:
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 r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x898
cmp qword [rcx + 8], 0x1ff
mov dword [rsp + 0x4c], edx
mov r12, rcx
mov qword [rsp + 0x8f0], r8
ja 0x14000c9ad
cmp qword [r8 + 8], 0xc7
ja 0x14000c937
lea rdi, [rsp + 0x290]
mov rcx, qword [rcx]
lea rbx, [rsp + 0x54]
mov qword [rsp + 0x20], rdi
lea r13, [rsp + 0x90]
mov r9, rbx
lea rdx, str.ws:____:__:_d__s
mov r8, r13
mov qword [rsp + 0x38], rdi
call sym.sscanf_char_const__char_const__::_
cmp eax, 3
je 0x14000c7b8
mov rcx, qword [r12]
mov r9, rdi
mov r8, r13
lea rdx, str.ws:____:____s
call sym.sscanf_char_const__char_const__::_
cmp eax, 2
jne 0x14000c848
mov dword [rsp + 0x54], 0x50
mov ebx, 0x50
lea rax, [rsp + 0x70]
mov rcx, r13
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x70], rax
call sym.strlen
mov qword [rsp + 0x490], rax
mov rbp, rax
cmp rax, 0xf
ja 0x14000c7d8
cmp rax, 1
jne 0x14000c7c1
movzx edx, byte [rsp + 0x90]
mov byte [rsp + 0x80], dl
mov rdx, qword [rsp + 0x30]
mov qword [rsp + 0x78], rax
lea rsi, [rsp + 0x60]
pxor xmm0, xmm0
mov r9d, ebx
mov byte [rdx + rax], 0
lea r8, [0x140062272]
mov edx, 0x10
mov rcx, rsi
movaps xmmword [rsp + 0x490], xmm0
movaps xmmword [rsp + 0x4a0], xmm0
mov dword [rsp + 0x498], 1
movaps xmmword [rsp + 0x4b0], xmm0
call sym.snprintf_char__unsigned_long_long__char_const__::_
lea rdi, [rsp + 0x490]
mov rcx, qword [rsp + 0x70]
lea r9, [rsp + 0x58]
mov rdx, rsi
mov r8, rdi
call qword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
jne 0x14000c95c
mov rsi, qword [rsp + 0x58]
test rsi, rsi
je 0x14000c9d2
mov rbp, qword [sym.imp.WSOCK32.dll_socket]
mov r14, qword [sym.imp.WSOCK32.dll_connect]
mov r15, qword [sym.imp.WSOCK32.dll_closesocket]
nop dword [rax + rax]
mov edx, dword [rsi + 8]
mov ecx, dword [rsi + 4]
mov r8d, dword [rsi + 0xc]
call rbp
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14000c5c6
mov rdx, qword [rsi + 0x20]
mov r8d, dword [rsi + 0x10]
mov rcx, rax
call r14
cmp eax, 0xffffffff
jne 0x14000c5d6
mov rcx, rbx
call r15
mov rsi, qword [rsi + 0x28]
test rsi, rsi
jne 0x14000c598
mov rbx, 0xffffffffffffffff
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
mov rcx, qword [rsp + 0x70]
mov rax, qword [rsp + 0x30]
cmp rcx, rax
je 0x14000c601
mov rax, qword [rsp + 0x80]
lea rdx, [rax + 1]
call sym.operator_delete_void__unsigned_long_long_
cmp rbx, 0xffffffffffffffff
je 0x14000c9fa
mov r9, qword [rsp + 0x38]
lea r8, str.GET___s_HTTP_1.1_r_n
mov edx, 0x400
mov rcx, rdi
call sym.snprintf_char__unsigned_long_long__char_const__::_
mov rcx, rdi
call sym.strlen
xor r9d, r9d
mov rdx, rdi
mov rcx, rbx
mov rsi, qword [sym.imp.WSOCK32.dll_send]
mov r8d, eax
call rsi
mov eax, dword [rsp + 0x54]
cmp eax, 0x50
je 0x14000c874
mov dword [rsp + 0x20], eax
mov r9, r13
mov edx, 0x400
mov rcx, rdi
lea r8, str.Host:__s:_d_r_n
call sym.snprintf_char__unsigned_long_long__char_const__::_
mov rcx, rdi
call sym.strlen
xor r9d, r9d
mov rdx, rdi
mov rcx, rbx
mov r8d, eax
call rsi
lea r8, str.Upgrade:_websocket_r_n
mov edx, 0x400
mov rcx, rdi
call sym.snprintf_char__unsigned_long_long__char_const__::_
mov rcx, rdi
call sym.strlen
xor r9d, r9d
mov rdx, rdi
mov rcx, rbx
mov r8d, eax
call rsi
lea r8, str.Connection:_Upgrade_r_n
mov edx, 0x400
mov rcx, rdi
call sym.snprintf_char__unsigned_long_long__char_const__::_
mov rcx, rdi
call sym.strlen
xor r9d, r9d
mov rdx, rdi
mov rcx, rbx
mov r8d, eax
call rsi
mov rax, qword [rsp + 0x8f0]
cmp qword [rax + 8], 0
jne 0x14000c890
lea r8, str.Sec_WebSocket_Key:_x3JJHMbDL1EzLkh9GBhXDw_r_n
mov edx, 0x400
mov rcx, rdi
xor ebp, ebp
call sym.snprintf_char__unsigned_long_long__char_const__::_
mov rcx, rdi
call sym.strlen
xor r9d, r9d
mov rdx, rdi
mov rcx, rbx
mov r8d, eax
call rsi
lea r8, str.Sec_WebSocket_Version:_13_r_n
mov edx, 0x400
mov rcx, rdi
call sym.snprintf_char__unsigned_long_long__char_const__::_
mov rcx, rdi
call sym.strlen
xor r9d, r9d
mov rdx, rdi
mov rcx, rbx
mov r8d, eax
call rsi
lea r8, [0x140062352]
mov edx, 0x400
mov rcx, rdi
call sym.snprintf_char__unsigned_long_long__char_const__::_
mov rcx, rdi
call sym.strlen
xor r9d, r9d
mov rdx, rdi
mov rcx, rbx
mov r8d, eax
call rsi
mov r13, qword [sym.imp.WSOCK32.dll_recv]
mov rsi, rdi
jmp 0x14000c784
add ebp, 1
cmp ebp, 1
jne 0x14000ca62
mov rdx, rsi
xor r9d, r9d
mov r8d, 1
mov rcx, rbx
call r13
add rsi, 1
test eax, eax
jne 0x14000c778
xor eax, eax
add rsp, 0x898
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov ebx, dword [rsp + 0x54]
jmp 0x14000c4a7
test rax, rax
je 0x14000c4f9
mov rax, qword [rsp + 0x30]
jmp 0x14000c802
mov rcx, qword [rsp + 0x40]
lea rdx, [rsp + 0x490]
xor r8d, r8d
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::_M_create_unsigned_long_long__unsigned_long_long_
mov rdx, qword [rsp + 0x490]
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x80], rdx
cmp ebp, 8
jae 0x14000c8f3
test bpl, 4
jne 0x14000ca49
test ebp, ebp
je 0x14000c925
movzx edx, byte [rsp + 0x90]
mov byte [rax], dl
test bpl, 2
je 0x14000c925
mov ebp, ebp
movzx edx, word [r13 + rbp - 2]
mov word [rax + rbp - 2], dx
jmp 0x14000c925
mov rcx, qword [r12]
mov r9, rbx
mov r8, r13
lea rdx, str.ws:____:__:_d
call sym.sscanf_char_const__char_const__::_
cmp eax, 2
jne 0x14000c8c2
mov byte [rsp + 0x290], 0
mov ebx, dword [rsp + 0x54]
jmp 0x14000c4a7
mov r9, r13
lea r8, str.Host:__s_r_n
mov edx, 0x400
mov rcx, rdi
call sym.snprintf_char__unsigned_long_long__char_const__::_
jmp 0x14000c669
mov r9, qword [rax]
lea r8, str.Origin:__s_r_n
mov edx, 0x400
mov rcx, rdi
call sym.snprintf_char__unsigned_long_long__char_const__::_
mov rcx, rdi
call sym.strlen
xor r9d, r9d
mov rdx, rdi
mov rcx, rbx
mov r8d, eax
call rsi
jmp 0x14000c6e6
mov rcx, qword [r12]
mov r8, r13
lea rdx, str.ws:____:__
call sym.sscanf_char_const__char_const__::_
cmp eax, 1
jne 0x14000ca23
mov dword [rsp + 0x54], 0x50
mov byte [rsp + 0x290], 0
jmp 0x14000c4a2
mov rdx, qword [rsp + 0x90]
lea rdi, [rax + 8]
mov rsi, r13
and rdi, 0xfffffffffffffff8
mov qword [rax], rdx
mov edx, ebp
mov rcx, qword [r13 + rdx - 8]
mov qword [rax + rdx - 8], rcx
sub rax, rdi
lea ecx, [rbp + rax]
sub rsi, rax
shr ecx, 3
rep movsq qword [rdi], qword [rsi]
mov rax, qword [rsp + 0x490]
mov rdx, qword [rsp + 0x70]
jmp 0x14000c4fe
mov rbx, qword [r8]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str.ERROR:_origin_size_limit_exceeded:__s_n
mov rcx, rax
mov r8, rbx
call sym.fprintf__iobuf__char_const__::_
jmp 0x14000c79e
mov ecx, eax
call sym.gai_strerrorA
mov rbx, rax
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
mov r8, rbx
lea rdx, str.getaddrinfo:__s_n
call sym.fprintf__iobuf__char_const__::_
mov rcx, qword [rsp + 0x70]
mov rax, qword [rsp + 0x30]
cmp rcx, rax
je 0x14000c9a3
mov rax, qword [rsp + 0x80]
lea rdx, [rax + 1]
call sym.operator_delete_void__unsigned_long_long_
mov ebx, 1
jmp 0x14000c60b
mov rbx, qword [rcx]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str.ERROR:_url_size_limit_exceeded:__s_n
mov rcx, rax
mov r8, rbx
call sym.fprintf__iobuf__char_const__::_
jmp 0x14000c79e
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
mov rcx, qword [rsp + 0x70]
mov rax, qword [rsp + 0x30]
cmp rcx, rax
je 0x14000c9fa
mov rax, qword [rsp + 0x80]
lea rdx, [rax + 1]
call sym.operator_delete_void__unsigned_long_long_
mov ebx, dword [rsp + 0x54]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, r13
lea rdx, str.Unable_to_connect_to__s:_d_n
mov rcx, rax
mov r9d, ebx
call sym.fprintf__iobuf__char_const__::_
jmp 0x14000c79e
mov rbx, qword [r12]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str.ERROR:_Could_not_parse_WebSocket_url:__s_n
mov rcx, rax
mov r8, rbx
call sym.fprintf__iobuf__char_const__::_
jmp 0x14000c79e
mov edx, dword [rsp + 0x90]
mov ebp, ebp
mov dword [rax], edx
mov edx, dword [r13 + rbp - 4]
mov dword [rax + rbp - 4], edx
jmp 0x14000c925
cmp ebp, 0x3ff
je 0x14000cba0
cmp byte [rsi - 2], 0xd
je 0x14000ca7e
cmp byte [rsi - 1], 0xa
jne 0x14000c784
mov r8, qword [rsp + 0x40]
movsxd rbp, ebp
lea rdx, str.HTTP_1.1__d
mov rcx, rdi
mov byte [rsp + rbp + 0x490], 0
call sym.sscanf_char_const__char_const__::_
sub eax, 1
jne 0x14000cbce
cmp dword [rsp + 0x70], 0x65
jne 0x14000cbce
mov rsi, rdi
xor ebp, ebp
mov rdx, rsi
xor r9d, r9d
mov r8d, 1
mov rcx, rbx
call r13
add rsi, 1
test eax, eax
je 0x14000c79e
add ebp, 1
cmp ebp, 1
je 0x14000cab6
cmp ebp, 0x3ff
je 0x14000caf0
cmp byte [rsi - 2], 0xd
je 0x14000caf0
cmp byte [rsi - 1], 0xa
jne 0x14000cab6
cmp byte [rsp + 0x490], 0xd
jne 0x14000cab1
cmp byte [rsp + 0x491], 0xa
jne 0x14000cab1
mov r9, qword [rsp + 0x40]
mov r8d, 1
mov edx, 6
mov rcx, rbx
mov dword [rsp + 0x70], 1
mov dword [rsp + 0x20], 4
call qword [sym.imp.WSOCK32.dll_setsockopt]
mov r8, rdi
mov edx, 0x8004667e
mov rcx, rbx
mov dword [rsp + 0x490], 1
lea rdi, fcn.14000b220
call qword [sym.imp.WSOCK32.dll_ioctlsocket]
mov ecx, 0x60
call sym.operator_new_unsigned_long_long_
xor edx, edx
mov qword [rax], rdi
movzx edi, byte [rsp + 0x4c]
mov qword [rax + 8], rdx
mov qword [rax + 0x10], rdx
mov qword [rax + 0x18], rdx
mov qword [rax + 0x20], rdx
mov qword [rax + 0x28], rdx
mov qword [rax + 0x30], rdx
mov qword [rax + 0x38], rdx
mov qword [rax + 0x40], rdx
mov qword [rax + 0x48], rdx
mov qword [rax + 0x50], rbx
mov dword [rax + 0x58], 3
mov byte [rax + 0x5c], dil
mov byte [rax + 0x5d], 0
jmp 0x14000c7a0
mov rbx, qword [r12]
mov byte [rsp + 0x88f], 0
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str.ERROR:_Got_invalid_status_line_connecting_to:__s_n
mov rcx, rax
mov r8, rbx
call sym.fprintf__iobuf__char_const__::_
jmp 0x14000c79e
mov rbx, qword [r12]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, rdi
lea rdx, str.ERROR:_Got_bad_status_connecting_to__s:__s
mov rcx, rax
mov r8, rbx
call sym.fprintf__iobuf__char_const__::_
jmp 0x14000c79e