Function at 0x14005d270
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 0x14005d502
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 0x14005d33d
lfence
mov r9d, esi
mov r8, r14
mov edx, esi
mov rcx, rax
call fcn.14001a000
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 0x14005d31e
mov ebx, r13d
jmp 0x14005d349
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
jle 0x14005d333
movzx ebx, ax
or ebx, 0x80070000
test ebx, ebx
js 0x14005d502
jmp 0x14005d349
test ebx, ebx
js 0x14005d502
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 0x14005d370
mov rdx, rdi
lea rcx, [rbp - 0x49]
call fcn.140007f70
nop
mov r9d, esi
xor r8d, r8d
lea rdx, [rbp - 0x29]
lea rcx, [rbp - 0x49]
call fcn.1400186b0
mov rsi, rax
lea rax, [rbp - 0x49]
cmp rax, rsi
je 0x14005d40a
mov rdx, qword [rbp - 0x31]
cmp rdx, 0x10
jb 0x14005d3dc
inc rdx
mov rcx, qword [rbp - 0x49]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005d3d7
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14005d43c
call fcn.140061bc0
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 0x14005d448
inc rdx
mov rcx, qword [rbp - 0x29]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005d443
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14005d443
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140061bc0
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.1400090d0
mov rdx, qword [rbp + 0xf]
cmp rdx, 8
jb 0x14005d4a7
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 9]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005d4a2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14005d4a2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140061bc0
test rdi, rdi
je 0x14005d4c4
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 0x14005d502
inc rdx
mov rcx, qword [rbp - 0x49]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005d4fd
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14005d4fd
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140061bc0
mov eax, ebx
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.140061ba0
mov rbx, qword [rsp + 0xe0]
add rsp, 0xa0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret