Function at 0x140153de0
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket
Send http request
Send http request with host header
Set socket configuration

Disassembly:
mov qword [rsp + 0x18], r8
mov byte [rsp + 0x10], dl
mov qword [rsp + 8], rcx
sub rsp, 0x918
mov rax, qword [0x140298e80]
xor rax, rsp
mov qword [rsp + 0x900], rax
mov rcx, qword [rsp + 0x920]
call fcn.14001a4d0
cmp rax, 0x200
jb 0x140153e5b
mov rcx, qword [rsp + 0x920]
call fcn.140016800
mov qword [rsp + 0x70], rax
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov qword [rsp + 0x78], rax
mov r8, qword [rsp + 0x70]
lea rdx, str.ERROR:_url_size_limit_exceeded:__s_n
mov rcx, qword [rsp + 0x78]
call fcn.140099e80
xor eax, eax
jmp 0x14015462b
mov rcx, qword [rsp + 0x930]
call fcn.14001a4d0
cmp rax, 0xc8
jb 0x140153ebb
mov rcx, qword [rsp + 0x930]
call fcn.140016800
mov qword [rsp + 0x80], rax
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov qword [rsp + 0x88], rax
mov r8, qword [rsp + 0x80]
lea rdx, str.ERROR:_origin_size_limit_exceeded:__s_n
mov rcx, qword [rsp + 0x88]
call fcn.140099e80
xor eax, eax
jmp 0x14015462b
xor eax, eax
test eax, eax
je 0x140153ec6
jmp 0x14015405b
mov rcx, qword [rsp + 0x920]
call fcn.140016800
lea rcx, [rsp + 0x700]
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0xe8]
lea r8, [rsp + 0x500]
lea rdx, str.ws:____:__:_d__s
mov rcx, rax
call fcn.140079ae0
cmp eax, 3
jne 0x140153f09
jmp 0x14015405b
mov rcx, qword [rsp + 0x920]
call fcn.140016800
lea r9, [rsp + 0x700]
lea r8, [rsp + 0x500]
lea rdx, str.ws:____:____s
mov rcx, rax
call fcn.140079ae0
cmp eax, 2
jne 0x140153f4a
mov dword [rsp + 0xe8], 0x50
jmp 0x14015405b
mov rcx, qword [rsp + 0x920]
call fcn.140016800
lea r9, [rsp + 0xe8]
lea r8, [rsp + 0x500]
lea rdx, str.ws:____:__:_d
mov rcx, rax
call fcn.140079ae0
cmp eax, 2
jne 0x140153fad
mov eax, 1
imul rax, rax, 0
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0x200
jae 0x140153f96
jmp 0x140153f9b
call fcn.1401daf74
mov rax, qword [rsp + 0x50]
mov byte [rsp + rax + 0x700], 0
jmp 0x14015405b
mov rcx, qword [rsp + 0x920]
call fcn.140016800
lea r8, [rsp + 0x500]
lea rdx, str.ws:____:__
mov rcx, rax
call fcn.140079ae0
cmp eax, 1
jne 0x140154010
mov dword [rsp + 0xe8], 0x50
mov eax, 1
imul rax, rax, 0
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0x200
jae 0x140153ffc
jmp 0x140154001
call fcn.1401daf74
mov rax, qword [rsp + 0x58]
mov byte [rsp + rax + 0x700], 0
jmp 0x14015405b
mov rcx, qword [rsp + 0x920]
call fcn.140016800
mov qword [rsp + 0x90], rax
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov qword [rsp + 0x98], rax
mov r8, qword [rsp + 0x90]
lea rdx, str.ERROR:_Could_not_parse_WebSocket_url:__s_n
mov rcx, qword [rsp + 0x98]
call fcn.140099e80
xor eax, eax
jmp 0x14015462b
mov eax, dword [rsp + 0xe8]
mov dword [rsp + 0x40], eax
lea rdx, [rsp + 0x500]
lea rcx, [rsp + 0xc8]
call fcn.14000e2e0
nop
mov edx, dword [rsp + 0x40]
lea rcx, [rsp + 0xc8]
call fcn.140154690
mov qword [rsp + 0x38], rax
lea rcx, [rsp + 0xc8]
call fcn.14000fe40
cmp qword [rsp + 0x38], 0xffffffffffffffff
jne 0x1401540ae
xor eax, eax
jmp 0x14015462b
lea r9, [rsp + 0x700]
lea r8, str.GET___s_HTTP_1.1_r_n
mov edx, 0x400
lea rcx, [rsp + 0x100]
call fcn.140151c80
lea rcx, [rsp + 0x100]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
xor r9d, r9d
mov r8d, eax
lea rdx, [rsp + 0x100]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_send]
cmp dword [rsp + 0xe8], 0x50
jne 0x140154148
lea r9, [rsp + 0x500]
lea r8, [0x140216060]
mov edx, 0x400
lea rcx, [rsp + 0x100]
call fcn.140151c80
lea rcx, [rsp + 0x100]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
xor r9d, r9d
mov r8d, eax
lea rdx, [rsp + 0x100]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_send]
jmp 0x14015419a
mov eax, dword [rsp + 0xe8]
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0x500]
lea r8, str.Host:__s:_d_r_n
mov edx, 0x400
lea rcx, [rsp + 0x100]
call fcn.140151c80
lea rcx, [rsp + 0x100]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
xor r9d, r9d
mov r8d, eax
lea rdx, [rsp + 0x100]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_send]
lea r8, str.Upgrade:_websocket_r_n
mov edx, 0x400
lea rcx, [rsp + 0x100]
call fcn.140151c80
lea rcx, [rsp + 0x100]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
xor r9d, r9d
mov r8d, eax
lea rdx, [rsp + 0x100]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_send]
lea r8, str.Connection:_Upgrade_r_n
mov edx, 0x400
lea rcx, [rsp + 0x100]
call fcn.140151c80
lea rcx, [rsp + 0x100]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
xor r9d, r9d
mov r8d, eax
lea rdx, [rsp + 0x100]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_send]
mov rcx, qword [rsp + 0x930]
call fcn.140019610
movzx eax, al
test eax, eax
jne 0x14015427b
mov rcx, qword [rsp + 0x930]
call fcn.140016800
mov r9, rax
lea r8, str.Origin:__s_r_n
mov edx, 0x400
lea rcx, [rsp + 0x100]
call fcn.140151c80
lea rcx, [rsp + 0x100]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
xor r9d, r9d
mov r8d, eax
lea rdx, [rsp + 0x100]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_send]
lea r8, str.Sec_WebSocket_Key:_x3JJHMbDL1EzLkh9GBhXDw_r_n
mov edx, 0x400
lea rcx, [rsp + 0x100]
call fcn.140151c80
lea rcx, [rsp + 0x100]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
xor r9d, r9d
mov r8d, eax
lea rdx, [rsp + 0x100]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_send]
lea r8, str.Sec_WebSocket_Version:_13_r_n
mov edx, 0x400
lea rcx, [rsp + 0x100]
call fcn.140151c80
lea rcx, [rsp + 0x100]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
xor r9d, r9d
mov r8d, eax
lea rdx, [rsp + 0x100]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_send]
lea r8, [0x140215fa4]
mov edx, 0x400
lea rcx, [rsp + 0x100]
call fcn.140151c80
lea rcx, [rsp + 0x100]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
xor r9d, r9d
mov r8d, eax
lea rdx, [rsp + 0x100]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_send]
mov dword [rsp + 0x30], 0
jmp 0x14015434c
mov eax, dword [rsp + 0x30]
inc eax
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 2
jl 0x140154388
cmp dword [rsp + 0x30], 0x3ff
jge 0x1401543b9
mov eax, dword [rsp + 0x30]
sub eax, 2
cdqe
movsx eax, byte [rsp + rax + 0x100]
cmp eax, 0xd
je 0x1401543b9
mov eax, dword [rsp + 0x30]
dec eax
cdqe
movsx eax, byte [rsp + rax + 0x100]
cmp eax, 0xa
je 0x1401543b9
movsxd rax, dword [rsp + 0x30]
lea rax, [rsp + rax + 0x100]
xor r9d, r9d
mov r8d, 1
mov rdx, rax
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x1401543b7
xor eax, eax
jmp 0x14015462b
jmp 0x140154342
movsxd rax, dword [rsp + 0x30]
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0x400
jae 0x1401543d0
jmp 0x1401543d5
call fcn.1401daf74
mov rax, qword [rsp + 0x60]
mov byte [rsp + rax + 0x100], 0
cmp dword [rsp + 0x30], 0x3ff
jne 0x140154437
mov rcx, qword [rsp + 0x920]
call fcn.140016800
mov qword [rsp + 0xa0], rax
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov qword [rsp + 0xa8], rax
mov r8, qword [rsp + 0xa0]
lea rdx, str.ERROR:_Got_invalid_status_line_connecting_to:__s_n
mov rcx, qword [rsp + 0xa8]
call fcn.140099e80
xor eax, eax
jmp 0x14015462b
lea r8, [rsp + 0xec]
lea rdx, str.HTTP_1.1__d
lea rcx, [rsp + 0x100]
call fcn.140079ae0
cmp eax, 1
jne 0x140154462
cmp dword [rsp + 0xec], 0x65
je 0x1401544b5
mov rcx, qword [rsp + 0x920]
call fcn.140016800
mov qword [rsp + 0xb0], rax
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov qword [rsp + 0xb8], rax
lea r9, [rsp + 0x100]
mov r8, qword [rsp + 0xb0]
lea rdx, str.ERROR:_Got_bad_status_connecting_to__s:__s
mov rcx, qword [rsp + 0xb8]
call fcn.140099e80
xor eax, eax
jmp 0x14015462b
xor eax, eax
cmp eax, 1
je 0x140154574
mov dword [rsp + 0x30], 0
jmp 0x1401544d4
mov eax, dword [rsp + 0x30]
inc eax
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 2
jl 0x140154510
cmp dword [rsp + 0x30], 0x3ff
jge 0x140154541
mov eax, dword [rsp + 0x30]
sub eax, 2
cdqe
movsx eax, byte [rsp + rax + 0x100]
cmp eax, 0xd
je 0x140154541
mov eax, dword [rsp + 0x30]
dec eax
cdqe
movsx eax, byte [rsp + rax + 0x100]
cmp eax, 0xa
je 0x140154541
movsxd rax, dword [rsp + 0x30]
lea rax, [rsp + rax + 0x100]
xor r9d, r9d
mov r8d, 1
mov rdx, rax
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x14015453f
xor eax, eax
jmp 0x14015462b
jmp 0x1401544ca
mov eax, 1
imul rax, rax, 0
movsx eax, byte [rsp + rax + 0x100]
cmp eax, 0xd
jne 0x14015456f
mov eax, 1
imul rax, rax, 1
movsx eax, byte [rsp + rax + 0x100]
cmp eax, 0xa
jne 0x14015456f
jmp 0x140154574
jmp 0x1401544b5
mov dword [rsp + 0xf0], 1
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0xf0]
mov r8d, 1
mov edx, 6
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_setsockopt]
mov dword [rsp + 0xf4], 1
lea r8, [rsp + 0xf4]
mov edx, 0x8004667e
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov ecx, 0x60
call fcn.1401da964
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
je 0x14015460d
mov edx, 0x60
mov rcx, qword [rsp + 0x48]
call fcn.14011c430
movzx r8d, byte [rsp + 0x928]
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x48]
call fcn.140152770
mov qword [rsp + 0x68], rax
jmp 0x140154616
mov qword [rsp + 0x68], 0
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0xc0], rax
mov rax, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0x900]
xor rcx, rsp
call fcn.1401dae20
add rsp, 0x918
ret