Function at 0x5bf0b0
Capabilities:
Create new key via cryptacquirecontext
Encrypt or decrypt via wincrypt

Disassembly:
push rbp
sub rsp, 0xa0
mov rbp, rsp
mov qword [rbp + 0x38], rbp
mov qword [rbp + 0xb0], rcx
mov qword [rbp + 0xb8], rdx
mov byte [rbp + 0x67], 0
mov rcx, qword [rbp + 0xb8]
mov rax, qword [rbp + 0xb8]
mov rax, qword [rax]
call qword [rax]
test rax, rax
jne 0x5bf0f2
mov byte [rbp + 0x67], 1
jmp 0x5bf489
nop
lea rcx, [rbp + 0x68]
xor edx, edx
xor r8, r8
mov r9d, 1
mov dword [rsp + 0x20], 0xf0000000
call sub.advapi32.dll_CryptAcquireContextA
test eax, eax
je 0x5bf489
nop
mov rcx, qword [rbp + 0xb0]
mov rax, qword [rbp + 0xb0]
mov rax, qword [rax]
call qword [rax]
mov rcx, qword [rbp + 0x68]
mov rdx, qword [rbp + 0xb0]
mov rdx, qword [rdx + 8]
mov r8d, eax
xor r9, r9
mov dword [rsp + 0x20], 0
lea rax, [rbp + 0x70]
mov qword [rsp + 0x28], rax
call sub.advapi32.dll_CryptImportKey
test eax, eax
je 0x5bf473
nop
lea rcx, [rbp + 0x78]
xor edx, edx
xor r8, r8
mov r9d, 0x18
mov dword [rsp + 0x20], 0xf0000000
call sub.advapi32.dll_CryptAcquireContextA
test eax, eax
je 0x5bf469
nop
mov rcx, qword [rbp + 0xb8]
mov rax, qword [rbp + 0xb8]
mov rax, qword [rax]
call qword [rax]
lea rax, [rax - 0x80]
mov qword [rbp + 0x48], rax
mov rcx, qword [rbp + 0xb8]
mov rdx, qword [rbp + 0x48]
xor r8, r8
mov rax, qword [rbp + 0xb8]
mov rax, qword [rax]
call qword [rax + 0x50]
mov ecx, pe_nt_image_headers64
call fcn.00409050
mov qword [rbp + 0x80], rax
nop
mov rcx, qword [rbp + 0xb8]
mov rdx, qword [rbp + 0x80]
mov r8d, 0x80
call fcn.004fb150
mov rcx, qword [rbp + 0xb8]
mov rax, qword [rbp + 0xb8]
mov rax, qword [rax]
call qword [rax]
lea rax, [rax - 0x84]
mov qword [rbp + 0x40], rax
mov rcx, qword [rbp + 0xb8]
mov rdx, qword [rbp + 0x40]
xor r8, r8
mov rax, qword [rbp + 0xb8]
mov rax, qword [rax]
call qword [rax + 0x50]
mov rcx, qword [rbp + 0xb8]
lea rdx, [rbp + 0x54]
mov r8d, 4
call fcn.004fb150
mov dword [rbp + 0x60], 0x80
mov rcx, qword [rbp + 0x70]
xor edx, edx
or r8d, 0xffffffff
xor r9, r9
mov rax, qword [rbp + 0x80]
mov qword [rsp + 0x20], rax
lea rax, [rbp + 0x60]
mov qword [rsp + 0x28], rax
call sub.advapi32.dll_CryptDecrypt
test eax, eax
je 0x5bf450
mov rcx, qword [rbp + 0x78]
mov rdx, qword [rbp + 0x80]
mov r8d, dword [rbp + 0x60]
xor r9, r9
mov dword [rsp + 0x20], 0
lea rax, [rbp + 0x88]
mov qword [rsp + 0x28], rax
call sub.advapi32.dll_CryptImportKey
test eax, eax
je 0x5bf450
nop
mov ecx, dword [rbp + 0x54]
add ecx, 0x100000
movsxd rcx, ecx
call fcn.00409050
mov qword [rbp + 0x90], rax
nop
mov rcx, qword [0x004d26a8]
mov dl, 1
call fcn.0040b3a0
mov qword [rbp + 0x98], rax
nop
mov rcx, qword [rbp + 0xb8]
mov rax, qword [rbp + 0xb8]
mov rax, qword [rax]
call qword [rax]
lea rax, [rax - 0x84]
mov qword [rbp + 0x58], rax
mov rcx, qword [rbp + 0xb8]
xor edx, edx
xor r8, r8
mov rax, qword [rbp + 0xb8]
mov rax, qword [rax]
call qword [rax + 0x48]
jmp 0x5bf38f
cmp qword [rbp + 0x58], 0x100000
jle 0x5bf326
mov eax, dword [rbp + 0x54]
add eax, 0x100000
mov dword [rbp + 0x60], eax
jmp 0x5bf32c
mov eax, dword [rbp + 0x58]
mov dword [rbp + 0x60], eax
mov eax, dword [rbp + 0x60]
sub qword [rbp + 0x58], rax
mov rcx, qword [rbp + 0xb8]
mov rdx, qword [rbp + 0x90]
mov r8d, dword [rbp + 0x60]
call fcn.004fb150
mov rcx, qword [rbp + 0x88]
xor edx, edx
or r8d, 0xffffffff
xor r9, r9
mov rax, qword [rbp + 0x90]
mov qword [rsp + 0x20], rax
lea rax, [rbp + 0x60]
mov qword [rsp + 0x28], rax
call sub.advapi32.dll_CryptDecrypt
test eax, eax
je 0x5bf39a
mov rcx, qword [rbp + 0x98]
mov rdx, qword [rbp + 0x90]
mov r8d, dword [rbp + 0x60]
call fcn.004fc3c0
cmp qword [rbp + 0x58], 0
jg 0x5bf30e
nop
cmp qword [rbp + 0x58], 0
jne 0x5bf429
mov rcx, qword [rbp + 0x98]
xor edx, edx
xor r8, r8
mov rax, qword [rbp + 0x98]
mov rax, qword [rax]
call qword [rax + 0x48]
mov rcx, qword [rbp + 0xb8]
call fcn.004fd8b0
mov rcx, qword [rbp + 0x98]
mov rax, qword [rbp + 0x98]
mov rax, qword [rax]
call qword [rax]
test rax, rax
jle 0x5bf40c
mov rcx, qword [rbp + 0x98]
mov rax, qword [rbp + 0x98]
mov rax, qword [rax]
call qword [rax]
mov rcx, qword [rbp + 0xb8]
mov rdx, qword [rbp + 0x98]
mov r8, rax
call fcn.004fc580
mov rcx, qword [rbp + 0xb8]
xor edx, edx
xor r8, r8
mov rax, qword [rbp + 0xb8]
mov rax, qword [rax]
call qword [rax + 0x48]
mov byte [rbp + 0x67], 1
nop
mov rcx, qword [rbp + 0x98]
call fcn.0040b460
nop
mov rcx, qword [rbp + 0x90]
call fcn.00409080
nop
mov rcx, qword [rbp + 0x88]
call sub.advapi32.dll_CryptDestroyKey
nop
mov rcx, qword [rbp + 0x80]
call fcn.00409080
nop
mov rcx, qword [rbp + 0x78]
xor edx, edx
call sub.advapi32.dll_CryptReleaseContext
nop
mov rcx, qword [rbp + 0x70]
call sub.advapi32.dll_CryptDestroyKey
nop
mov rcx, qword [rbp + 0x68]
xor edx, edx
call sub.advapi32.dll_CryptReleaseContext
jmp 0x5bf489
movzx rax, byte [rbp + 0x67]
lea rsp, [rbp + 0xa0]
pop rbp
ret