Function at 0x140013c40
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
xor r12d, r12d
mov rdi, rcx
mov ecx, dword [rcx + 0xf40]
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x38], r12
test ecx, ecx
jle 0x1400142b5
cmp ecx, dword [rdi + 0xc64]
jg 0x140014262
mov rax, qword [rdi + 0xc40]
test rax, rax
je 0x14001438f
movzx edx, word [rax]
cmp dx, 2
je 0x140013ce9
cmp dx, 0x17
jne 0x14001438f
cmp word [rax + 8], r12w
jne 0x140013ce5
cmp word [rax + 0xa], r12w
jne 0x140013ce5
cmp word [rax + 0xc], r12w
jne 0x140013ce5
cmp word [rax + 0xe], r12w
jne 0x140013ce5
cmp word [rax + 0x10], r12w
jne 0x140013ce5
cmp word [rax + 0x12], r12w
jne 0x140013ce5
cmp word [rax + 0x14], r12w
jne 0x140013ce5
cmp word [rax + 0x16], r12w
jne 0x140013ce5
xor al, al
jmp 0x140013cf0
mov al, 1
jmp 0x140013cf0
cmp dword [rax + 4], r12d
setne al
test al, al
je 0x14001438f
lea rbx, [0x140000000]
cmp dword [rdi + 0x1b4], r12d
je 0x140013d55
movsxd rax, dword [rdi + 0x68]
mov edx, r12d
cmp qword [rdi + 0xf48], rdx
cmovne edx, ecx
cmp eax, 4
ja 0x140014344
mov ecx, dword [rbx + rax*4 + 0x94d08]
mov eax, 0x64
add ecx, edx
cmp ecx, eax
cmovg eax, ecx
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [rdi + 0xd20]
cvttsd2si esi, xmm0
cmp esi, 0x989680
jge 0x140013d5e
test esi, esi
jne 0x140013d63
mov r8, qword [0x1400c7890]
jmp 0x140013dc1
mov esi, 0x989680
lea rbx, [rdi + 0xd14]
mov rcx, rbx
call fcn.140086610
test eax, eax
jne 0x14001432b
mov rcx, rbx
call fcn.140051120
mov ecx, dword [0x1400c7898]
mov r8, qword [0x1400c7890]
add ecx, esi
mov edx, ecx
and ecx, 0xfffff
sar edx, 0x14
add edx, r8d
mov dword [rbx + 4], ecx
mov dword [rbx], edx
cmp ecx, 0xf4240
jb 0x140013dba
lea eax, [rcx - 0xf4240]
mov dword [rbx + 4], eax
lea eax, [rdx + 1]
mov dword [rbx], eax
lea rbx, [0x140000000]
cmp dword [rdi + 0x1d0], r12d
je 0x140013dda
cmp byte [rdi + 0xd60], r12b
je 0x140013dda
mov qword [rdi + 0xd68], r8
mov rcx, qword [rdi + 0xc20]
test rcx, rcx
je 0x140013e0e
cmp byte [rcx + 0x2ac], r12b
je 0x140013e0e
xor edx, edx
mov dword [rsp + 0x20], 4
lea r9, [rcx + 0x2a8]
mov rcx, qword [rcx + 0x30]
lea r8d, [rdx + 3]
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp byte [rdi + 0xf50], r12b
je 0x140013e31
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, [0x1400990e0]
call fcn.14000df00
cmp dword [0x1400cfe94], 6
jb 0x140013f41
mov ecx, 0x45000086
call fcn.14000e3d0
test al, al
je 0x140013f41
cmp qword [rdi + 0x8a0], r12
je 0x140013e62
movzx ebp, byte [rdi + 0x9c1]
jmp 0x140013e65
mov ebp, r12d
cmp dword [0x1400cfe94], 9
lea r9, [rsp + 0x30]
mov rcx, qword [rdi + 0xc40]
mov r8d, 6
setae r14b
call fcn.140065290
lea r13, [rdi + 0xf38]
mov r15, rax
cmp qword [rdi + 0xf48], r12
je 0x140013ea4
mov esi, dword [rdi + 0xf40]
test esi, esi
jns 0x140013ea7
mov esi, r12d
mov r8, qword [rdi + 0xc20]
lea rcx, [0x140094de4]
mov edx, r12d
movzx r9d, word [r8 + 0x28]
nop dword [rax]
cmp word [rcx - 4], r9w
jne 0x140013ecf
mov eax, dword [r8 + 0x24]
cmp dword [rcx], eax
je 0x140013f31
inc edx
add rcx, 0x18
cmp edx, 0xd
jb 0x140013ec0
lea rbx, str._unknown_protocol_
mov rax, qword [rdi + 0xdf0]
lea r8, [rsp + 0x30]
neg rax
mov rcx, r13
sbb edx, edx
and edx, 0x200
neg r14b
sbb eax, eax
and eax, 0x500
or edx, eax
or edx, ebp
call fcn.14006e7a0
mov qword [rsp + 0x28], rax
lea rdx, str._s_WRITE___d__to__s:__s
mov r9d, esi
mov qword [rsp + 0x20], r15
mov r8, rbx
mov ecx, 0x45000086
call fcn.14000e000
jmp 0x140013f48
mov eax, edx
lea rcx, [rax + rax*2]
mov rbx, qword [rbx + rcx*8 + 0x94dd8]
jmp 0x140013ee1
lea r13, [rdi + 0xf38]
mov rax, qword [rdi + 0xc20]
mov r14d, r12d
mov r15, qword [rdi + 0xc40]
mov rbp, rax
cmp qword [rax + 0x268], r12
je 0x140013f87
cmp dword [rax + 0x24], 1
jne 0x140013f87
mov rdx, r15
mov rcx, r13
call fcn.140067010
mov rbp, qword [rdi + 0xc20]
mov r14d, eax
lea r15, [rbp + 0x270]
mov eax, dword [rbp + 0x24]
cmp eax, 4
ja 0x140014376
cmp eax, 1
jne 0x140013ffe
lea rdx, [rbp + 0xc8]
mov eax, dword [rdx]
dec eax
cmp eax, 1
ja 0x140013fdd
mov rcx, qword [rbp + 0x30]
xor r9d, r9d
xor r8d, r8d
call fcn.140066260
mov esi, eax
test eax, eax
jns 0x140013fdd
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8, r15
mov rdx, r13
mov rcx, rbp
mov ebx, eax
call fcn.140065f20
mov ecx, ebx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
jmp 0x14001401a
mov rdx, r13
mov r8, r15
mov rcx, rbp
call fcn.140065f20
cmp qword [r13 + 0x10], r12
je 0x140013ff9
mov esi, dword [r13 + 8]
test esi, esi
jns 0x14001401a
mov esi, r12d
jmp 0x14001401a
add eax, 0xfffffffd
cmp eax, 1
ja 0x14001435d
mov r8, r15
mov rdx, r13
mov rcx, rbp
call fcn.140065ac0
mov esi, eax
test r14d, r14d
jle 0x14001405b
cmp esi, r14d
jle 0x14001405b
sub esi, r14d
cmp qword [rdi + 0xf48], r12
je 0x1400140d0
mov eax, dword [rdi + 0xf40]
test eax, eax
js 0x1400140d0
cmp eax, r14d
jl 0x1400140d0
add dword [rdi + 0xf3c], r14d
sub eax, r14d
mov dword [rdi + 0xf40], eax
test esi, esi
jle 0x1400140e4
mov ecx, dword [rdi + 0xdcc]
mov eax, esi
cmp esi, ecx
cmovle eax, ecx
mov rcx, qword [0x1400cfe58]
mov dword [rdi + 0xdcc], eax
movsxd rax, esi
add qword [rdi + 0xd48], rax
add qword [0x1400cfe60], rax
test rcx, rcx
je 0x1400140e4
test byte [rcx + 0x38], 1
jne 0x1400140a5
add qword [rcx + 0xd8], rax
call fcn.14000fd50
lea r9, [rdi + 0x10b0]
lea rdx, [rdi + 0xd38]
lea r8, [rdi + 0xd48]
call fcn.14000fe10
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, qword [rdi + 0xc20]
mov ebp, eax
jmp 0x1400140f7
mov esi, r12d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, qword [rdi + 0xc20]
mov ebp, eax
jmp 0x1400140f7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, qword [rdi + 0xc20]
mov ebp, eax
test esi, esi
js 0x140014108
mov ecx, dword [0x1400cfe78]
and ecx, 0xf
cmp ecx, dword [0x1400cfe94]
ja 0x140014119
xor r9d, r9d
lea rdx, str.write
mov ecx, esi
call fcn.14000e880
test esi, esi
jle 0x140014193
cmp qword [rdi + 0xf48], r12
je 0x140014134
mov eax, dword [rdi + 0xf40]
test eax, eax
js 0x140014134
cmp esi, eax
je 0x140014193
cmp dword [0x1400cfe94], 1
jb 0x140014193
mov ecx, 0x1000021
call fcn.14000e3d0
test al, al
je 0x140014193
cmp qword [rdi + 0xf48], r12
je 0x14001415e
mov ebx, dword [rdi + 0xf40]
test ebx, ebx
jns 0x140014161
mov ebx, r12d
mov rcx, qword [rdi + 0xc40]
lea r9, [rsp + 0x30]
mov r8d, 6
call fcn.140065290
mov r9d, ebx
mov dword [rsp + 0x20], esi
mov r8, rax
lea rdx, str.TCP_UDP_packet_was_truncated_expanded_on_write_to__s__tried_d_actual_d_
mov ecx, 0x1000021
call fcn.14000e000
cmp dword [rdi + 0xf10], r12d
jle 0x1400141d7
cmp dword [rdi + 0x1c8], r12d
je 0x1400141d7
add dword [rdi + 0xd90], esi
mov eax, dword [rdi + 0xd90]
cmp eax, dword [rdi + 0x1cc]
jl 0x1400141d7
mov dword [rdi + 0xd90], r12d
cmp byte [rdi + 0xd80], r12b
je 0x1400141d7
mov rax, qword [0x1400c7890]
mov qword [rdi + 0xd88], rax
test esi, esi
jns 0x1400142b5
cmp ebp, 0x76
jne 0x1400142b5
mov rax, qword [rdi + 0xdf0]
test rax, rax
je 0x1400142b5
cmp dword [rax + 0x374], r12d
jg 0x1400142b5
cmp dword [rdi + 0x20], r12d
jne 0x1400142b5
cmp dword [0x1400cfe94], 1
jb 0x140014233
lea ecx, [rbp - 0x75]
call fcn.14000e3d0
test al, al
je 0x140014233
lea rdx, str.Network_unreachable__restarting
lea ecx, [rbp - 0x75]
call fcn.14000e000
mov rax, qword [rdi + 0x968]
mov ecx, dword [rax]
cmp ecx, 0xf
je 0x14001424e
mov rax, qword [rdi + 0x968]
mov dword [rax], 0xa
mov rax, qword [rdi + 0x968]
lea rcx, str.network_unreachable
mov qword [rax + 8], rcx
jmp 0x1400142b5
cmp dword [0x1400cfe94], 1
jb 0x1400142b5
mov ecx, 0x1000021
call fcn.14000e3d0
test al, al
je 0x1400142b5
mov rcx, qword [rdi + 0xc40]
lea r9, [rsp + 0x30]
mov r8d, 6
call fcn.140065290
mov ecx, dword [rdi + 0xc64]
lea rdx, str.TCP_UDP_packet_too_large_on_write_to__s__tried_d_max_d_
mov r9d, dword [rdi + 0xf40]
mov r8, rax
mov dword [rsp + 0x20], ecx
mov ecx, 0x1000021
call fcn.14000e000
mov rcx, qword [rsp + 0x30]
mov qword [rdi + 0xf38], r12
mov dword [rdi + 0xf40], r12d
mov qword [rdi + 0xf48], r12
test rcx, rcx
je 0x1400142e5
mov rbx, qword [rcx]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rbx
test rbx, rbx
jne 0x1400142d4
mov rdi, qword [rsp + 0x38]
test rdi, rdi
je 0x14001430b
nop
mov rcx, qword [rdi + 0x10]
mov rbx, qword [rdi]
call qword [rdi + reloc.WS2_32.dll_htonl]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdi, rbx
test rbx, rbx
jne 0x1400142f0
mov rbx, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
lea r8, str._openvpn_gettimeofday_s__wakeup__NULL_
mov edx, 0x92
lea rcx, str.C:Users_vagrant_buildopenvpn_srcopenvpn_shaper.h
call fcn.14000e4c0
int3
lea r8, str.proto___0__proto___PROTO_N
mov edx, 0x25e
lea rcx, str.C:Users_vagrant_buildopenvpn_srcopenvpn_socket.h
call fcn.14000e4c0
int3
lea r8, [0x14008b3f4]
mov edx, 0x49a
lea rcx, str.C:Users_vagrant_buildopenvpn_srcopenvpn_socket.h
call fcn.14000e4c0
int3
lea r8, [0x14008b3f4]
mov edx, 0xc88
lea rcx, str.C:Users_vagrant_buildopenvpn_srcopenvpn_socket.c
call fcn.14000e4c0
int3
lea r8, str.link_socket_actual_defined_c__c2.to_link_addr_
mov edx, 0x623
lea rcx, str.C:Users_vagrant_buildopenvpn_srcopenvpn_forward.c
call fcn.14000e4c0
int3