Function at 0x14000aa84
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
mov edi, dword [rcx + 0x1c]
mov eax, 0x8004
mov rbx, rcx
xor esi, esi
cmp edi, 0x8009
mov r13, rdx
cmove edi, eax
mov ecx, edi
call fcn.1400055b0
mov ecx, dword [rbx + 0x28]
call fcn.1400056d4
mov ecx, dword [rbx + 0x28]
mov r14d, eax
call fcn.140005640
lea ecx, [rsi + 0x40]
lea r15d, [rax + r14]
mov edx, r15d
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbp, rax
test rax, rax
je 0x14000aca2
mov dword [rsp + 0x40], 1
lea r12d, [rsi + 0x10]
mov dword [rsp + 0x38], r15d
lea r9, [rbx + 0x34]
mov qword [rsp + 0x30], rax
lea r15d, [rsi + 0x14]
mov eax, dword [rbx + 0x20]
mov r8d, r15d
mov dword [rsp + 0x28], eax
mov rdx, r13
mov ecx, edi
mov dword [rsp + 0x20], r12d
call fcn.140004a64
test eax, eax
je 0x14000ac99
mov ecx, dword [rbx + 0x28]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
xor r9d, r9d
lea rax, [rsp + 0xa0]
mov r8d, r14d
mov rdx, rbp
mov qword [rsp + 0x20], rax
call fcn.140005300
test eax, eax
je 0x14000ac85
mov rcx, qword [rsp + 0xa0]
lea r8, [r14 + rbp]
lea r14d, [rsi + 1]
xor r9d, r9d
mov edx, r14d
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x14000ac5a
mov edx, dword [rbx + 0x54]
lea ecx, [rsi + 0x40]
mov dword [rsp + 0xb0], edx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x14000ac5a
mov r8d, dword [rsp + 0xb0]
mov rcx, rax
mov rdx, qword [rbx + 0x4c]
call fcn.1400cac20
mov rcx, qword [rsp + 0xa0]
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x28], rax
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rdi
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x14000ac51
cmp dword [rbx + 0x2c], r15d
mov rdx, rdi
mov rcx, qword [rsp + 0xc0]
cmovb r15d, dword [rbx + 0x2c]
mov r8d, r15d
call fcn.1400cac20
cmp dword [rbx + 0x30], r12d
mov edx, dword [rbx + 0x2c]
cmovb r12d, dword [rbx + 0x30]
add rdx, rdi
mov rcx, qword [rsp + 0xb8]
mov r8d, r12d
call fcn.1400cac20
mov r9d, dword [rbx + 0x30]
mov esi, r14d
add r9d, 0xfffffff0
je 0x14000ac51
xor r8d, r8d
test r9d, r9d
je 0x14000ac51
test esi, esi
je 0x14000ac51
mov ecx, dword [rbx + 0x2c]
xor eax, eax
add rcx, rdi
cmp byte [r8 + rcx + 0x10], al
cmove eax, esi
add r8d, r14d
mov esi, eax
cmp r8d, r9d
jb 0x14000ac33
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rsp + 0x50]
call fcn.140004810
test eax, eax
jne 0x14000ac99
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_dpapi_unprotect_credhist_entry_with_shaDerivedkey___kull_m_crypto_close_hprov_delete_container__0x_08x__n
jmp 0x14000ac92
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_dpapi_unprotect_credhist_entry_with_shaDerivedkey___kull_m_crypto_hkey_session__0x_08x__n
mov edx, eax
call fcn.14000d9f0
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rbx, qword [rsp + 0xa8]
mov eax, esi
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret