Function at 0x1400160e0
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:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rsp - 0x7c0]
sub rsp, 0x8c0
mov rax, qword [0x1403c6030]
xor rax, rsp
mov qword [rbp + 0x7b0], rax
mov r14, r8
cmp qword [0x1403c6130], 0x200
jae 0x140016700
cmp qword [r8 + 0x10], 0xc8
jae 0x140016700
lea rbx, [0x1403c6120]
mov rcx, rbx
cmp qword [reloc.WS2_32.dll_ntohs], 0x10
cmovae rcx, qword [0x1403c6120]
lea rax, [rbp + 0x5b0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
lea r8, [rbp + 0x3b0]
lea rdx, str.ws:____:__:_d__s
call fcn.140014240
cmp eax, 3
je 0x140016226
mov rcx, rbx
cmp qword [reloc.WS2_32.dll_ntohs], 0x10
cmovae rcx, qword [0x1403c6120]
lea r9, [rbp + 0x5b0]
lea r8, [rbp + 0x3b0]
lea rdx, str.ws:____:____s
call fcn.140014240
cmp eax, 2
je 0x14001621e
mov rcx, rbx
cmp qword [reloc.WS2_32.dll_ntohs], 0x10
cmovae rcx, qword [0x1403c6120]
lea r9, [rsp + 0x58]
lea r8, [rbp + 0x3b0]
lea rdx, str.ws:____:__:_d
call fcn.140014240
cmp eax, 2
jne 0x1400161e8
mov byte [rbp + 0x5b0], 0
jmp 0x140016226
cmp qword [reloc.WS2_32.dll_ntohs], 0x10
cmovae rbx, qword [0x1403c6120]
lea r8, [rbp + 0x3b0]
lea rdx, str.ws:____:__
mov rcx, rbx
call fcn.140014240
cmp eax, 1
jne 0x140016700
mov byte [rbp + 0x5b0], 0
mov dword [rsp + 0x58], 0x50
mov ebx, dword [rsp + 0x58]
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
xor r15d, r15d
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x48], r15
lea rax, [rbp + 0x3b0]
mov rdi, 0xffffffffffffffff
mov r8, rdi
inc r8
cmp byte [rax + r8], r15b
jne 0x140016250
lea rdx, [rbp + 0x3b0]
lea rcx, [rsp + 0x30]
call fcn.1400167a0
nop
mov rsi, rdi
xorps xmm0, xmm0
movups xmmword [rsp + 0x68], xmm0
movups xmmword [rsp + 0x78], xmm0
movups xmmword [rbp - 0x78], xmm0
mov dword [rsp + 0x70], 1
mov r9d, ebx
lea r8, [0x140343a1c]
mov edx, reloc.WS2_32.dll_recv
lea rcx, [rbp - 0x68]
call fcn.140014180
lea rcx, [rsp + 0x30]
cmp qword [rsp + 0x48], 0x10
cmovae rcx, qword [rsp + 0x30]
lea r9, [rsp + 0x50]
lea r8, [rsp + 0x68]
lea rdx, [rbp - 0x68]
call qword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x1400162cf
mov esi, 1
jmp 0x140016333
mov rbx, qword [rsp + 0x50]
test rbx, rbx
je 0x140016329
nop dword [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, 0xffffffffffffffff
je 0x14001631b
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 0x140016324
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rsi, rdi
mov rbx, qword [rbx + 0x28]
test rbx, rbx
jne 0x1400162e0
mov rbx, qword [rsp + 0x50]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
nop
lea rcx, [rsp + 0x30]
call fcn.14029ed10
cmp rsi, 0xffffffffffffffff
je 0x140016700
lea r9, [rbp + 0x5b0]
lea r8, str.GET___s_HTTP_1.1_r_n
mov edx, 0x400
lea rcx, [rbp - 0x50]
call fcn.140014180
lea rax, [rbp - 0x50]
mov r8, rdi
nop word [rax + rax]
inc r8
cmp byte [rax + r8], 0
jne 0x140016370
xor r9d, r9d
lea rdx, [rbp - 0x50]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
mov eax, dword [rsp + 0x58]
lea r9, [rbp + 0x3b0]
mov edx, 0x400
lea rcx, [rbp - 0x50]
cmp eax, 0x50
jne 0x1400163c2
lea r8, str.Host:__s_r_n
call fcn.140014180
lea rax, [rbp - 0x50]
mov r8, rdi
inc r8
cmp byte [rax + r8], 0
jne 0x1400163b6
jmp 0x1400163ea
mov dword [rsp + 0x20], eax
lea r8, str.Host:__s:_d_r_n
call fcn.140014180
lea rax, [rbp - 0x50]
mov r8, rdi
nop dword [rax]
inc r8
cmp byte [rax + r8], 0
jne 0x1400163e0
xor r9d, r9d
lea rdx, [rbp - 0x50]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
lea r8, str.Upgrade:_websocket_r_n
mov edx, 0x400
lea rcx, [rbp - 0x50]
call fcn.140014180
lea rax, [rbp - 0x50]
mov r8, rdi
inc r8
cmp byte [rax + r8], 0
jne 0x140016416
xor r9d, r9d
lea rdx, [rbp - 0x50]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
lea r8, str.Connection:_Upgrade_r_n
mov edx, 0x400
lea rcx, [rbp - 0x50]
call fcn.140014180
lea rax, [rbp - 0x50]
mov r8, rdi
nop dword [rax]
inc r8
cmp byte [rax + r8], 0
jne 0x140016450
xor r9d, r9d
lea rdx, [rbp - 0x50]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
cmp qword [r14 + 0x10], 0
je 0x1400164ba
cmp qword [r14 + 0x18], 0x10
jb 0x14001647b
mov r14, qword [r14]
mov r9, r14
lea r8, str.Origin:__s_r_n
mov edx, 0x400
lea rcx, [rbp - 0x50]
call fcn.140014180
lea rax, [rbp - 0x50]
mov r8, rdi
nop word [rax + rax]
inc r8
cmp byte [rax + r8], 0
jne 0x1400164a0
xor r9d, r9d
lea rdx, [rbp - 0x50]
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 - 0x50]
call fcn.140014180
lea rax, [rbp - 0x50]
mov r8, rdi
inc r8
cmp byte [rax + r8], 0
jne 0x1400164d6
xor r9d, r9d
lea rdx, [rbp - 0x50]
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 - 0x50]
call fcn.140014180
lea rax, [rbp - 0x50]
mov r8, rdi
nop dword [rax]
inc r8
cmp byte [rax + r8], 0
jne 0x140016510
xor r9d, r9d
lea rdx, [rbp - 0x50]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
lea r8, [0x140343b2c]
mov edx, 0x400
lea rcx, [rbp - 0x50]
call fcn.140014180
lea rax, [rbp - 0x50]
inc rdi
cmp byte [rax + rdi], 0
jne 0x140016543
mov r8, rdi
xor r9d, r9d
lea rdx, [rbp - 0x50]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
mov ebx, r15d
lea r14, [rbp - 0x50]
lea rdi, [r14 - 1]
nop word [rax + rax]
cmp ebx, 2
jl 0x140016588
cmp ebx, 0x3ff
jge 0x1400165b1
cmp byte [rdi - 1], 0xd
je 0x1400165b1
cmp byte [rdi], 0xa
je 0x1400165b1
movsxd rax, ebx
lea rdx, [rbp - 0x50]
add rdx, rax
xor r9d, r9d
lea r8d, [r9 + 1]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x140016700
inc ebx
inc rdi
jmp 0x140016570
movsxd rax, ebx
cmp rax, 0x400
jae 0x14001672e
mov byte [rbp + rax - 0x50], 0
cmp ebx, 0x3ff
je 0x140016700
lea r8, [rsp + 0x50]
lea rdx, str.HTTP_1.1__d
lea rcx, [rbp - 0x50]
call fcn.140014240
cmp eax, 1
jne 0x140016700
cmp dword [rsp + 0x50], 0x65
jne 0x140016700
nop word [rax + rax]
mov ebx, r15d
lea rdi, [r14 - 1]
cmp ebx, 2
jl 0x14001661f
cmp ebx, 0x3ff
jge 0x140016648
cmp byte [rdi - 1], 0xd
je 0x140016648
cmp byte [rdi], 0xa
je 0x140016648
movsxd rax, ebx
lea rdx, [rbp - 0x50]
add rdx, rax
xor r9d, r9d
lea r8d, [r9 + 1]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x140016700
inc ebx
inc rdi
jmp 0x140016607
cmp byte [rbp - 0x50], 0xd
jne 0x140016600
cmp byte [rbp - 0x4f], 0xa
jne 0x140016600
mov dword [rsp + 0x5c], 1
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x5c]
mov edx, 6
lea r8d, [rdx - 5]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_setsockopt]
mov dword [rsp + 0x60], 1
lea r8, [rsp + 0x60]
mov edx, 0x8004667e
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov ecx, 0x60
call fcn.1402d10fc
mov qword [rsp + 0x50], 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._REnet.0
mov qword [rax], rcx
mov qword [rax + 8], r15
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], r15
mov qword [rax + 0x20], r15
mov qword [rax + 0x28], r15
mov qword [rax + 0x30], r15
mov qword [rax + 0x38], r15
mov qword [rax + 0x40], r15
mov qword [rax + 0x48], r15
mov qword [rax + 0x50], rsi
mov dword [rax + 0x58], 3
mov word [rax + 0x5c], 1
jmp 0x140016702
xor eax, eax
mov rcx, qword [rbp + 0x7b0]
xor rcx, rsp
call fcn.1402d0d40
lea r11, [rsp + 0x8c0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
call fcn.1402d0f68
int3