Function at 0x180007790
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 0x180007814
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x18000780e
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 0x180007814
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp qword [rbp - 0x10], r15
jne 0x180007827
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor bl, bl
jmp 0x18000797e
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 0x180007875
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1800078f6
cmp qword [rbp - 0x10], r15
jne 0x1800078cb
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 0x1800078cb
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x1800078c5
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 0x1800078cb
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 0x1800078ec
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 0x180007963
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 0x180007963
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 0x18000795f
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 0x180007940
mov bl, 1
jmp 0x18000796b
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor bl, bl
mov rcx, qword [rbp - 0x28]
test rcx, rcx
je 0x18000797e
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov qword [rbp - 0x28], r15
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x18000798f
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