Function at 0x1400181b0
Capabilities:
Resolve dns

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
mov eax, 0x1318
call fcn.140002a74
sub rsp, rax
mov rbx, rcx
call fcn.1400179f0
test al, al
je 0x1400184ef
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
mov rcx, rbx
call fcn.140017b20
test rax, rax
je 0x1400186b6
mov rsi, rax
lea rdx, str.set1_n
mov rcx, rax
call fcn.140017c50
mov eax, dword [rbx + 0x44]
test al, 2
jne 0x1400186e6
test al, 8
jne 0x140018760
test al, 0x10
jne 0x140018782
test al, 1
je 0x14001823c
lea rdx, str.replace_peerstrue_n
mov rcx, rsi
call fcn.140017c50
mov r15, qword [rbx + 0x90]
test r15, r15
je 0x140018593
lea r14, str.public_key_s_n
lea r12, [rsp + 0x60]
lea rbp, [rsp + 0xb0]
mov r13, qword [sym.imp.WS2_32.dll_inet_ntop]
jmp 0x14001828f
mov rcx, rsi
lea rdx, str.removetrue_n
call fcn.140017c50
mov r15, qword [r15 + 0x98]
test r15, r15
je 0x140018593
xor eax, eax
nop word cs:[rax + rax]
nop dword [rax + rax]
movzx ecx, byte [r15 + rax + 4]
shr ecx, 4
lea edx, [rcx + 0xfff6]
shr edx, 8
and edx, 0xd9
add edx, ecx
add dl, 0x57
mov byte [rsp + rax*2 + 0x60], dl
movzx ecx, byte [r15 + rax + 4]
and ecx, 0xf
lea edx, [rcx + 0xfff6]
shr edx, 8
and edx, 0xd9
add edx, ecx
add dl, 0x57
mov byte [rsp + rax*2 + 0x61], dl
add rax, 1
cmp rax, 0x20
jne 0x1400182a0
mov byte [rsp + 0xa0], 0
mov rcx, rsi
mov rdx, r14
mov r8, r12
call fcn.140017c50
mov eax, dword [r15]
test al, 1
jne 0x140018270
test al, 8
je 0x140018386
xor eax, eax
nop dword [rax + rax]
movzx ecx, byte [r15 + rax + 0x24]
shr ecx, 4
lea edx, [rcx + 0xfff6]
shr edx, 8
and edx, 0xd9
add edx, ecx
add dl, 0x57
mov byte [rsp + rax*2 + 0x60], dl
movzx ecx, byte [r15 + rax + 0x24]
and ecx, 0xf
lea edx, [rcx + 0xfff6]
shr edx, 8
and edx, 0xd9
add edx, ecx
add dl, 0x57
mov byte [rsp + rax*2 + 0x61], dl
add rax, 1
cmp rax, 0x20
jne 0x140018320
mov byte [rsp + 0xa0], 0
mov rcx, rsi
lea rdx, str.preshared_key_s_n
mov r8, r12
call fcn.140017c50
mov rbx, r14
movzx eax, word [r15 + 0x44]
cmp ax, 0x17
je 0x14001839e
cmp ax, 2
jne 0x140018440
cmp ax, 0x17
mov edx, 0
mov ecx, 0x1c
cmove edx, ecx
lea r14, [r15 + 0x44]
cmp ax, 2
mov eax, 0x10
cmove edx, eax
lea rax, [rsp + 0x100]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x30], 0x1a
mov dword [rsp + 0x28], 0x201
mov rcx, r14
lea r8, [rsp + 0x310]
mov r9d, 0x1001
call qword [sym.imp.WS2_32.dll_getnameinfo]
test eax, eax
jne 0x140018440
cmp word [r14], 0x17
jne 0x140018421
lea rcx, [rsp + 0x310]
mov edx, 0x3a
call sub.msvcrt.dll_strchr
test rax, rax
je 0x140018421
mov rcx, rsi
lea rdx, str.endpoint__s_:_s_n
jmp 0x14001842b
mov rcx, rsi
lea rdx, str.endpoint_s:_s_n
lea r8, [rsp + 0x310]
lea r9, [rsp + 0x100]
call fcn.140017c50
mov eax, dword [r15]
test al, 0x10
je 0x140018461
movzx r8d, word [r15 + 0x80]
mov rcx, rsi
lea rdx, str.persistent_keepalive_interval_u_n
call fcn.140017c50
mov eax, dword [r15]
test al, 2
mov r14, rbx
je 0x140018477
mov rcx, rsi
lea rdx, str.replace_allowed_ipstrue_n
call fcn.140017c50
mov rdi, qword [r15 + 0x88]
test rdi, rdi
lea rbx, str.allowed_ip_s__d_n
jne 0x14001849d
jmp 0x14001827f
mov rdi, qword [rdi + 0x18]
test rdi, rdi
je 0x14001827f
movzx eax, word [rdi]
cmp ax, 0x17
je 0x1400184c0
cmp ax, 2
jne 0x140018490
lea rdx, [rdi + 4]
mov r9d, 0x41
mov ecx, 2
jmp 0x1400184cf
lea rdx, [rdi + 4]
mov r9d, 0x41
mov ecx, 0x17
mov r8, rbp
call r13
test rax, rax
je 0x140018490
movzx r9d, byte [rdi + 0x14]
mov rcx, rsi
mov rdx, rbx
mov r8, rbp
call fcn.140017c50
jmp 0x140018490
mov dword [rsp + 0x310], 0x50
mov rcx, rbx
call fcn.140017c80
test rax, rax
je 0x1400186c5
mov r14, rax
mov rbp, qword [rbx + 0x90]
mov esi, 0x50
test rbp, rbp
je 0x1400187a8
mov rax, rbp
jmp 0x140018540
mov rax, qword [rax + 0x98]
test rax, rax
je 0x1400187a8
mov ecx, esi
xor ecx, 0xfffffff8
cmp ecx, 0x87
jbe 0x1400186d2
add esi, 0x88
mov dword [rsp + 0x310], esi
mov rcx, qword [rax + 0x88]
test rcx, rcx
je 0x140018530
nop
mov edx, esi
xor edx, 0xfffffff8
cmp edx, 0x17
jbe 0x1400186d2
add esi, 0x18
mov dword [rsp + 0x310], esi
mov rcx, qword [rcx + 0x18]
test rcx, rcx
jne 0x140018570
jmp 0x140018530
lea rdx, [0x14001e60f]
mov rcx, rsi
call fcn.140017c50
mov rcx, rsi
call sub.msvcrt.dll_fflush
lea rcx, [rsp + 0x48]
lea rdx, [rsp + 0x50]
mov r8, rsi
call fcn.140009170
test rax, rax
jle 0x140018698
mov ebx, 0xffffff7a
lea r15, str.errno
lea r12, [rsp + 0x48]
lea r13, [rsp + 0x50]
jmp 0x1400185f7
mov rcx, r12
mov rdx, r13
mov r8, rsi
call fcn.140009170
test rax, rax
jle 0x140018698
mov rdi, qword [rsp + 0x48]
mov rcx, rdi
call sub.msvcrt.dll_strlen
mov r14, rax
cmp rax, 1
jne 0x140018616
cmp byte [rdi], 0xa
je 0x140018922
mov rcx, rdi
mov edx, 0x3d
call sub.msvcrt.dll_strchr
test r14, r14
je 0x140018698
mov rbp, rax
test rax, rax
je 0x140018698
cmp byte [r14 + rdi - 1], 0xa
jne 0x140018698
mov byte [rdi + r14 - 1], 0
mov byte [rbp], 0
mov rcx, rdi
mov rdx, r15
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x1400185e0
add rbp, 1
movsx eax, byte [rbp]
cmp eax, 0x2d
je 0x14001866c
mov ecx, 0x2f
sub ecx, eax
add eax, 0xffffffc6
test ecx, eax
jns 0x140018698
mov rcx, rbp
lea rdx, [rsp + 0x58]
mov r8d, 0xa
call fcn.140001e00
mov rbx, rax
movsxd rax, ebx
cmp rax, rbx
jne 0x140018698
mov rax, qword [rsp + 0x58]
cmp byte [rax], 0
je 0x1400185e0
call qword [sym.imp.msvcrt.dll__errno]
cmp dword [rax], 0
je 0x14001891d
call qword [sym.imp.msvcrt.dll__errno]
xor ebx, ebx
sub ebx, dword [rax]
jmp 0x140018922
call qword [sym.imp.msvcrt.dll__errno]
xor ebx, ebx
sub ebx, dword [rax]
jmp 0x140018a16
call qword [sym.imp.msvcrt.dll__errno]
mov ebx, dword [rax]
jmp 0x140018a14
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], 0x84
xor r15d, r15d
jmp 0x1400189fb
xor eax, eax
nop dword [rax + rax]
movzx ecx, byte [rbx + rax + 0x68]
mov edx, ecx
shr edx, 4
lea ebp, [rdx + 0xfff6]
shr ebp, 8
and ebp, 0xd9
add ebp, edx
add bpl, 0x57
mov byte [rsp + rax*2 + 0x60], bpl
and ecx, 0xf
lea edx, [rcx + 0xfff6]
shr edx, 8
and edx, 0xd9
add edx, ecx
add dl, 0x57
mov byte [rsp + rax*2 + 0x61], dl
add rax, 1
cmp rax, 0x20
jne 0x1400186f0
mov byte [rsp + 0xa0], 0
lea rdx, str.private_key_s_n
lea r8, [rsp + 0x60]
mov rcx, rsi
call fcn.140017c50
mov eax, dword [rbx + 0x44]
test al, 8
je 0x140018221
movzx r8d, word [rbx + 0x8c]
lea rdx, str.listen_port_u_n
mov rcx, rsi
call fcn.140017c50
mov eax, dword [rbx + 0x44]
test al, 0x10
je 0x140018229
mov r8d, dword [rbx + 0x88]
lea rdx, str.fwmark_u_n
mov rcx, rsi
call fcn.140017c50
mov eax, dword [rbx + 0x44]
test al, 1
jne 0x14001822d
jmp 0x14001823c
mov edx, esi
mov ecx, 1
call sub.msvcrt.dll_calloc
mov r15, rax
xor eax, eax
test r15, r15
je 0x14001894e
mov ecx, dword [rbx + 0x44]
test cl, 2
jne 0x140018956
test cl, 8
jne 0x14001897d
test cl, 1
jne 0x140018998
test rbp, rbp
je 0x1400189a7
mov rcx, r15
add rcx, 0x50
xor r8d, r8d
jmp 0x14001881d
mov dword [rcx + 0x80], esi
add r8, 1
mov rbp, qword [rbp + 0x98]
mov rcx, rdx
test rbp, rbp
je 0x140018945
mov dword [rcx], 1
movups xmm0, xmmword [rbp + 4]
movups xmm1, xmmword [rbp + 0x14]
movups xmmword [rcx + 0x18], xmm1
movups xmmword [rcx + 8], xmm0
mov eax, dword [rbp]
mov edx, 1
test al, 8
je 0x14001885d
movups xmm0, xmmword [rbp + 0x24]
movups xmm1, xmmword [rbp + 0x34]
movups xmmword [rcx + 0x38], xmm1
movups xmmword [rcx + 0x28], xmm0
mov dword [rcx], 3
mov eax, dword [rbp]
mov edx, 3
test al, 0x10
je 0x140018871
movzx edi, word [rbp + 0x80]
mov word [rcx + 0x48], di
or edx, 4
mov dword [rcx], edx
lea rsi, [rbp + 0x44]
movzx edi, word [rbp + 0x44]
cmp di, 0x17
je 0x140018890
cmp di, 2
jne 0x1400188a7
movups xmm0, xmmword [rsi]
jmp 0x14001889b
movups xmm0, xmmword [rsi]
movups xmm1, xmmword [rsi + 0xc]
movups xmmword [rcx + 0x58], xmm1
movups xmmword [rcx + 0x4c], xmm0
or edx, 8
mov dword [rcx], edx
mov eax, dword [rbp]
test al, 3
je 0x1400188bf
mov ebx, eax
shl ebx, 4
and ebx, 0x20
or ebx, edx
shl eax, 6
and eax, 0x40
or eax, ebx
mov dword [rcx], eax
lea rdx, [rcx + 0x88]
mov rbx, qword [rbp + 0x88]
xor esi, esi
jmp 0x1400188f3
movups xmm0, xmmword [rbx + 4]
movups xmmword [rdx], xmm0
add rsi, 1
add rdx, 0x18
mov rbx, qword [rbx + 0x18]
test rbx, rbx
je 0x140018800
movzx edi, word [rbx]
mov word [rdx + 0x10], di
movzx eax, byte [rbx + 0x14]
mov byte [rdx + 0x12], al
cmp di, 0x17
je 0x1400188e0
cmp di, 2
jne 0x1400188ef
mov eax, dword [rbx + 4]
mov dword [rdx], eax
jmp 0x1400188e7
mov ebx, 0xffffff7a
mov rcx, qword [rsp + 0x48]
call sub.msvcrt.dll_free
mov rcx, rsi
call sub.msvcrt.dll_fclose
mov esi, ebx
neg esi
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], esi
jmp 0x140018a16
mov esi, dword [rsp + 0x310]
jmp 0x1400189aa
xor r15d, r15d
jmp 0x1400189fb
movups xmm0, xmmword [rbx + 0x68]
movups xmm1, xmmword [rbx + 0x78]
movups xmmword [r15 + 0x16], xmm1
movups xmmword [r15 + 6], xmm0
mov dword [r15], 2
mov eax, 2
test cl, 8
je 0x1400187d7
movzx edx, word [rbx + 0x8c]
mov word [r15 + 4], dx
or eax, 4
mov dword [r15], eax
test cl, 1
je 0x1400187e0
or eax, 8
mov dword [r15], eax
test rbp, rbp
jne 0x1400187e9
xor r8d, r8d
mov dword [r15 + 0x48], r8d
lea rax, [rsp + 0x310]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], r15
mov qword [rsp + 0x38], 0
mov rcx, r14
mov edx, 0xb098c509
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov ebx, eax
call qword [sym.imp.msvcrt.dll__errno]
test ebx, ebx
je 0x1400189f5
mov dword [rax], 0
jmp 0x1400189fb
mov dword [rax], 0xd
call qword [sym.imp.msvcrt.dll__errno]
mov ebx, dword [rax]
mov rcx, r15
call sub.msvcrt.dll_free
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
neg ebx
mov eax, ebx
add rsp, 0x1318
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret