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

Disassembly:
mov r11, rsp
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x18], rsi
mov dword [r11 + 0x20], r9d
push rbp
push rdi
push r15
mov rbp, rsp
sub rsp, 0x60
xor ebx, ebx
xor edi, edi
and qword [rbp - 8], rbx
mov rsi, r8
and qword [rbp - 0x10], rbx
and qword [rbp - 0x18], rbx
test rcx, rcx
je 0x1800076f1
test edx, edx
je 0x1800076f1
and dword [rbp - 0x20], ebx
lea rax, [rbp - 0x20]
mov qword [r11 - 0x40], rax
lea r15d, [rbx + 1]
lea rax, [rbp - 8]
mov r9d, edx
mov qword [r11 - 0x48], rax
lea edx, [rbx + 8]
and qword [r11 - 0x50], rbx
mov r8, rcx
mov ecx, r15d
mov dword [rsp + 0x20], 0x8000
call qword [sym.imp.CRYPT32.dll_CryptDecodeObjectEx]
test eax, eax
jne 0x1800075c4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x1800076f6
mov r9d, r15d
mov dword [rsp + 0x20], 0xf0000000
lea r8, str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
xor edx, edx
lea rcx, [rbp - 0x10]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x180007608
mov r9d, r15d
mov dword [rsp + 0x20], 8
lea r8, str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
xor edx, edx
lea rcx, [rbp - 0x10]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x1800075b7
mov r8, qword [rbp - 8]
lea r9, [rbp - 0x18]
mov rcx, qword [rbp - 0x10]
mov edx, r15d
call qword [sym.imp.CRYPT32.dll_CryptImportPublicKeyInfo]
test eax, eax
je 0x1800075b7
mov eax, dword [rbp + 0x38]
xor r9d, r9d
mov rcx, qword [rbp - 0x18]
mov r8d, r15d
mov dword [rsp + 0x30], eax
xor edx, edx
mov dword [rbp + 0x20], eax
lea rax, [rbp + 0x20]
mov qword [rsp + 0x28], rax
and qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov edx, dword [rbp + 0x20]
mov rcx, r15
call fcn.180017748
mov rdi, rax
test rax, rax
jne 0x180007666
lea ebx, [rax + 0xe]
jmp 0x180007707
mov r9d, dword [rbp + 0x38]
mov r8, rsi
mov edx, dword [rbp + 0x20]
mov rcx, rdi
call fcn.180007750
mov eax, dword [rbp + 0x20]
xor r9d, r9d
mov rcx, qword [rbp - 0x18]
mov r8d, r15d
mov dword [rsp + 0x30], eax
xor edx, edx
lea rax, [rbp + 0x38]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x1800075b7
mov ecx, dword [rbp + 0x20]
xor r9d, r9d
test ecx, 0xfffffffe
jbe 0x1800076e2
mov r8b, byte [r9 + rdi]
sub ecx, r9d
sub ecx, r15d
mov cl, byte [rcx + rdi]
mov byte [r9 + rdi], cl
mov eax, dword [rbp + 0x20]
sub eax, r9d
add r9d, r15d
sub eax, r15d
mov byte [rax + rdi], r8b
mov ecx, dword [rbp + 0x20]
mov eax, ecx
shr eax, 1
cmp r9d, eax
jb 0x1800076b5
mov rax, qword [rbp + 0x40]
mov qword [rax], rdi
mov rax, qword [rbp + 0x48]
mov dword [rax], ecx
jmp 0x1800076f6
mov ebx, 0xa0
test ebx, ebx
je 0x180007707
test rdi, rdi
je 0x180007707
mov rcx, rdi
call fcn.180017738
mov rcx, qword [rbp - 8]
test rcx, rcx
je 0x180007716
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rbp - 0x18]
test rcx, rcx
je 0x180007725
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x180007736
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea r11, [rsp + 0x60]
mov eax, ebx
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop rdi
pop rbp
ret