Function at 0x180008f80
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 0x180009004
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x180008ffe
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 0x180009004
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp qword [rbp - 0x10], r15
jne 0x180009017
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor bl, bl
jmp 0x18000916e
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 0x180009065
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1800090e6
cmp qword [rbp - 0x10], r15
jne 0x1800090bb
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 0x1800090bb
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x1800090b5
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 0x1800090bb
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 0x1800090dc
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 0x180009153
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
je 0x180009153
mov rax, qword [rbp + 0x40]
mov ecx, dword [rbp - 0x30]
mov qword [rax], rcx
lea eax, [rcx - 1]
movsxd r8, eax
test eax, eax
jle 0x18000914f
mov rdx, rbx
nop
movzx eax, byte [r8 + rbx]
movzx ecx, byte [rdx]
mov byte [rdx], al
inc rdx
mov rax, rdx
mov byte [r8 + rbx], cl
sub rax, rbx
dec r8
cmp rax, r8
jl 0x180009130
mov bl, 1
jmp 0x18000915b
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor bl, bl
mov rcx, qword [rbp - 0x28]
test rcx, rcx
je 0x18000916e
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov qword [rbp - 0x28], r15
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x18000917f
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