Function at 0x5bf520
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using aes via winapi
Encrypt or decrypt via wincrypt

Disassembly:
push rbp
sub rsp, 0xb0
mov rbp, rsp
mov qword [rbp + 0x48], rbp
mov qword [rbp + 0xc0], rcx
mov qword [rbp + 0xc8], rdx
mov byte [rbp + 0x77], 0
mov rcx, qword [rbp + 0xc8]
mov rax, qword [rbp + 0xc8]
mov rax, qword [rax]
call qword [rax]
test rax, rax
jne 0x5bf562
mov byte [rbp + 0x77], 1
jmp 0x5bf96b
nop
lea rcx, [rbp + 0x78]
xor edx, edx
xor r8, r8
mov r9d, 1
mov dword [rsp + 0x20], 0xf0000000
call sub.advapi32.dll_CryptAcquireContextA
test eax, eax
je 0x5bf96b
nop
mov rcx, qword [rbp + 0xc0]
mov rax, qword [rbp + 0xc0]
mov rax, qword [rax]
call qword [rax]
mov rcx, qword [rbp + 0x78]
mov rdx, qword [rbp + 0xc0]
mov rdx, qword [rdx + 8]
mov r8d, eax
xor r9, r9
mov dword [rsp + 0x20], 0
lea rax, [rbp + 0x80]
mov qword [rsp + 0x28], rax
call sub.advapi32.dll_CryptImportKey
test eax, eax
je 0x5bf955
nop
lea rcx, [rbp + 0x88]
xor edx, edx
xor r8, r8
mov r9d, 0x18
mov dword [rsp + 0x20], 0xf0000000
call sub.advapi32.dll_CryptAcquireContextA
test eax, eax
je 0x5bf948
nop
mov rcx, qword [rbp + 0x88]
mov edx, 0x6610
mov r8d, 1
lea r9, [rbp + 0x90]
call sub.advapi32.dll_CryptGenKey
test eax, eax
je 0x5bf939
nop
mov rcx, qword [rbp + 0x90]
xor edx, edx
mov r8d, 8
xor r9, r9
mov qword [rsp + 0x20], 0
lea rax, [rbp + 0x70]
mov qword [rsp + 0x28], rax
call sub.advapi32.dll_CryptExportKey
test eax, eax
je 0x5bf92c
mov ecx, pe_nt_image_headers64
call fcn.00409050
mov qword [rbp + 0x98], rax
nop
mov rcx, qword [rbp + 0x90]
xor edx, edx
mov r8d, 8
xor r9, r9
mov rax, qword [rbp + 0x98]
mov qword [rsp + 0x20], rax
lea rax, [rbp + 0x70]
mov qword [rsp + 0x28], rax
call sub.advapi32.dll_CryptExportKey
test eax, eax
je 0x5bf91f
mov rcx, qword [0x004d26d8]
mov dl, 1
call fcn.0040b3a0
mov qword [rbp + 0xa0], rax
nop
mov rcx, qword [rbp + 0xc8]
mov rax, qword [rbp + 0xc8]
mov rax, qword [rax]
call qword [rax]
mov qword [rbp + 0x60], rax
mov rcx, qword [rbp + 0xc8]
xor edx, edx
xor r8, r8
mov rax, qword [rbp + 0xc8]
mov rax, qword [rax]
call qword [rax + 0x48]
mov ecx, 0x100080
call fcn.00409050
mov qword [rbp + 0xa8], rax
nop
mov dword [rbp + 0x5c], 0
jmp 0x5bf7cf
cmp qword [rbp + 0x60], 0x100000
jle 0x5bf717
mov dword [rbp + 0x6c], 0x100000
jmp 0x5bf71d
mov eax, dword [rbp + 0x60]
mov dword [rbp + 0x6c], eax
mov rcx, qword [rbp + 0xc8]
mov rdx, qword [rbp + 0xa8]
mov r8d, dword [rbp + 0x6c]
call fcn.004fb180
mov eax, dword [rbp + 0x6c]
mov dword [rbp + 0x68], eax
mov eax, dword [rbp + 0x68]
sub qword [rbp + 0x60], rax
mov rcx, qword [rbp + 0x90]
xor edx, edx
or r8d, 0xffffffff
xor r9, r9
mov qword [rsp + 0x20], 0
lea rax, [rbp + 0x6c]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x30], 0
call sub.advapi32.dll_CryptEncrypt
test eax, eax
je 0x5bf7da
cmp dword [rbp + 0x5c], 0
jne 0x5bf783
mov eax, dword [rbp + 0x6c]
sub eax, dword [rbp + 0x68]
mov dword [rbp + 0x5c], eax
mov rcx, qword [rbp + 0x90]
xor edx, edx
or r8d, 0xffffffff
xor r9, r9
mov rax, qword [rbp + 0xa8]
mov qword [rsp + 0x20], rax
lea rax, [rbp + 0x68]
mov qword [rsp + 0x28], rax
mov eax, dword [rbp + 0x6c]
mov dword [rsp + 0x30], eax
call sub.advapi32.dll_CryptEncrypt
test eax, eax
je 0x5bf7da
mov rcx, qword [rbp + 0xa0]
mov rdx, qword [rbp + 0xa8]
mov r8d, dword [rbp + 0x6c]
call fcn.004fc3f0
cmp qword [rbp + 0x60], 0
jg 0x5bf704
nop
cmp qword [rbp + 0x60], 0
jne 0x5bf905
mov eax, dword [rbp + 0x70]
mov dword [rbp + 0x6c], eax
mov rcx, qword [rbp + 0x80]
xor edx, edx
or r8d, 0xffffffff
xor r9, r9
mov qword [rsp + 0x20], 0
lea rax, [rbp + 0x6c]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x30], 0
call sub.advapi32.dll_CryptEncrypt
test eax, eax
je 0x5bf882
mov rcx, qword [rbp + 0x80]
xor edx, edx
or r8d, 0xffffffff
xor r9, r9
mov rax, qword [rbp + 0x98]
mov qword [rsp + 0x20], rax
lea rax, [rbp + 0x70]
mov qword [rsp + 0x28], rax
mov eax, dword [rbp + 0x6c]
mov dword [rsp + 0x30], eax
call sub.advapi32.dll_CryptEncrypt
test eax, eax
je 0x5bf882
mov rcx, qword [rbp + 0xa0]
lea rdx, [rbp + 0x5c]
mov r8d, 4
call fcn.004fc3f0
mov rcx, qword [rbp + 0xa0]
mov rdx, qword [rbp + 0x98]
mov r8d, dword [rbp + 0x6c]
call fcn.004fc3f0
mov rcx, qword [rbp + 0xc8]
call fcn.004fd8e0
mov rcx, qword [rbp + 0xa0]
xor edx, edx
xor r8, r8
mov rax, qword [rbp + 0xa0]
mov rax, qword [rax]
call qword [rax + 0x48]
mov rcx, qword [rbp + 0xa0]
mov rax, qword [rbp + 0xa0]
mov rax, qword [rax]
call qword [rax]
test rax, rax
jle 0x5bf8e8
mov rcx, qword [rbp + 0xa0]
mov rax, qword [rbp + 0xa0]
mov rax, qword [rax]
call qword [rax]
mov rcx, qword [rbp + 0xc8]
mov rdx, qword [rbp + 0xa0]
mov r8, rax
call fcn.004fc5b0
mov rcx, qword [rbp + 0xc8]
xor edx, edx
xor r8, r8
mov rax, qword [rbp + 0xc8]
mov rax, qword [rax]
call qword [rax + 0x48]
mov byte [rbp + 0x77], 1
nop
mov rcx, qword [rbp + 0xa8]
call fcn.00409080
nop
mov rcx, qword [rbp + 0xa0]
call fcn.0040b460
nop
mov rcx, qword [rbp + 0x98]
call fcn.00409080
nop
mov rcx, qword [rbp + 0x90]
call sub.advapi32.dll_CryptDestroyKey
nop
mov rcx, qword [rbp + 0x88]
xor edx, edx
call sub.advapi32.dll_CryptReleaseContext
nop
mov rcx, qword [rbp + 0x80]
call sub.advapi32.dll_CryptDestroyKey
nop
mov rcx, qword [rbp + 0x78]
xor edx, edx
call sub.advapi32.dll_CryptReleaseContext
jmp 0x5bf96b
movzx rax, byte [rbp + 0x77]
lea rsp, [rbp + 0xb0]
pop rbp
ret