Function at 0x180016500
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x2a8
mov rax, qword [0x1800a31a8]
xor rax, rsp
mov qword [rsp + 0x290], rax
mov qword [rsp + 0x70], 0x80000
mov ecx, 0x80000
call fcn.180072f0c
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x40], 0
cmp qword [rsp + 0x48], 0
je 0x180016788
mov byte [rsp + 0x30], 1
mov dword [rsp + 0x38], 0xffffffff
movzx eax, byte [rsp + 0x30]
test eax, eax
je 0x180016760
mov dword [rsp + 0x50], 0
mov dword [rsp + 0x54], 1
mov dword [rsp + 0x80], 0
mov dword [rsp + 0x34], 0
jmp 0x180016593
mov eax, dword [rsp + 0x34]
inc eax
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0x80]
cmp dword [rsp + 0x34], eax
jae 0x1800165cd
mov eax, dword [rsp + 0x34]
mov qword [rsp + 0x58], rax
mov rcx, qword [rsp + 0x2b0]
mov rcx, qword [rcx + 0x28]
call fcn.18000b5c0
mov rcx, qword [rsp + 0x58]
cmp qword [rsp + rcx*8 + 0x88], rax
jne 0x1800165cb
jmp 0x1800165cd
jmp 0x180016589
mov eax, dword [rsp + 0x80]
cmp dword [rsp + 0x34], eax
jne 0x180016611
cmp dword [rsp + 0x80], 0x40
jae 0x180016611
mov rax, qword [rsp + 0x2b0]
mov rcx, qword [rax + 0x28]
call fcn.18000b5c0
mov ecx, dword [rsp + 0x34]
mov qword [rsp + rcx*8 + 0x88], rax
mov eax, dword [rsp + 0x80]
inc eax
mov dword [rsp + 0x80], eax
xor eax, eax
test eax, eax
jne 0x18001657f
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x80]
mov ecx, 1
call qword [sym.imp.WS2_32.dll_select]
mov dword [rsp + 0x44], eax
cmp dword [rsp + 0x44], 0
jle 0x18001671c
mov rax, qword [rsp + 0x2b0]
mov rcx, qword [rax + 0x28]
call fcn.18000b5c0
xor r9d, r9d
mov r8d, 0x80000
mov rdx, qword [rsp + 0x48]
mov rcx, rax
call qword [sym.imp.WS2_32.dll_recv]
mov dword [rsp + 0x3c], eax
call fcn.18001d9b0
mov dword [rsp + 0x38], eax
cmp dword [rsp + 0x3c], 0
jle 0x1800166da
mov eax, dword [rsp + 0x3c]
mov ecx, dword [rsp + 0x40]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x40], eax
mov rax, qword [rsp + 0x2b0]
mov rax, qword [rax + 0x28]
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x2b0]
mov rax, qword [rax + 0x28]
mov rax, qword [rax]
mov rax, qword [rax + 8]
mov qword [rsp + 0x68], rax
movsxd rax, dword [rsp + 0x3c]
mov r8, rax
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x60]
call qword [rsp + 0x68]
jmp 0x18001671a
cmp dword [rsp + 0x38], 0x2733
je 0x18001671a
cmp dword [rsp + 0x38], 0
je 0x180016715
mov rax, qword [rsp + 0x2b0]
mov rcx, qword [rax + 0x28]
call fcn.18000b5c0
mov r9, rax
mov r8d, dword [rsp + 0x38]
lea rdx, str.Tunnel_READ_FAILURE__ERR__d___socket__d_
mov ecx, 0x1000
call fcn.180003ab0
mov byte [rsp + 0x30], 0
jmp 0x18001675b
cmp dword [rsp + 0x44], 0
jge 0x18001675b
call fcn.18001d9b0
mov dword [rsp + 0x38], eax
mov rax, qword [rsp + 0x2b0]
mov rcx, qword [rax + 0x28]
call fcn.18000b5c0
mov r9, rax
mov r8d, dword [rsp + 0x38]
lea rdx, str.Tunnel_READ_select_FAIL__ERR__d___socket__d_
mov ecx, 0x1000
call fcn.180003ab0
mov byte [rsp + 0x30], 0
jmp 0x180016557
mov rax, qword [rsp + 0x2b0]
mov rax, qword [rax + 0x28]
mov rcx, qword [rsp + 0x2b0]
mov rcx, qword [rcx + 0x28]
mov rax, qword [rax]
call qword [rax + 0x18]
mov rcx, qword [rsp + 0x48]
call fcn.180072f04
mov rcx, qword [rsp + 0x290]
xor rcx, rsp
call fcn.1800698b0
add rsp, 0x2a8
ret