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

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x2c8
mov rax, qword [0x1800a3248]
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.180017210
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
je 0x18001784c
mov qword [rsp + 0x48], 0
mov rax, qword [rsp + 0x40]
mov rax, qword [rax + 8]
cmp qword [rsp + 0x48], rax
jae 0x180017813
mov dword [rsp + 0xa0], 0
mov dword [rsp + 0x34], 0
jmp 0x1800175a1
mov eax, dword [rsp + 0x34]
inc eax
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0xa0]
cmp dword [rsp + 0x34], eax
jae 0x1800175db
mov eax, dword [rsp + 0x34]
mov qword [rsp + 0x68], rax
mov rcx, qword [rsp + 0x2d0]
mov rcx, qword [rcx + 0x28]
call fcn.18000c330
mov rcx, qword [rsp + 0x68]
cmp qword [rsp + rcx*8 + 0xa8], rax
jne 0x1800175d9
jmp 0x1800175db
jmp 0x180017597
mov eax, dword [rsp + 0xa0]
cmp dword [rsp + 0x34], eax
jne 0x18001761f
cmp dword [rsp + 0xa0], 0x40
jae 0x18001761f
mov rax, qword [rsp + 0x2d0]
mov rcx, qword [rax + 0x28]
call fcn.18000c330
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 0x18001758d
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 0x1800177cd
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.18000c330
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.18001e720
mov dword [rsp + 0x38], eax
cmp dword [rsp + 0x3c], 0
jle 0x180017789
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 0x180017787
mov rax, qword [rsp + 0x2d0]
mov rcx, qword [rax + 0x28]
call fcn.18000c330
mov r8, rax
lea rdx, str.Tunnel_WRITE_RERUN_SEND__socket__d_
mov ecx, 0x1000
call fcn.180004820
jmp 0x1800177cb
cmp dword [rsp + 0x38], 0x2733
je 0x1800177cb
cmp dword [rsp + 0x38], 0
je 0x1800177c4
mov rax, qword [rsp + 0x2d0]
mov rcx, qword [rax + 0x28]
call fcn.18000c330
mov r9, rax
mov r8d, dword [rsp + 0x38]
lea rdx, str.Tunnel_WRITE_FAILURE__ERR__d___socket__d_
mov ecx, 0x1000
call fcn.180004820
mov byte [rsp + 0x30], 0
jmp 0x180017813
jmp 0x18001780e
cmp dword [rsp + 0x54], 0
jge 0x18001780e
call fcn.18001e720
mov dword [rsp + 0x38], eax
mov rax, qword [rsp + 0x2d0]
mov rcx, qword [rax + 0x28]
call fcn.18000c330
mov r9, rax
mov r8d, dword [rsp + 0x38]
lea rdx, str.Tunnel_WRITE_select_FAIL__ERR__d___socket__d_
mov ecx, 0x1000
call fcn.180004820
mov byte [rsp + 0x30], 0
jmp 0x180017813
jmp 0x18001756e
mov rax, qword [rsp + 0x40]
cmp qword [rax], 0
je 0x18001782b
mov rax, qword [rsp + 0x40]
mov rcx, qword [rax]
call fcn.180073894
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x90], rax
mov edx, reloc.WS2_32.dll_recv
mov rcx, qword [rsp + 0x90]
call fcn.18006a98c
jmp 0x180017895
mov rax, qword [rsp + 0x2d0]
mov rcx, qword [rax + 0x28]
call fcn.18000c330
mov r8, rax
lea rdx, str.Tunnel_WRITE_shutting_down__socket__d_
mov ecx, 0x1000
call fcn.180004820
mov rax, qword [rsp + 0x2d0]
mov rcx, qword [rax + 0x28]
call fcn.18000c330
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 0x180017543
mov rcx, qword [rsp + 0x2b0]
xor rcx, rsp
call fcn.18006a240
add rsp, 0x2c8
ret