Function at 0x10039e50
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:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10121a32
mov eax, dword fs:[0]
push eax
sub esp, 0x448
push ebx
push esi
push edi
lea edi, [ebp - 0x2d4]
mov ecx, 0xb2
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x1014f440]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, 0x101c1d21
call fcn.1011c410
mov ecx, dword [ebp + 8]
call fcn.1002abf0
cmp eax, 0x80
jb 0x10039edb
mov ecx, dword [ebp + 8]
call fcn.10014900
push eax
push str.ERROR:_url_size_limit_exceeded:__s_n
mov esi, esp
push 2
call dword [sym.imp.ucrtbased.dll___acrt_iob_func]
add esp, 4
cmp esi, esp
call fcn.1011c3e0
push eax
call fcn.1003b8e0
add esp, 0xc
xor eax, eax
jmp 0x1003a6b5
mov ecx, dword [ebp + 0x10]
call fcn.1002abf0
cmp eax, 0xc8
jb 0x10039f1c
mov ecx, dword [ebp + 0x10]
call fcn.10014900
push eax
push str.ERROR:_origin_size_limit_exceeded:__s_n
mov esi, esp
push 2
call dword [sym.imp.ucrtbased.dll___acrt_iob_func]
add esp, 4
cmp esi, esp
call fcn.1011c3e0
push eax
call fcn.1003b8e0
add esp, 0xc
xor eax, eax
jmp 0x1003a6b5
xor eax, eax
je 0x10039f25
jmp 0x1003a07e
lea eax, [ebp - 0x128]
push eax
lea ecx, [ebp - 0xa0]
push ecx
lea edx, [ebp - 0x94]
push edx
push str.ws:____:__:_d__s
mov ecx, dword [ebp + 8]
call fcn.10014900
push eax
call fcn.1003b9c0
add esp, 0x14
cmp eax, 3
jne 0x10039f5a
jmp 0x1003a07e
lea eax, [ebp - 0x128]
push eax
lea ecx, [ebp - 0x94]
push ecx
push str.ws:____:____s
mov ecx, dword [ebp + 8]
call fcn.10014900
push eax
call fcn.1003b9c0
add esp, 0x10
cmp eax, 2
jne 0x10039f92
mov dword [ebp - 0xa0], 0x50
jmp 0x1003a07e
lea eax, [ebp - 0xa0]
push eax
lea ecx, [ebp - 0x94]
push ecx
push str.ws:____:__:_d
mov ecx, dword [ebp + 8]
call fcn.10014900
push eax
call fcn.1003b9c0
add esp, 0x10
cmp eax, 2
jne 0x10039fef
mov eax, 1
imul ecx, eax, 0
mov dword [ebp - 0x3f8], ecx
cmp dword [ebp - 0x3f8], 0x80
jae 0x10039fd7
jmp 0x10039fdc
call fcn.1011cd50
mov edx, dword [ebp - 0x3f8]
mov byte [ebp + edx - 0x128], 0
jmp 0x1003a07e
lea eax, [ebp - 0x94]
push eax
push str.ws:____:__
mov ecx, dword [ebp + 8]
call fcn.10014900
push eax
call fcn.1003b9c0
add esp, 0xc
cmp eax, 1
jne 0x1003a04c
mov dword [ebp - 0xa0], 0x50
mov eax, 1
imul ecx, eax, 0
mov dword [ebp - 0x404], ecx
cmp dword [ebp - 0x404], 0x80
jae 0x1003a037
jmp 0x1003a03c
call fcn.1011cd50
mov edx, dword [ebp - 0x404]
mov byte [ebp + edx - 0x128], 0
jmp 0x1003a07e
mov ecx, dword [ebp + 8]
call fcn.10014900
push eax
push str.ERROR:_Could_not_parse_WebSocket_url:__s_n
mov esi, esp
push 2
call dword [sym.imp.ucrtbased.dll___acrt_iob_func]
add esp, 4
cmp esi, esp
call fcn.1011c3e0
push eax
call fcn.1003b8e0
add esp, 0xc
xor eax, eax
jmp 0x1003a6b5
lea eax, [ebp - 0x94]
push eax
lea ecx, [ebp - 0x428]
call fcn.1001dd60
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0xa0]
push ecx
lea edx, [ebp - 0x428]
push edx
call fcn.1003a8b0
add esp, 8
mov dword [ebp - 0x134], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x428]
call fcn.100083c0
cmp dword [ebp - 0x134], 0xffffffff
jne 0x1003a105
mov eax, dword [ebp - 0xa0]
push eax
lea ecx, [ebp - 0x94]
push ecx
push str.Unable_to_connect_to__s:_d_n
mov esi, esp
push 2
call dword [sym.imp.ucrtbased.dll___acrt_iob_func]
add esp, 4
cmp esi, esp
call fcn.1011c3e0
push eax
call fcn.1003b8e0
add esp, 0x10
xor eax, eax
jmp 0x1003a6b5
lea eax, [ebp - 0x128]
push eax
push str.GET___s_HTTP_1.1_r_n
push 0x100
lea ecx, [ebp - 0x23c]
push ecx
call fcn.10033d50
add esp, 0x10
mov esi, esp
push 0
lea eax, [ebp - 0x23c]
push eax
call sub.ucrtbased.dll_strlen
add esp, 4
push eax
lea ecx, [ebp - 0x23c]
push ecx
mov edx, dword [ebp - 0x134]
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp esi, esp
call fcn.1011c3e0
cmp dword [ebp - 0xa0], 0x50
jne 0x1003a1ae
lea eax, [ebp - 0x94]
push eax
push str.Host:__s_r_n
push 0x100
lea ecx, [ebp - 0x23c]
push ecx
call fcn.10033d50
add esp, 0x10
mov esi, esp
push 0
lea eax, [ebp - 0x23c]
push eax
call sub.ucrtbased.dll_strlen
add esp, 4
push eax
lea ecx, [ebp - 0x23c]
push ecx
mov edx, dword [ebp - 0x134]
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp esi, esp
call fcn.1011c3e0
jmp 0x1003a204
mov eax, dword [ebp - 0xa0]
push eax
lea ecx, [ebp - 0x94]
push ecx
push str.Host:__s:_d_r_n
push 0x100
lea edx, [ebp - 0x23c]
push edx
call fcn.10033d50
add esp, 0x14
mov esi, esp
push 0
lea eax, [ebp - 0x23c]
push eax
call sub.ucrtbased.dll_strlen
add esp, 4
push eax
lea ecx, [ebp - 0x23c]
push ecx
mov edx, dword [ebp - 0x134]
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp esi, esp
call fcn.1011c3e0
push str.Upgrade:_websocket_r_n
push 0x100
lea eax, [ebp - 0x23c]
push eax
call fcn.10033d50
add esp, 0xc
mov esi, esp
push 0
lea eax, [ebp - 0x23c]
push eax
call sub.ucrtbased.dll_strlen
add esp, 4
push eax
lea ecx, [ebp - 0x23c]
push ecx
mov edx, dword [ebp - 0x134]
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp esi, esp
call fcn.1011c3e0
push str.Connection:_Upgrade_r_n
push 0x100
lea eax, [ebp - 0x23c]
push eax
call fcn.10033d50
add esp, 0xc
mov esi, esp
push 0
lea eax, [ebp - 0x23c]
push eax
call sub.ucrtbased.dll_strlen
add esp, 4
push eax
lea ecx, [ebp - 0x23c]
push ecx
mov edx, dword [ebp - 0x134]
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp esi, esp
call fcn.1011c3e0
mov ecx, dword [ebp + 0x10]
call fcn.10039a50
movzx eax, al
test eax, eax
jne 0x1003a2f4
mov ecx, dword [ebp + 0x10]
call fcn.10014900
push eax
push str.Origin:__s_r_n
push 0x100
lea eax, [ebp - 0x23c]
push eax
call fcn.10033d50
add esp, 0x10
mov esi, esp
push 0
lea eax, [ebp - 0x23c]
push eax
call sub.ucrtbased.dll_strlen
add esp, 4
push eax
lea ecx, [ebp - 0x23c]
push ecx
mov edx, dword [ebp - 0x134]
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp esi, esp
call fcn.1011c3e0
push str.Sec_WebSocket_Key:_x3JJHMbDL1EzLkh9GBhXDw_r_n
push 0x100
lea eax, [ebp - 0x23c]
push eax
call fcn.10033d50
add esp, 0xc
mov esi, esp
push 0
lea eax, [ebp - 0x23c]
push eax
call sub.ucrtbased.dll_strlen
add esp, 4
push eax
lea ecx, [ebp - 0x23c]
push ecx
mov edx, dword [ebp - 0x134]
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp esi, esp
call fcn.1011c3e0
push str.Sec_WebSocket_Version:_13_r_n
push 0x100
lea eax, [ebp - 0x23c]
push eax
call fcn.10033d50
add esp, 0xc
mov esi, esp
push 0
lea eax, [ebp - 0x23c]
push eax
call sub.ucrtbased.dll_strlen
add esp, 4
push eax
lea ecx, [ebp - 0x23c]
push ecx
mov edx, dword [ebp - 0x134]
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp esi, esp
call fcn.1011c3e0
push 0x101297d0
push 0x100
lea eax, [ebp - 0x23c]
push eax
call fcn.10033d50
add esp, 0xc
mov esi, esp
push 0
lea eax, [ebp - 0x23c]
push eax
call sub.ucrtbased.dll_strlen
add esp, 4
push eax
lea ecx, [ebp - 0x23c]
push ecx
mov edx, dword [ebp - 0x134]
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp esi, esp
call fcn.1011c3e0
mov dword [ebp - 0x254], 0
jmp 0x1003a3e7
mov eax, dword [ebp - 0x254]
add eax, 1
mov dword [ebp - 0x254], eax
cmp dword [ebp - 0x254], 2
jl 0x1003a422
cmp dword [ebp - 0x254], 0xff
jge 0x1003a457
mov eax, dword [ebp - 0x254]
movsx ecx, byte [ebp + eax - 0x23e]
cmp ecx, 0xd
je 0x1003a457
mov eax, dword [ebp - 0x254]
movsx ecx, byte [ebp + eax - 0x23d]
cmp ecx, 0xa
je 0x1003a457
mov esi, esp
push 0
push 1
mov eax, dword [ebp - 0x254]
lea ecx, [ebp + eax - 0x23c]
push ecx
mov edx, dword [ebp - 0x134]
push edx
call dword [sym.imp.WS2_32.dll_recv]
cmp esi, esp
call fcn.1011c3e0
test eax, eax
jne 0x1003a455
xor eax, eax
jmp 0x1003a6b5
jmp 0x1003a3d8
mov eax, dword [ebp - 0x254]
mov dword [ebp - 0x434], eax
cmp dword [ebp - 0x434], 0x100
jae 0x1003a471
jmp 0x1003a476
call fcn.1011cd50
mov ecx, dword [ebp - 0x434]
mov byte [ebp + ecx - 0x23c], 0
cmp dword [ebp - 0x254], 0xff
jne 0x1003a4c2
mov ecx, dword [ebp + 8]
call fcn.10014900
push eax
push str.ERROR:_Got_invalid_status_line_connecting_to:__s_n
mov esi, esp
push 2
call dword [sym.imp.ucrtbased.dll___acrt_iob_func]
add esp, 4
cmp esi, esp
call fcn.1011c3e0
push eax
call fcn.1003b8e0
add esp, 0xc
xor eax, eax
jmp 0x1003a6b5
lea eax, [ebp - 0x248]
push eax
push str.HTTP_1.1__d
lea ecx, [ebp - 0x23c]
push ecx
call fcn.1003b9c0
add esp, 0xc
cmp eax, 1
jne 0x1003a4eb
cmp dword [ebp - 0x248], 0x65
je 0x1003a524
lea eax, [ebp - 0x23c]
push eax
mov ecx, dword [ebp + 8]
call fcn.10014900
push eax
push str.ERROR:_Got_bad_status_connecting_to__s:__s
mov esi, esp
push 2
call dword [sym.imp.ucrtbased.dll___acrt_iob_func]
add esp, 4
cmp esi, esp
call fcn.1011c3e0
push eax
call fcn.1003b8e0
add esp, 0x10
xor eax, eax
jmp 0x1003a6b5
mov eax, 1
test eax, eax
je 0x1003a5ed
mov dword [ebp - 0x254], 0
jmp 0x1003a54c
mov eax, dword [ebp - 0x254]
add eax, 1
mov dword [ebp - 0x254], eax
cmp dword [ebp - 0x254], 2
jl 0x1003a587
cmp dword [ebp - 0x254], 0xff
jge 0x1003a5bc
mov eax, dword [ebp - 0x254]
movsx ecx, byte [ebp + eax - 0x23e]
cmp ecx, 0xd
je 0x1003a5bc
mov eax, dword [ebp - 0x254]
movsx ecx, byte [ebp + eax - 0x23d]
cmp ecx, 0xa
je 0x1003a5bc
mov esi, esp
push 0
push 1
mov eax, dword [ebp - 0x254]
lea ecx, [ebp + eax - 0x23c]
push ecx
mov edx, dword [ebp - 0x134]
push edx
call dword [sym.imp.WS2_32.dll_recv]
cmp esi, esp
call fcn.1011c3e0
test eax, eax
jne 0x1003a5ba
xor eax, eax
jmp 0x1003a6b5
jmp 0x1003a53d
mov eax, 1
imul ecx, eax, 0
movsx edx, byte [ebp + ecx - 0x23c]
cmp edx, 0xd
jne 0x1003a5e8
mov eax, 1
shl eax, 0
movsx ecx, byte [ebp + eax - 0x23c]
cmp ecx, 0xa
jne 0x1003a5e8
jmp 0x1003a5ed
jmp 0x1003a524
mov dword [ebp - 0x260], 1
mov esi, esp
push 4
lea eax, [ebp - 0x260]
push eax
push 1
push 6
mov ecx, dword [ebp - 0x134]
push ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp esi, esp
call fcn.1011c3e0
mov dword [ebp - 0x26c], 1
mov esi, esp
lea eax, [ebp - 0x26c]
push eax
push 0x8004667e
mov ecx, dword [ebp - 0x134]
push ecx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp esi, esp
call fcn.1011c3e0
push 0x40
call fcn.1011beb0
add esp, 4
mov dword [ebp - 0x44c], eax
mov dword [ebp - 4], 1
cmp dword [ebp - 0x44c], 0
je 0x1003a692
push 0x40
mov ecx, dword [ebp - 0x44c]
call fcn.100385e0
movzx eax, byte [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x134]
push ecx
mov ecx, dword [ebp - 0x44c]
call fcn.100367f0
mov dword [ebp - 0x454], eax
jmp 0x1003a69c
mov dword [ebp - 0x454], 0
mov edx, dword [ebp - 0x454]
mov dword [ebp - 0x440], edx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x440]
push edx
mov ecx, ebp
push eax
lea edx, [0x1003a6f0]
call fcn.1011c380
pop eax
pop edx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1011c450
add esp, 0x454
cmp ebp, esp
call fcn.1011c3e0
mov esp, ebp
pop ebp
ret