Function at 0x180008af0
Capabilities:
Create new key via cryptacquirecontext
Encrypt or decrypt via wincrypt
Import public key

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
xor r15d, r15d
mov qword [rbp - 0x18], 1
mov rsi, r9
mov qword [rbp - 0x10], r15
mov r14, r8
mov dword [rsp + 0x20], r15d
mov rbx, rdx
mov rdi, rcx
lea r9d, [r15 + 1]
xor r8d, r8d
xor edx, edx
lea rcx, [rbp - 0x10]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x180008b74
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x180008b6e
mov r9d, dword [rbp - 0x18]
lea rcx, [rbp - 0x10]
xor r8d, r8d
mov dword [rsp + 0x20], 8
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x180008b74
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp qword [rbp - 0x10], r15
jne 0x180008b87
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor bl, bl
jmp 0x180008ce3
mov r9d, dword [rdi + 8]
lea rax, [rbp - 0x2c]
mov r8, qword [rdi]
mov edx, 8
mov qword [rsp + 0x38], rax
lea rax, [rbp - 0x20]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], r15
lea ecx, [rdx - 7]
mov dword [rsp + 0x20], 0x8000
mov qword [rbp - 0x28], r15
mov dword [rbp - 0x2c], 0x30
call qword [sym.imp.CRYPT32.dll_CryptDecodeObjectEx]
test eax, eax
jne 0x180008bd5
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x180008c56
cmp qword [rbp - 0x10], r15
jne 0x180008c2b
mov eax, dword [rbp - 0x14]
lea rcx, [rbp - 0x10]
mov r9d, dword [rbp - 0x18]
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], eax
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x180008c2b
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x180008c25
mov r9d, dword [rbp - 0x18]
lea rcx, [rbp - 0x10]
xor r8d, r8d
mov dword [rsp + 0x20], 8
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x180008c2b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, qword [rbp - 0x20]
lea r9, [rbp - 0x28]
mov rcx, qword [rbp - 0x10]
mov edx, 1
call qword [sym.imp.CRYPT32.dll_CryptImportPublicKeyInfo]
test eax, eax
jne 0x180008c4c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rbp - 0x28]
test rcx, rcx
je 0x180008c88
xor r9d, r9d
mov dword [rsp + 0x30], r14d
lea rax, [rbp - 0x30]
mov dword [rbp - 0x30], esi
mov qword [rsp + 0x28], rax
xor edx, edx
mov qword [rsp + 0x20], rbx
lea r8d, [r9 + 1]
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x180008c92
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor bl, bl
jmp 0x180008cd0
mov eax, dword [rbp - 0x30]
mov rcx, qword [rbp + 0x40]
mov qword [rcx], rax
dec eax
movsxd r8, eax
test eax, eax
jle 0x180008cce
mov r9, rbx
mov rdx, rbx
neg r9
nop
movzx eax, byte [r8 + rbx]
movzx ecx, byte [rdx]
mov byte [rdx], al
lea rdx, [rdx + 1]
mov byte [r8 + rbx], cl
lea rax, [r9 + rdx]
dec r8
cmp rax, r8
jl 0x180008cb0
mov bl, 1
mov rcx, qword [rbp - 0x28]
test rcx, rcx
je 0x180008ce3
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov qword [rbp - 0x28], r15
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x180008cf4
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea r11, [rsp + 0x70]
movzx eax, bl
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rbp
ret