Function at 0x1800167a0
Capabilities:
Get socket status
Send data
Send data on socket

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x2c8
mov rax, qword [0x1800a31a8]
xor rax, rsp
mov qword [rsp + 0x2b0], rax
mov dword [rsp + 0x50], 0
mov dword [rsp + 0x38], 0xffffffff
mov byte [rsp + 0x30], 1
mov rax, qword [rsp + 0x2d0]
mov rcx, qword [rax + 0x28]
call fcn.1800164a0
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
je 0x180016adc
mov qword [rsp + 0x48], 0
mov rax, qword [rsp + 0x40]
mov rax, qword [rax + 8]
cmp qword [rsp + 0x48], rax
jae 0x180016aa3
mov dword [rsp + 0xa0], 0
mov dword [rsp + 0x34], 0
jmp 0x180016831
mov eax, dword [rsp + 0x34]
inc eax
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0xa0]
cmp dword [rsp + 0x34], eax
jae 0x18001686b
mov eax, dword [rsp + 0x34]
mov qword [rsp + 0x68], rax
mov rcx, qword [rsp + 0x2d0]
mov rcx, qword [rcx + 0x28]
call fcn.18000b5c0
mov rcx, qword [rsp + 0x68]
cmp qword [rsp + rcx*8 + 0xa8], rax
jne 0x180016869
jmp 0x18001686b
jmp 0x180016827
mov eax, dword [rsp + 0xa0]
cmp dword [rsp + 0x34], eax
jne 0x1800168af
cmp dword [rsp + 0xa0], 0x40
jae 0x1800168af
mov rax, qword [rsp + 0x2d0]
mov rcx, qword [rax + 0x28]
call fcn.18000b5c0
mov ecx, dword [rsp + 0x34]
mov qword [rsp + rcx*8 + 0xa8], rax
mov eax, dword [rsp + 0xa0]
inc eax
mov dword [rsp + 0xa0], eax
xor eax, eax
test eax, eax
jne 0x18001681d
mov dword [rsp + 0x60], 0
mov dword [rsp + 0x64], 1
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea r8, [rsp + 0xa0]
xor edx, edx
mov ecx, 1
call qword [sym.imp.WS2_32.dll_select]
mov dword [rsp + 0x54], eax
cmp dword [rsp + 0x54], 0
jle 0x180016a5d
mov rax, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x48]
mov rax, qword [rax + 8]
sub rax, rcx
mov dword [rsp + 0x58], eax
mov rax, qword [rsp + 0x40]
mov rax, qword [rax]
add rax, qword [rsp + 0x48]
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x2d0]
mov rcx, qword [rax + 0x28]
call fcn.18000b5c0
mov qword [rsp + 0x78], rax
xor r9d, r9d
mov r8d, dword [rsp + 0x58]
mov rdx, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.WS2_32.dll_send]
mov dword [rsp + 0x3c], eax
call fcn.18001d9b0
mov dword [rsp + 0x38], eax
cmp dword [rsp + 0x3c], 0
jle 0x180016a19
mov eax, dword [rsp + 0x3c]
mov ecx, dword [rsp + 0x50]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x50], eax
mov rax, qword [rsp + 0x2d0]
mov rax, qword [rax + 0x28]
mov qword [rsp + 0x80], rax
mov rax, qword [rsp + 0x2d0]
mov rax, qword [rax + 0x28]
mov rax, qword [rax]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x88], rax
movsxd rax, dword [rsp + 0x3c]
mov rcx, qword [rsp + 0x40]
mov rcx, qword [rcx]
add rcx, qword [rsp + 0x48]
mov r8, rax
mov rdx, rcx
mov rcx, qword [rsp + 0x80]
call qword [rsp + 0x88]
movsxd rax, dword [rsp + 0x3c]
mov rcx, qword [rsp + 0x48]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x40]
mov rax, qword [rax + 8]
cmp qword [rsp + 0x48], rax
jae 0x180016a17
mov rax, qword [rsp + 0x2d0]
mov rcx, qword [rax + 0x28]
call fcn.18000b5c0
mov r8, rax
lea rdx, str.Tunnel_WRITE_RERUN_SEND__socket__d_
mov ecx, 0x1000
call fcn.180003ab0
jmp 0x180016a5b
cmp dword [rsp + 0x38], 0x2733
je 0x180016a5b
cmp dword [rsp + 0x38], 0
je 0x180016a54
mov rax, qword [rsp + 0x2d0]
mov rcx, qword [rax + 0x28]
call fcn.18000b5c0
mov r9, rax
mov r8d, dword [rsp + 0x38]
lea rdx, str.Tunnel_WRITE_FAILURE__ERR__d___socket__d_
mov ecx, 0x1000
call fcn.180003ab0
mov byte [rsp + 0x30], 0
jmp 0x180016aa3
jmp 0x180016a9e
cmp dword [rsp + 0x54], 0
jge 0x180016a9e
call fcn.18001d9b0
mov dword [rsp + 0x38], eax
mov rax, qword [rsp + 0x2d0]
mov rcx, qword [rax + 0x28]
call fcn.18000b5c0
mov r9, rax
mov r8d, dword [rsp + 0x38]
lea rdx, str.Tunnel_WRITE_select_FAIL__ERR__d___socket__d_
mov ecx, 0x1000
call fcn.180003ab0
mov byte [rsp + 0x30], 0
jmp 0x180016aa3
jmp 0x1800167fe
mov rax, qword [rsp + 0x40]
cmp qword [rax], 0
je 0x180016abb
mov rax, qword [rsp + 0x40]
mov rcx, qword [rax]
call fcn.180072f04
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x90], rax
mov edx, reloc.WS2_32.dll_recv
mov rcx, qword [rsp + 0x90]
call fcn.180069ffc
jmp 0x180016b25
mov rax, qword [rsp + 0x2d0]
mov rcx, qword [rax + 0x28]
call fcn.18000b5c0
mov r8, rax
lea rdx, str.Tunnel_WRITE_shutting_down__socket__d_
mov ecx, 0x1000
call fcn.180003ab0
mov rax, qword [rsp + 0x2d0]
mov rcx, qword [rax + 0x28]
call fcn.18000b5c0
mov edx, 1
mov rcx, rax
call qword [sym.imp.WS2_32.dll_shutdown]
mov byte [rsp + 0x30], 0
movzx eax, byte [rsp + 0x30]
test eax, eax
jne 0x1800167d3
mov rcx, qword [rsp + 0x2b0]
xor rcx, rsp
call fcn.1800698b0
add rsp, 0x2c8
ret