Function at 0x18005b350
Capabilities:
Encode data using base64 via winapi
Encrypt or decrypt via wincrypt

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
lea rbp, [rsp - 0x37]
sub rsp, 0xf0
mov qword [rbp - 0x39], 0xfffffffffffffffe
mov rax, qword [0x180141088]
xor rax, rsp
mov qword [rbp + 0x2f], rax
mov rsi, r8
mov rdi, rcx
lea rcx, [rbp + 0xf]
call fcn.180033ea0
nop
lea rbx, [rbp + 0xf]
cmp qword [rbp + 0x27], 8
cmovae rbx, qword [rbp + 0xf]
or rax, 0xffffffffffffffff
nop dword [rax + rax]
inc rax
cmp word [rbx + rax*2], 0
jne 0x18005b3a0
add eax, eax
mov dword [rbp - 0x29], eax
mov dword [rbp - 0x31], eax
mov dword [rsp + 0x30], eax
lea rax, [rbp - 0x31]
mov qword [rsp + 0x28], rax
xor r14d, r14d
mov qword [rsp + 0x20], r14
xor r9d, r9d
xor edx, edx
lea r8d, [r14 + 1]
mov rcx, qword [rdi + 8]
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
xor eax, eax
mov qword [rbp - 9], rax
mov qword [rbp - 1], rax
mov qword [rbp + 7], rax
mov edx, dword [rbp - 0x31]
inc edx
lea rcx, [rbp - 9]
call fcn.18002d0d0
nop
mov r9d, dword [rbp - 0x29]
mov edx, dword [rbp - 0x31]
mov r8, rbx
mov rbx, qword [rbp - 9]
mov rcx, rbx
call fcn.1800306f0
mov eax, dword [rbp - 0x31]
mov dword [rsp + 0x30], eax
lea rax, [rbp - 0x29]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor edx, edx
lea r8d, [r14 + 1]
mov rcx, qword [rdi + 8]
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x18005b441
xor sil, sil
jmp 0x18005b58b
mov dword [rbp - 0x2d], r14d
lea rax, [rbp - 0x2d]
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea r8d, [r9 + 1]
mov edx, dword [rbp - 0x31]
mov rcx, rbx
call qword [sym.imp.CRYPT32.dll_CryptBinaryToStringW]
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x21], xmm0
mov qword [rbp - 0x11], r14
mov edx, dword [rbp - 0x2d]
lea rcx, [rbp - 0x21]
call fcn.180034470
lea rax, [rbp - 0x2d]
mov qword [rsp + 0x20], rax
mov rdi, qword [rbp - 0x21]
mov r9, rdi
mov r8d, 1
mov edx, dword [rbp - 0x31]
mov rcx, rbx
call qword [sym.imp.CRYPT32.dll_CryptBinaryToStringW]
test eax, eax
jne 0x18005b4a7
xor sil, sil
jmp 0x18005b56f
mov qword [rbp - 0x61], 7
mov qword [rbp - 0x69], r14
mov word [rbp - 0x79], r14w
mov r8, qword [rbp - 0x19]
cmp rdi, r8
je 0x18005b4d4
sub r8, rdi
sar r8, 1
mov rdx, rdi
lea rcx, [rbp - 0x79]
call fcn.180034b10
nop
lea rdx, [rbp - 0x79]
lea rcx, [rbp - 0x59]
call fcn.180033c30
mov rdx, rax
mov rcx, rsi
call fcn.18000bf30
mov rax, qword [rbp - 0x41]
cmp rax, 0x10
jb 0x18005b542
inc rax
mov rcx, qword [rbp - 0x59]
cmp rax, 0x1000
jb 0x18005b53d
test cl, 0x1f
je 0x18005b510
call fcn.1800c0d4c
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x18005b51f
call fcn.1800c0d4c
int3
sub rcx, rax
cmp rcx, 8
jae 0x18005b52e
call fcn.1800c0d4c
int3
cmp rcx, 0x27
jbe 0x18005b53a
call fcn.1800c0d4c
int3
mov rcx, rax
call fcn.1800af3bc
mov qword [rbp - 0x41], 0xf
mov qword [rbp - 0x49], r14
mov byte [rbp - 0x59], 0
mov r8, qword [rbp - 0x61]
cmp r8, 8
jb 0x18005b56c
inc r8
mov rdx, qword [rbp - 0x79]
lea rcx, [rbp - 0x79]
call fcn.180031a90
mov sil, 1
test rdi, rdi
je 0x18005b58b
mov r8, qword [rbp - 0x11]
sub r8, rdi
sar r8, 1
mov rdx, rdi
lea rcx, [rbp - 0x21]
call fcn.180031a90
nop
test rbx, rbx
je 0x18005b5e0
mov rax, qword [rbp + 7]
sub rax, rbx
cmp rax, 0x1000
jb 0x18005b5d7
test bl, 0x1f
je 0x18005b5aa
call fcn.1800c0d4c
int3
mov rax, qword [rbx - 8]
cmp rax, rbx
jb 0x18005b5b9
call fcn.1800c0d4c
int3
sub rbx, rax
cmp rbx, 8
jae 0x18005b5c8
call fcn.1800c0d4c
int3
cmp rbx, 0x27
jbe 0x18005b5d4
call fcn.1800c0d4c
int3
mov rbx, rax
mov rcx, rbx
call fcn.1800af3bc
nop
mov r8, qword [rbp + 0x27]
cmp r8, 8
jb 0x18005b5fa
inc r8
mov rdx, qword [rbp + 0xf]
lea rcx, [rbp + 0xf]
call fcn.180031a90
movzx eax, sil
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.1800ae8d0
add rsp, 0xf0
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret