Function at 0x5b5980
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 0x5b59c2
mov byte [rbp + 0x77], 1
jmp 0x5b5dcb
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 0x5b5dcb
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 0x5b5db5
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 0x5b5da8
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 0x5b5d99
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 0x5b5d8c
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 0x5b5d7f
mov rcx, qword [0x004d2908]
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 0x5b5c2f
cmp qword [rbp + 0x60], 0x100000
jle 0x5b5b77
mov dword [rbp + 0x6c], 0x100000
jmp 0x5b5b7d
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.004fb3b0
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 0x5b5c3a
cmp dword [rbp + 0x5c], 0
jne 0x5b5be3
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 0x5b5c3a
mov rcx, qword [rbp + 0xa0]
mov rdx, qword [rbp + 0xa8]
mov r8d, dword [rbp + 0x6c]
call fcn.004fc620
cmp qword [rbp + 0x60], 0
jg 0x5b5b64
nop
cmp qword [rbp + 0x60], 0
jne 0x5b5d65
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 0x5b5ce2
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 0x5b5ce2
mov rcx, qword [rbp + 0xa0]
lea rdx, [rbp + 0x5c]
mov r8d, 4
call fcn.004fc620
mov rcx, qword [rbp + 0xa0]
mov rdx, qword [rbp + 0x98]
mov r8d, dword [rbp + 0x6c]
call fcn.004fc620
mov rcx, qword [rbp + 0xc8]
call fcn.004fdb10
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 0x5b5d48
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.004fc7e0
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 0x5b5dcb
movzx rax, byte [rbp + 0x77]
lea rsp, [rbp + 0xb0]
pop rbp
ret