Function at 0x14005d1a0
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0xa0
mov rax, qword [0x1400c9008]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov r14, rdx
mov r12, qword [rbp + 0x7f]
mov r15, qword [r9]
mov eax, dword [r8]
mov ebx, 0x80004005
test rdx, rdx
je 0x14005d432
mov dword [rbp - 0x51], eax
mov esi, eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8d, esi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
mov ebx, 0x8007000e
xor r13d, r13d
test rax, rax
cmovne ebx, r13d
je 0x14005d26d
lfence
mov r9d, esi
mov r8, r14
mov edx, esi
mov rcx, rax
call fcn.140019f50
lea rax, [rbp - 0x51]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
xor r9d, r9d
xor edx, edx
lea r8d, [r13 + 1]
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x14005d24e
mov ebx, r13d
jmp 0x14005d279
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
jle 0x14005d263
movzx ebx, ax
or ebx, 0x80070000
test ebx, ebx
js 0x14005d432
jmp 0x14005d279
test ebx, ebx
js 0x14005d432
mov rdi, qword [rbp - 0x51]
mov esi, dword [rbp - 0x51]
lfence
mov qword [rbp - 0x49], r13
mov qword [rbp - 0x39], r13
mov qword [rbp - 0x31], 0xf
mov byte [rbp - 0x49], r13b
mov r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp byte [rdi + r8], r13b
jne 0x14005d2a0
mov rdx, rdi
lea rcx, [rbp - 0x49]
call fcn.140007e80
nop
mov r9d, esi
xor r8d, r8d
lea rdx, [rbp - 0x29]
lea rcx, [rbp - 0x49]
call fcn.140018600
mov rsi, rax
lea rax, [rbp - 0x49]
cmp rax, rsi
je 0x14005d33a
mov rdx, qword [rbp - 0x31]
cmp rdx, 0x10
jb 0x14005d30c
inc rdx
mov rcx, qword [rbp - 0x49]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005d307
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14005d36c
call fcn.140061af0
mov qword [rbp - 0x39], r13
mov qword [rbp - 0x31], 0xf
mov byte [rbp - 0x49], 0
movups xmm0, xmmword [rsi]
movups xmmword [rbp - 0x49], xmm0
movups xmm1, xmmword [rsi + 0x10]
movups xmmword [rbp - 0x39], xmm1
mov qword [rsi + 0x10], r13
mov qword [rsi + 0x18], 0xf
mov byte [rsi], 0
mov rdx, qword [rbp - 0x11]
cmp rdx, 0x10
jb 0x14005d378
inc rdx
mov rcx, qword [rbp - 0x29]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005d373
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14005d373
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140061af0
mov byte [rbp - 0x29], 0
lea rdx, [rbp - 0x49]
lea rcx, [rbp - 9]
call sym.DiagsCap.exe_public:_static_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____cdecl_Hp::Bridge::Server::Services::Registration::CryptographyHelper::UTF8ToUTF16_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const____ptr64_
mov rdx, rax
mov rcx, r12
call fcn.140008fe0
mov rdx, qword [rbp + 0xf]
cmp rdx, 8
jb 0x14005d3d7
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 9]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005d3d2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14005d3d2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140061af0
test rdi, rdi
je 0x14005d3f4
lfence
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop
mov rdx, qword [rbp - 0x31]
cmp rdx, 0x10
jb 0x14005d432
inc rdx
mov rcx, qword [rbp - 0x49]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005d42d
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14005d42d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140061af0
mov eax, ebx
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.140061ad0
mov rbx, qword [rsp + 0xe0]
add rsp, 0xa0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret