Function at 0x18000652c
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x78
mov ebx, dword [rcx + 0x18]
mov eax, 0x8004
mov rdi, rcx
xor r13d, r13d
cmp ebx, 0x8009
cmove ebx, eax
mov ecx, ebx
mov dword [rbp - 0x24], ebx
call fcn.180003e68
mov ecx, dword [rdi + 0x1c]
mov r12d, eax
call fcn.180003f8c
mov ecx, dword [rdi + 0x1c]
mov esi, eax
call fcn.180003ef8
lea ecx, [r13 + 0x40]
lea r14d, [rax + rsi]
mov edx, r14d
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r15, rax
test rax, rax
je 0x1800067ce
mov r8d, dword [rbp + 0x58]
mov rdx, qword [rbp + 0x50]
mov dword [rsp + 0x40], 1
mov dword [rsp + 0x38], r14d
mov qword [rsp + 0x30], rax
mov eax, dword [rdi + 0x14]
mov dword [rsp + 0x28], eax
lea r9, [rdi + 4]
mov ecx, ebx
mov dword [rsp + 0x20], reloc.WLDAP32.dll_Ordinal_16
call fcn.1800034e8
test eax, eax
je 0x1800067c5
mov ecx, dword [rdi + 0x1c]
lea rax, [rbp - 0x18]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x20]
mov r8d, esi
mov rdx, r15
mov qword [rsp + 0x20], rax
call fcn.180003bb0
test eax, eax
je 0x1800067b1
mov rcx, qword [rbp - 0x20]
lea r8, [r15 + rsi]
lea edx, [r13 + 1]
xor r9d, r9d
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x18000678b
mov eax, dword [rdi + 0x28]
lea ecx, [r13 + 0x40]
mov edx, eax
mov dword [rbp + 0x48], eax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, rax
test rax, rax
je 0x18000678b
mov r8d, dword [rbp + 0x48]
mov rdx, qword [rdi + 0x20]
mov rcx, rax
call fcn.180076230
mov rcx, qword [rbp - 0x20]
lea r11, [rbp + 0x48]
mov qword [rsp + 0x28], r11
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x180006782
mov rsi, qword [rbp + 0x68]
xor eax, eax
cmp dword [rdi + 0x1c], 0x6603
lea ecx, [rax + 4]
lea edi, [r13 + 0x40]
mov edx, r12d
cmove eax, ecx
mov ecx, dword [rbp + 0x48]
mov r14d, r12d
sub ecx, eax
sub ecx, r12d
sub ecx, 0x10
mov dword [rsi], ecx
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r12, rax
test rax, rax
je 0x180006782
mov r8d, dword [rbp + 0x58]
mov rdx, qword [rbp + 0x50]
mov ecx, dword [rbp - 0x24]
mov eax, r14d
mov r9, rbx
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], reloc.WLDAP32.dll_Ordinal_16
call fcn.18000335c
test eax, eax
je 0x180006779
mov edx, r14d
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x180006779
mov eax, dword [rsi]
mov r9d, dword [rbp + 0x48]
mov ecx, r14d
mov dword [rsp + 0x30], ecx
mov r8d, ecx
mov ecx, dword [rbp - 0x24]
sub r9, rax
mov rdx, r12
mov qword [rsp + 0x28], rdi
add r9, rbx
mov dword [rsp + 0x20], eax
call fcn.18000335c
test eax, eax
je 0x180006770
lea rdx, [rbx + 0x10]
mov r8d, r14d
mov rcx, rdi
call fcn.180083860
test eax, eax
sete r13b
test r13d, r13d
je 0x180006770
mov edx, dword [rsi]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rcx, qword [rbp + 0x60]
mov qword [rcx], rax
test rax, rax
je 0x180006770
mov r8d, dword [rsi]
mov edx, dword [rbp + 0x48]
mov rcx, rax
sub rdx, r8
add rdx, rbx
call fcn.180076230
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rbp - 0x20]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rbp - 0x18]
call fcn.180003214
test eax, eax
jne 0x1800067c5
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_dpapi_unprotect_masterkey_with_shaDerivedkey___kull_m_crypto_close_hprov_delete_container__0x_08x__n
jmp 0x1800067be
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_dpapi_unprotect_masterkey_with_shaDerivedkey___kull_m_crypto_hkey_session__0x_08x__n
mov edx, eax
call fcn.180008f6c
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, r13d
add rsp, 0x78
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret