Function at 0x140065680
Capabilities:
Send data
Send data on socket

Disassembly:
mov r11, rsp
push rbx
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x178
mov rax, qword [0x1400cb008]
xor rax, rsp
mov qword [rsp + 0x160], rax
mov qword [r11 + 0x18], rbp
mov r14, rdx
mov qword [r11 - 0x38], r15
mov rdi, rcx
xor r13b, r13b
nop word [rax + rax]
mov rbx, qword [rdi + 0x2a0]
lea rcx, [rsp + 0x40]
call fcn.140088390
test eax, eax
jne 0x1400656f6
lea rcx, [rsp + 0x40]
call fcn.140052ca0
mov rcx, qword [0x1400cb8d0]
mov eax, dword [0x1400cb8d8]
mov dword [rsp + 0x40], ecx
mov dword [rsp + 0x44], eax
jmp 0x1400656fd
mov rcx, qword [0x1400cb8d0]
mov eax, dword [rbx + 8]
mov r8d, 0
add eax, dword [rbx + 4]
mov r9, r14
sub eax, ecx
lea rcx, [rdi + 0x30]
cmovns r8d, eax
mov rax, qword [rdi]
mov rdx, qword [rax + 0x10]
mov rdx, qword [rdx + 0x20]
call fcn.140064920
mov eax, dword [r14]
test eax, eax
jne 0x1400658f8
mov rcx, qword [rdi + 0x260]
test rcx, rcx
je 0x14006577a
mov r9, qword [rdi + 0x298]
lea rax, [rdi + 0x1e8]
mov r8, qword [rdi + 0x290]
mov rdx, qword [rdi + 0x30]
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], rax
mov rax, qword [rdi + 0x2a0]
mov qword [rsp + 0x20], rax
call fcn.140059b80
movzx r13d, al
jmp 0x1400658bc
mov rcx, qword [rdi + 0x268]
test rcx, rcx
je 0x1400658bc
mov r15, qword [rdi + 0x30]
mov r8, r14
mov rbp, qword [rdi + 0x298]
mov rdx, r15
mov rsi, qword [rdi + 0x290]
call fcn.140068430
test al, al
je 0x1400658ae
mov dword [rsp + 0x50], 0x3000105
mov rbx, 0xffffffffffffffff
nop
inc rbx
cmp byte [rsi + rbx], 0
jne 0x1400657c0
lea rax, [rbx + 7]
mov rdx, rsi
cmp rax, 0x10e
lea rcx, [rsp + 0x55]
mov eax, 0x107
cmova rbx, rax
mov r8, rbx
mov byte [rsp + 0x54], bl
call sub.VCRUNTIME140.dll_memcpy
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov edx, eax
lea ecx, [rax - 1]
cmp ecx, 0xfffe
jbe 0x14006581a
xor edx, edx
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_getservbyname]
test rax, rax
je 0x140065883
movsx edx, word [rax + 0x18]
test edx, edx
je 0x140065883
mov eax, edx
mov byte [rsp + rbx + 0x56], dl
sar eax, 8
lea rdx, [rsp + 0x50]
mov byte [rsp + rbx + 0x55], al
xor r9d, r9d
add ebx, 7
mov rcx, r15
mov r8d, ebx
call qword [sym.imp.WS2_32.dll_send]
cmp eax, ebx
je 0x140065870
cmp dword [0x1400d3ed4], 1
jb 0x1400658ae
mov ecx, 0x1000121
call fcn.14000ec70
test al, al
je 0x1400658ae
lea rdx, str.establish_socks_proxy_passthru:_TCP_port_write_failed_on_send__
mov ecx, 0x1000121
call fcn.14000e820
jmp 0x1400658ae
mov r8, r14
xor edx, edx
mov rcx, r15
call fcn.1400686f0
test al, al
jne 0x1400658bc
jmp 0x1400658ae
cmp dword [0x1400d3ed4], 1
jb 0x1400658ae
mov ecx, 0x1000021
call fcn.14000ec70
test al, al
je 0x1400658ae
mov r8, rbp
lea rdx, str.establish_socks_proxy_passthrough:_Cannot_convert__s_to_port_number
mov ecx, 0x1000021
call fcn.14000e820
mov eax, dword [r14]
test eax, eax
jne 0x1400658bc
mov dword [r14], 0xa
test r13b, r13b
je 0x1400658f8
mov rcx, qword [rdi + 0x30]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rax, qword [rdi]
mov rcx, qword [rax + 0x10]
test rcx, rcx
je 0x140065942
cmp dword [rcx + 8], 1
jne 0x140065929
mov r8d, dword [rcx + 0xc]
mov edx, 1
mov ecx, dword [rcx + 4]
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rdi + 0x30], rax
jmp 0x1400656c0
mov r15, qword [rsp + 0x170]
mov rbp, qword [rsp + 0x1c0]
mov rcx, qword [rsp + 0x160]
xor rcx, rsp
call fcn.14008aca0
add rsp, 0x178
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
lea r8, str.addrinfo__ai_socktype__SOCK_STREAM
mov edx, 0x3f7
lea rcx, str.C:Users_vagrant_buildbotwindows_server_2019_static_msbuildopenvpn_srcopenvpn_socket.c
call fcn.14000ed60
int3
lea r8, str.addrinfo
mov edx, 0x3f6
lea rcx, str.C:Users_vagrant_buildbotwindows_server_2019_static_msbuildopenvpn_srcopenvpn_socket.c
call fcn.14000ed60
int3