Function at 0x140017c80
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x1c8
movaps xmmword [rsp + 0x1b0], xmm8
movaps xmmword [rsp + 0x1a0], xmm7
movaps xmmword [rsp + 0x190], xmm6
mov qword [rsp + 0x50], rcx
cmp byte [0x140028677], 1
jne 0x140017d3e
mov rax, qword [rsp + 0x50]
mov cl, byte [rax]
test cl, cl
je 0x140017cfe
mov rax, qword [rsp + 0x50]
lea rdx, [rax + 1]
mov eax, 0x1505
nop dword [rax + rax]
mov ebp, eax
shl ebp, 5
add ebp, eax
movsx eax, cl
xor eax, ebp
movzx ecx, byte [rdx]
add rdx, 1
test cl, cl
jne 0x140017ce0
and eax, 0x3ff
jmp 0x140017d03
mov eax, 0x105
lea rcx, [0x140025470]
mov rbx, qword [rcx + rax*8]
test rbx, rbx
je 0x140017d3e
nop word [rax + rax]
mov rcx, qword [rbx]
mov rdx, qword [rsp + 0x50]
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x14001807e
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140017d20
cmp byte [0x1400286c2], 0
lea rax, str.SWDWireGuard
lea rdx, str.ROOTWIREGUARD
cmove rdx, rax
xorps xmm8, xmm8
movups xmmword [rsp + 0x20], xmm8
mov qword [rsp + 0x30], 0
lea rcx, [0x14001df3c]
xor edi, edi
xor r8d, r8d
mov r9d, 2
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsExW]
cmp rax, 0xffffffffffffffff
je 0x14001810a
mov rbx, rax
movups xmm7, xmmword [0x14001df60]
movups xmm6, xmmword [0x14001df50]
lea r13, [rsp + 0x70]
mov rsi, qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
mov r12, qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140017ddc
call r12
cmp eax, 0x103
je 0x1400180f3
xor ebp, ebp
add edi, 1
test rbp, rbp
jne 0x14001802e
movaps xmmword [rsp + 0x80], xmm7
movaps xmmword [rsp + 0x70], xmm6
mov rcx, rbx
mov edx, edi
mov r8, r13
call rsi
test eax, eax
je 0x140017dc0
lea rax, [rsp + 0x90]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x100
mov rcx, rbx
mov rdx, r13
lea r8, str.WireGuardNameKey
lea r9, [rsp + 0x5c]
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDevicePropertyW]
test eax, eax
je 0x140017dce
cmp dword [rsp + 0x5c], 0x12
mov ebp, 0
jne 0x140017dd0
mov word [rsp + 0x18e], 0x30
cmp word [rsp + 0x90], 0
je 0x140017dce
mov r15, rsi
mov r14, r12
movups xmmword [rsp + 0x30], xmm8
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov ecx, 0xfde9
xor edx, edx
lea r8, [rsp + 0x90]
mov r9d, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [rsp + 0x4c], eax
test eax, eax
je 0x140018017
mov r12d, eax
mov ecx, eax
call sub.msvcrt.dll_malloc
test rax, rax
je 0x140018017
mov rbp, rax
movups xmmword [rsp + 0x30], xmm8
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], rax
mov ecx, 0xfde9
xor edx, edx
lea r8, [rsp + 0x90]
mov r9d, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [rsp + 0x4c], eax
test eax, eax
je 0x14001800f
mov rcx, rbp
mov rdx, qword [rsp + 0x50]
call sub.msvcrt.dll_strcmp
mov esi, eax
mov rcx, rbp
call sub.msvcrt.dll_free
test esi, esi
jne 0x140018017
lea rax, [rsp + 0x4c]
mov qword [rsp + 0x20], rax
mov rcx, rbx
mov rdx, r13
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstanceIdW]
mov ebp, 0
test eax, eax
mov r12, r14
mov rsi, r15
jne 0x140017dd0
call r12
cmp eax, 0x7a
jne 0x140017dce
mov edx, dword [rsp + 0x4c]
mov ecx, 2
mov qword [rsp + 0x68], rdx
call sub.msvcrt.dll_calloc
test rax, rax
je 0x140017dce
mov rbp, rax
lea rax, [rsp + 0x4c]
mov qword [rsp + 0x20], rax
mov rcx, rbx
mov rdx, r13
mov r8, rbp
mov r9, qword [rsp + 0x68]
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstanceIdW]
test eax, eax
mov qword [rsp + 0x60], rbp
je 0x140017ffe
lea rcx, [rsp + 0x4c]
lea rdx, [0x14001e074]
mov r8, rbp
xor r9d, r9d
call qword [sym.imp.SETUPAPI.dll_CM_Get_Device_Interface_List_SizeW]
test eax, eax
jne 0x140017ffe
mov r12d, dword [rsp + 0x4c]
mov edx, 2
mov rcx, r12
call sub.msvcrt.dll_calloc
test rax, rax
je 0x140018024
mov rbp, rax
mov dword [rsp + 0x20], 0
lea rcx, [0x14001e074]
mov rdx, qword [rsp + 0x60]
mov r8, rax
mov r9d, r12d
call qword [sym.imp.SETUPAPI.dll_CM_Get_Device_Interface_ListW]
test eax, eax
mov r12, r14
mov rsi, r15
jne 0x140017ff6
cmp word [rbp], 0
jne 0x140018000
mov rcx, rbp
call sub.msvcrt.dll_free
xor ebp, ebp
mov rcx, qword [rsp + 0x60]
call sub.msvcrt.dll_free
jmp 0x140017dd0
mov rcx, rbp
call sub.msvcrt.dll_free
xor ebp, ebp
mov r12, r14
mov rsi, r15
jmp 0x140017dd0
xor ebp, ebp
mov r12, r14
mov rsi, r15
jmp 0x140018000
mov rcx, rbx
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
mov rcx, rbp
mov edx, 0xc0000000
mov r8d, 7
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
mov rcx, rbp
call sub.msvcrt.dll_free
cmp rdi, 0xffffffffffffffff
jne 0x14001810a
jmp 0x1400180e5
mov r8, qword [rbx + 8]
lea rdx, [0x14001e074]
lea rcx, [rsp + 0x90]
xor r9d, r9d
call qword [sym.imp.SETUPAPI.dll_CM_Get_Device_Interface_List_SizeW]
test eax, eax
jne 0x1400180e5
mov edi, dword [rsp + 0x90]
mov edx, 2
mov rcx, rdi
call sub.msvcrt.dll_calloc
test rax, rax
je 0x1400180e5
mov rsi, rax
mov rdx, qword [rbx + 8]
mov dword [rsp + 0x20], 0
lea rcx, [0x14001e074]
mov r8, rax
mov r9d, edi
call qword [sym.imp.SETUPAPI.dll_CM_Get_Device_Interface_ListW]
test eax, eax
je 0x14001813a
mov rcx, rsi
call sub.msvcrt.dll_free
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], 0xd
jmp 0x140018108
mov rcx, rbx
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], 2
xor edi, edi
mov rax, rdi
movaps xmm6, xmmword [rsp + 0x190]
movaps xmm7, xmmword [rsp + 0x1a0]
movaps xmm8, xmmword [rsp + 0x1b0]
add rsp, 0x1c8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
cmp word [rsi], 0
je 0x1400180dd
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
mov rcx, rsi
mov edx, 0xc0000000
mov r8d, 7
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
mov rcx, rsi
jmp 0x14001806d