Function at 0x1400668f0
Capabilities:
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x270
mov rax, qword [0x1400c7008]
xor rax, rsp
mov qword [rsp + 0x260], rax
mov rbp, rcx
mov word [rsp + 0x34], 0x105
xor al, al
mov ecx, 2
mov rsi, rdx
movzx eax, al
mov r14, r8
lea rdx, [rsp + 0x34]
cmp byte [rbp + 0x90], 0
lea r8d, [rcx + 1]
cmovne eax, ecx
xor r9d, r9d
mov rcx, rsi
mov byte [rsp + 0x36], al
call qword [sym.imp.WS2_32.dll_send]
cmp eax, 3
je 0x140066986
cmp dword [0x1400cfe94], 1
jb 0x140066b79
mov ecx, 0x1000121
call fcn.14000e3d0
test al, al
je 0x140066b79
lea rdx, str.socks_handshake:_TCP_port_write_failed_on_send__
jmp 0x140066b6f
xor r13d, r13d
movsxd r15, esi
mov ebx, r13d
nop
lea rax, [rsp + 0x40]
mov qword [rsp + 0x58], r15
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rsp + 0x50], 1
lea rdx, [rsp + 0x50]
mov qword [rsp + 0x40], 5
lea ecx, [rsi + 1]
call qword [sym.imp.WS2_32.dll_select]
mov edi, eax
call fcn.140084ad0
mov dword [r14], eax
mov ecx, dword [r14]
test ecx, ecx
jne 0x140066b79
test edi, edi
je 0x140066b51
js 0x140066b31
lea r8d, [rcx + 1]
xor r9d, r9d
mov rcx, rsi
lea rdx, [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_recv]
cmp eax, 1
jne 0x140066b11
movzx eax, byte [rsp + 0x30]
mov byte [rsp + rbx + 0x38], al
inc rbx
cmp rbx, 2
jl 0x140066990
cmp byte [rsp + 0x38], 5
je 0x140066a52
cmp dword [0x1400cfe94], 1
jb 0x140066b79
mov ecx, 0x1000021
call fcn.14000e3d0
test al, al
je 0x140066b79
lea rdx, str.socks_handshake:_Socks_proxy_returned_bad_status
mov ecx, 0x1000021
jmp 0x140066b74
movzx eax, byte [rsp + 0x39]
cmp al, byte [rsp + 0x36]
je 0x140066a8d
cmp dword [0x1400cfe94], 1
jb 0x140066b79
mov ecx, 0x1000021
call fcn.14000e3d0
test al, al
je 0x140066b79
lea rdx, str.socks_handshake:_Socks_proxy_returned_unexpected_auth
mov ecx, 0x1000021
jmp 0x140066b74
test al, al
je 0x140066b0d
cmp al, 2
je 0x140066ac5
cmp dword [0x1400cfe94], 1
jb 0x140066b79
mov ecx, 0x1000021
call fcn.14000e3d0
test al, al
je 0x140066b79
lea rdx, str.socks_handshake:_unknown_SOCKS_auth_method
mov ecx, 0x1000021
jmp 0x140066b74
cmp byte [rbp + 0x90], r13b
jne 0x140066afb
cmp dword [0x1400cfe94], 1
jb 0x140066b79
mov ecx, 0x1000021
call fcn.14000e3d0
test al, al
je 0x140066b79
lea rdx, str.socks_handshake:_server_asked_for_username_login_auth_but_we_were_not_provided_any_credentials
mov ecx, 0x1000021
jmp 0x140066b74
mov r8, r14
mov rdx, rsi
mov rcx, rbp
call fcn.1400665c0
test al, al
je 0x140066b79
mov al, 1
jmp 0x140066b7b
cmp dword [0x1400cfe94], 1
jb 0x140066b79
mov ecx, 0x1000121
call fcn.14000e3d0
test al, al
je 0x140066b79
lea rdx, str.socks_handshake:_TCP_port_read_failed_on_recv__
jmp 0x140066b6f
cmp dword [0x1400cfe94], 1
jb 0x140066b79
mov ecx, 0x1000121
call fcn.14000e3d0
test al, al
je 0x140066b79
lea rdx, str.socks_handshake:_TCP_port_read_failed_on_select__
jmp 0x140066b6f
cmp dword [0x1400cfe94], 1
jb 0x140066b79
mov ecx, 0x1000121
call fcn.14000e3d0
test al, al
je 0x140066b79
lea rdx, str.socks_handshake:_TCP_port_read_timeout_expired
mov ecx, 0x1000121
call fcn.14000e000
xor al, al
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.140088150
mov rbx, qword [rsp + 0x2c8]
add rsp, 0x270
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret