Function at 0x140064980
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 8], rcx
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x90
mov r12, rdx
mov r13, rcx
mov dword [rsp + 0xd8], 0x80004005
xor ebx, ebx
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x48], rbx
mov eax, dword [rdx]
inc eax
mov esi, eax
mov ecx, eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
mov r8d, esi
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
mov r14d, dword [r12]
mov r15, qword [r12 + 8]
test r14, r14
je 0x140064a25
test rdi, rdi
jne 0x140064a05
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x16
jmp 0x140064b62
test r15, r15
je 0x140064b31
cmp rsi, r14
jb 0x140064b31
mov r8, r14
mov rdx, r15
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rsp + 0xe8]
mov rax, qword [rax + 8]
mov qword [rsp + 0x30], rax
mov rcx, qword [rsp + 0xe0]
mov eax, dword [rcx]
mov dword [rsp + 0x28], eax
mov rax, qword [rcx + 8]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x48]
lea r8, [rsp + 0x50]
lea rdx, [rsp + 0x58]
mov rcx, r13
call sym.DiagsCap.exe_private:_void___cdecl_Hp::Bridge::Server::Services::Registration::CryptographyHelper::CreateTripleDESKey_unsigned_long_long_unsigned___int64_____ptr64__unsigned_long_long_unsigned___int64_____ptr64__unsigned_long_long_unsigned___int64_____ptr64__unsigned_char____ptr64__unsigned_long_int__unsigned_char____ptr64____ptr64
mov eax, dword [r12]
mov dword [rsp + 0x40], eax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
xor r9d, r9d
xor edx, edx
lea r8d, [r9 + 1]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x140064afc
mov rcx, qword [rsp + 0xf0]
mov eax, dword [rsp + 0x40]
mov dword [rcx], eax
mov qword [rcx + 8], rdi
mov dword [rsp + 0xd8], ebx
jmp 0x140064ab5
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140064ac5
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140064ad5
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x140064ae7
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, ebx
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop
test eax, eax
jle 0x140064b0f
movzx eax, ax
or eax, 0x80070000
mov dword [rsp + 0xd8], eax
lea rcx, [rsp + 0x78]
call fcn.140063960
lea rdx, [0x1400c93e8]
lea rcx, [rsp + 0x78]
call sub.VCRUNTIME140.dll__CxxThrowException
mov r8, rsi
xor edx, edx
mov rcx, rdi
call sub.VCRUNTIME140.dll_memset
test r15, r15
jne 0x140064b51
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x16
jmp 0x140064b62
cmp rsi, r14
jae 0x140064b68
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x22
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x140064b7a
movzx eax, ax
or eax, 0x80070000
mov dword [rsp + 0xd8], eax
lea rcx, [rsp + 0x60]
call fcn.140063960
lea rdx, [0x1400c93e8]
lea rcx, [rsp + 0x60]
call sub.VCRUNTIME140.dll__CxxThrowException
int3