Function at 0x14001ca90
Capabilities:
Decode data using base64 via winapi
Encrypt or decrypt data via bcrypt

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x350]
sub rsp, 0x450
mov rax, qword [0x140162010]
xor rax, rsp
mov qword [rbp + 0x340], rax
mov rdi, r8
mov r15, rdx
mov r14, rcx
xor r12d, r12d
mov dword [rbp + 0x210], r12d
mov rcx, r8
cmp qword [r8 + 0x18], 0x10
jb 0x14001cadb
mov rcx, qword [r8]
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], r12
lea rax, [rbp + 0x210]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, dword [rdi + 0x10]
call qword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
test eax, eax
je 0x14001d1b4
mov eax, dword [rbp + 0x210]
test eax, eax
je 0x14001d1d5
xorps xmm0, xmm0
mov esi, eax
movdqu xmmword [rbp + 0x258], xmm0
mov qword [rbp + 0x268], r12
test eax, eax
je 0x14001cb96
cmp rax, 0x1000
jb 0x14001cb65
lea rcx, [rax + 0x27]
cmp rcx, rax
jbe 0x14001d1f6
lfence
call fcn.1400adcb8
mov rcx, rax
test rax, rax
je 0x14001d1ae
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
jmp 0x14001cb70
lfence
mov rcx, rsi
call fcn.1400adcb8
mov qword [rbp + 0x258], rax
lea rbx, [rax + rsi]
mov qword [rbp + 0x268], rbx
mov r8, rsi
xor edx, edx
mov rcx, rax
call fcn.1400d41f0
mov qword [rbp + 0x260], rbx
mov edx, dword [rdi + 0x10]
cmp qword [rdi + 0x18], 0x10
jb 0x14001cba3
mov rdi, qword [rdi]
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], r12
lea rax, [rbp + 0x210]
mov qword [rsp + 0x20], rax
mov r9, qword [rbp + 0x258]
xor r8d, r8d
mov rcx, rdi
call qword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
mov dword [rbp + 0x218], r12d
lea rax, [rbp + 0x218]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], 1
mov r9d, dword [rbp + 0x210]
mov r8, qword [rbp + 0x258]
mov edx, 8
lea ecx, [rdx - 7]
call qword [sym.imp.CRYPT32.dll_CryptDecodeObjectEx]
cmp eax, 1
je 0x14001cc23
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x14001d1fc
xorps xmm0, xmm0
mov edi, dword [rbp + 0x218]
movdqu xmmword [rbp + 0x228], xmm0
mov qword [rbp + 0x238], r12
test rdi, rdi
je 0x14001cca9
cmp rdi, 0x1000
jb 0x14001cc78
lea rcx, [rdi + 0x27]
cmp rcx, rdi
jbe 0x14001d217
lfence
call fcn.1400adcb8
mov rcx, rax
test rax, rax
je 0x14001d334
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
jmp 0x14001cc83
lfence
mov rcx, rdi
call fcn.1400adcb8
mov qword [rbp + 0x228], rax
lea rbx, [rax + rdi]
mov qword [rbp + 0x238], rbx
mov r8, rdi
xor edx, edx
mov rcx, rax
call fcn.1400d41f0
mov qword [rbp + 0x230], rbx
lea rax, [rbp + 0x218]
mov qword [rsp + 0x38], rax
mov rax, qword [rbp + 0x228]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], 1
mov r9d, dword [rbp + 0x210]
mov r8, qword [rbp + 0x258]
mov edx, 8
lea ecx, [rdx - 7]
call qword [sym.imp.CRYPT32.dll_CryptDecodeObjectEx]
cmp eax, 1
jne 0x14001d21d
mov qword [rbp + 0x220], r12
lea rax, [rbp + 0x220]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rbp + 0x228]
lea ecx, [r9 + 1]
call qword [sym.imp.CRYPT32.dll_CryptImportPublicKeyInfoEx2]
cmp eax, 1
jne 0x14001d238
mov dword [rbp + 0x214], r12d
mov dword [rsp + 0x28], r12d
lea rax, [rbp + 0x288]
mov qword [rsp + 0x20], rax
mov r9d, 4
lea r8, [rbp + 0x214]
lea rdx, str.BlockLength
mov rcx, qword [rbp + 0x220]
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
test eax, eax
js 0x14001d259
mov eax, dword [rbp + 0x214]
shr eax, 3
mov dword [rbp + 0x214], eax
mov edx, eax
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp + 0x240], xmm0
mov qword [rbp + 0x250], rax
lea rcx, [rbp + 0x240]
call fcn.14001eab0
nop
mov rdi, r12
cmp dword [rbp + 0x214], r12d
jbe 0x14001ce0f
lea rsi, [r14 + 8]
nop dword [rax + rax]
movzx edx, word [r14 + 0x1392]
movzx ebx, word [r14 + 0x1390]
mov qword [rbp - 0x80], rsi
mov qword [rbp - 0x78], 0x20
mov dword [rbp - 0x70], 0xffffffff
mov ecx, edx
sub ecx, ebx
cmp ecx, 0xffff
lea rcx, [rbp - 0x80]
jne 0x14001cdea
call fcn.14001f8f0
jmp 0x14001cdf5
sub dx, bx
inc dx
call fcn.14001faf0
add bl, al
mov rax, qword [rbp + 0x240]
mov byte [rax + rdi], bl
inc rdi
mov eax, dword [rbp + 0x214]
cmp rdi, rax
jb 0x14001cdb0
mov dword [rbp + 0x21c], r12d
mov rax, qword [rbp + 0x248]
mov rcx, qword [rbp + 0x240]
sub rax, rcx
lea rbx, [r14 + 0x1398]
mov rdx, rbx
cmp qword [rbx + 0x18], 0x10
jb 0x14001ce3b
mov rdx, qword [rbx]
mov dword [rsp + 0x48], 2
lea r8, [rbp + 0x21c]
mov qword [rsp + 0x40], r8
mov dword [rsp + 0x38], r12d
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
xor r9d, r9d
mov r8d, dword [r14 + 0x13a8]
mov rcx, qword [rbp + 0x220]
call qword [sym.imp.bcrypt.dll_BCryptEncrypt]
lfence
test eax, eax
js 0x14001d29c
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp + 0x270], xmm0
mov qword [rbp + 0x280], rax
mov edx, dword [rbp + 0x21c]
lea rcx, [rbp + 0x270]
call fcn.14001eab0
nop
mov rax, qword [rbp + 0x278]
mov rdx, qword [rbp + 0x270]
sub rax, rdx
mov rcx, qword [rbp + 0x248]
mov r9, qword [rbp + 0x240]
sub rcx, r9
cmp qword [rbx + 0x18], 0x10
jb 0x14001ced6
mov rbx, qword [rbx]
mov dword [rsp + 0x48], 2
lea r8, [rbp + 0x21c]
mov qword [rsp + 0x40], r8
mov dword [rsp + 0x38], eax
mov qword [rsp + 0x30], rdx
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], r9
xor r9d, r9d
mov r8d, dword [r14 + 0x13a8]
mov rdx, rbx
mov rcx, qword [rbp + 0x220]
call qword [sym.imp.bcrypt.dll_BCryptEncrypt]
lfence
test eax, eax
js 0x14001d2df
lea rcx, [rbp + 0x290]
call fcn.140061850
nop
lea rcx, [r14 + 0x13b8]
lea r9, [rbp + 0x290]
mov r8, r15
lea rdx, [rbp + 0x130]
call fcn.140060d40
mov rbx, rax
mov rdx, qword [rbp + 0x278]
mov rcx, qword [rbp + 0x270]
sub rdx, rcx
mov qword [rsp + 0x50], rcx
mov qword [rsp + 0x58], rdx
movaps xmm0, xmmword [rsp + 0x50]
movdqa xmmword [rsp + 0x50], xmm0
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x60]
call fcn.140079a80
nop
lea rdx, [rsp + 0x60]
cmp qword [rsp + 0x78], 0x10
cmovae rdx, qword [rsp + 0x60]
mov r8, qword [rsp + 0x70]
mov rcx, rbx
call fcn.140061760
mov rcx, rax
call fcn.1400614f0
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, 0x10
jb 0x14001cfe8
inc rdx
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14001cfe3
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001d322
call fcn.1400ada10
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x78], 0xf
mov byte [rsp + 0x60], 0
lea rcx, [rbp + 0x130]
call fcn.1400614b0
nop
cmp byte [rbp + 0x320], 0
je 0x14001d01d
lea rcx, [rbp + 0x300]
call fcn.14000ba30
cmp byte [rbp + 0x2f8], 0
je 0x14001d032
lea rcx, [rbp + 0x2d8]
call fcn.14000ba30
cmp byte [rbp + 0x2d0], 0
je 0x14001d048
lea rcx, [rbp + 0x2b0]
call fcn.14000ba30
nop
mov rcx, qword [rbp + 0x270]
test rcx, rcx
je 0x14001d09a
mov rdx, qword [rbp + 0x280]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x14001d083
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001d328
call fcn.1400ada10
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x270], xmm0
mov qword [rbp + 0x280], r12
mov rcx, qword [rbp + 0x240]
test rcx, rcx
je 0x14001d0ec
mov rdx, qword [rbp + 0x250]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x14001d0d5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001d32e
call fcn.1400ada10
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x240], xmm0
mov qword [rbp + 0x250], r12
mov rcx, qword [rbp + 0x220]
test rcx, rcx
je 0x14001d0ff
call qword [sym.imp.bcrypt.dll_BCryptDestroyKey]
nop
mov rcx, qword [rbp + 0x228]
test rcx, rcx
je 0x14001d151
mov rdx, qword [rbp + 0x238]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x14001d13a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001d334
call fcn.1400ada10
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x228], xmm0
mov qword [rbp + 0x238], r12
mov rcx, qword [rbp + 0x258]
test rcx, rcx
je 0x14001d18d
mov rdx, qword [rbp + 0x268]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x14001d188
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001d1ae
call fcn.1400ada10
mov rcx, qword [rbp + 0x340]
xor rcx, rsp
call fcn.1400ad9f0
add rsp, 0x450
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
call fcn.1400e39e0
int3
lea rdx, str.Bad_certificate
lea rcx, [rbp - 0x68]
call fcn.140010540
lea rdx, [0x140160050]
lea rcx, [rbp - 0x68]
call fcn.1400d4390
int3
lea rdx, str.Bad_certificate:_0_length
lea rcx, [rbp - 0x50]
call fcn.140010540
lea rdx, [0x140160050]
lea rcx, [rbp - 0x50]
call fcn.1400d4390
int3
call fcn.1400067c0
nop
lea rdx, str.Error_calculating_public_key_length
lea rcx, [rbp + 0x28]
call fcn.14000a4a0
nop
lea rcx, [rbp + 0x28]
call fcn.140010760
nop
call fcn.1400067c0
nop
lea rdx, str.Error_decoding_public_key
lea rcx, [rbp + 0x48]
call fcn.14000a4a0
nop
lea rcx, [rbp + 0x48]
call fcn.140010760
nop
lea rdx, str.Error_loading_public_key
lea rcx, [rbp - 0x38]
call fcn.140010540
lea rdx, [0x140160050]
lea rcx, [rbp - 0x38]
call fcn.1400d4390
int3
lfence
mov edx, eax
lea rcx, [rbp + 0x68]
call fcn.14001c560
nop
mov r8, rax
lea rdx, str.Error_getting_block_size:
lea rcx, [rbp + 0x88]
call fcn.140018d70
nop
mov rdx, rax
lea rcx, [rbp - 0x20]
call fcn.1400069d0
lea rdx, [0x140160050]
lea rcx, [rbp - 0x20]
call fcn.1400d4390
nop
mov edx, eax
lea rcx, [rbp + 0xa8]
call fcn.14001c560
nop
mov r8, rax
lea rdx, str.Error_calculating_encrypted_data_size:
lea rcx, [rbp + 0xc8]
call fcn.140018d70
nop
mov rdx, rax
lea rcx, [rbp - 8]
call fcn.1400069d0
lea rdx, [0x140160050]
lea rcx, [rbp - 8]
call fcn.1400d4390
nop
mov edx, eax
lea rcx, [rbp + 0xe8]
call fcn.14001c560
nop
mov r8, rax
lea rdx, str.Error_encrypting_data:
lea rcx, [rbp + 0x108]
call fcn.140018d70
nop
mov rdx, rax
lea rcx, [rbp + 0x10]
call fcn.1400069d0
lea rdx, [0x140160050]
lea rcx, [rbp + 0x10]
call fcn.1400d4390
nop
call fcn.1400e39e0
nop
call fcn.1400e39e0
nop
call fcn.1400e39e0
nop
call fcn.1400e39e0
int3