Function at 0x180006838
Capabilities:
Encrypt data using des via winapi
Encrypt or decrypt via wincrypt

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rsi
mov qword [r11 + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov rbx, qword [rbp + 0x60]
lea rax, [rbp - 0x30]
mov r15, r9
mov qword [r11 - 0x70], rax
mov rsi, rcx
xor r12d, r12d
and dword [r11 - 0x78], r12d
xor r9d, r9d
mov rcx, qword [rbx]
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x180006b0b
mov eax, dword [rsi + 4]
lea r14d, [r12 + 0x40]
mov edx, eax
mov dword [rbp - 0x40], eax
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x180006b01
mov r8d, dword [rbp - 0x40]
mov rcx, rax
mov rdx, qword [rsi + 0x1c]
call fcn.180071560
mov rcx, qword [rbp - 0x30]
lea rax, [rbp - 0x40]
mov qword [rsp + 0x28], rax
lea r13d, [r12 + 1]
xor r9d, r9d
mov qword [rsp + 0x20], rdi
mov r8d, r13d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x180006ae4
mov edx, dword [rdi]
lea rax, [rbp - 0x28]
mov qword [rsp + 0x28], rax
lea r8d, [r12 + 0x18]
add rdx, 8
lea rax, [rbp - 0x38]
add rdx, rdi
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov ecx, 0x6603
call fcn.180003bdc
test eax, eax
je 0x180006af8
mov r8d, dword [rdi]
xor r9d, r9d
mov rcx, qword [rbp - 0x38]
add r8, 0x20
add r8, rdi
mov edx, r13d
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x180006ace
mov eax, dword [rsi + 8]
mov ecx, r14d
mov edx, eax
mov dword [rbp - 0x40], eax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, rax
test rax, rax
je 0x180006aa4
mov r8d, dword [rbp - 0x40]
mov rcx, rax
mov rdx, qword [rsi + 0x24]
call fcn.180071560
mov rcx, qword [rbp - 0x38]
lea rax, [rbp - 0x40]
mov qword [rsp + 0x28], rax
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rbx
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x180006a87
mov r8d, dword [rbp - 0x40]
lea r9, [rbp - 0x20]
mov r13d, dword [rbx + 4]
add r8d, 0xffffffec
mov rdx, rbx
mov dword [rsp + 0x20], Ordinal_27
mov ecx, 0x8004
call fcn.180002e9c
test eax, eax
je 0x180006a9b
mov ecx, dword [rbp - 0x40]
mov rax, qword [rcx + rbx - 0x14]
cmp rax, qword [rbp - 0x20]
jne 0x180006a9b
mov rax, qword [rcx + rbx - 0xc]
cmp rax, qword [rbp - 0x18]
jne 0x180006a9b
mov eax, dword [rcx + rbx - 4]
cmp eax, dword [rbp - 0x10]
jne 0x180006a9b
mov edx, dword [rdi]
lea ecx, [r12 + 0x40]
mov r14, qword [rbp + 0x50]
mov dword [r14], edx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [r15], rax
test rax, rax
je 0x180006a9b
mov r8d, dword [r14]
lea rdx, [rdi + 8]
mov rcx, rax
call fcn.180071560
mov rsi, qword [rbp + 0x58]
lea rcx, [rbx + 8]
add rcx, r13
and qword [rsi], r12
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov edx, eax
lea ecx, [r12 + 0x40]
mov dword [rbp - 0x40], eax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsi], rax
test rax, rax
je 0x180006a5f
mov ecx, dword [rbp - 0x40]
lea r8, [rbx + 8]
add r8, r13
mov rdx, rax
call qword [sym.imp.ADVAPI32.dll_CopySid]
mov r12d, eax
test eax, eax
jne 0x180006a9b
mov rcx, qword [r15]
test rcx, rcx
je 0x180006a70
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [r15], rax
mov rcx, qword [rsi]
test rcx, rcx
je 0x180006a81
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [rsi], rax
and dword [r14], 0
jmp 0x180006a9b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_dpapi_unprotect_domainkey_with_key___CryptDecrypt__0x_08x__n
call fcn.1800090bc
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rbx, qword [rbp + 0x60]
mov rcx, qword [rbp - 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rbp - 0x28]
call fcn.180003248
test eax, eax
jne 0x180006af8
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_dpapi_unprotect_domainkey_with_key___kull_m_crypto_close_hprov_delete_container__0x_08x__n
jmp 0x180006af1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_dpapi_unprotect_domainkey_with_key___CryptSetKeyParam__0x_08x__n
call fcn.1800090bc
jmp 0x180006aa8
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_dpapi_unprotect_domainkey_with_key___CryptDecrypt__0x_08x__n
mov edx, eax
call fcn.1800090bc
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rbx]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea r11, [rsp + 0x70]
mov eax, r12d
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret