Function at 0x140064750
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 r13, rdx
mov dword [rsp + 0xd8], 0x80004005
xor ebx, ebx
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x48], rbx
mov r14d, dword [rdx]
add r14d, 8
mov esi, r14d
mov ecx, r14d
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 r15d, dword [r13]
mov r12, qword [r13 + 8]
test r15, r15
je 0x1400647f6
test rdi, rdi
jne 0x1400647d6
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x16
jmp 0x14006493d
test r12, r12
je 0x14006490c
cmp rsi, r15
jb 0x14006490c
mov r8, r15
mov rdx, r12
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, qword [rsp + 0xd0]
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 [r13]
mov dword [rsp + 0x40], eax
mov dword [rsp + 0x30], r14d
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_CryptEncrypt]
test eax, eax
je 0x1400648d7
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 0x140064890
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x1400648a0
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x1400648b0
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x1400648c2
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 0x1400648ea
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 r12, r12
jne 0x14006492c
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x16
jmp 0x14006493d
cmp rsi, r15
jae 0x140064943
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 0x140064955
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