Function at 0x140087388
Capabilities:
Encrypt or decrypt data via bcrypt

Disassembly:
mov rax, rsp
push rbp
push rdi
push r13
push r14
push r15
lea rbp, [rsp - 0x70]
sub rsp, 0x170
mov qword [rsp + 0x78], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov r13, r8
mov r14, rdx
mov r15, rcx
xor esi, esi
mov dword [rsp + 0x70], esi
cmp byte [rcx + 0x50], sil
je 0x140087431
call fcn.140067f0c
mov rbx, rax
test rax, rax
je 0x140087422
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + reloc.OLEAUT32.dll_VariantClear]
cmp eax, 1
jl 0x140087422
lea edx, [rsi + 2]
lea r8d, [rsi + 1]
lea rcx, [rbp - 0x80]
call fcn.14005ba84
nop
lea rdx, str.Cipher_not_properly_initialized_for_encryption._Aborting
lea rcx, [rbp - 0x80]
call fcn.14002e2d0
mov rax, qword [rbx]
lea r9, [rbp - 0x80]
mov r8, qword [str.BCryptSymmetricCipherImpl]
lea edx, [rsi + 1]
mov rcx, rbx
call qword [rax + 0x18]
nop
lea rcx, [rbp - 0x80]
call fcn.14001bb60
xor edx, edx
mov rcx, r14
call fcn.14005ca8c
jmp 0x140087609
mov rcx, r13
call fcn.140067ef8
test rax, rax
je 0x140087422
test byte [r15 + 0x68], 1
je 0x14008747d
mov rax, qword [r15]
mov rcx, r15
call qword [rax + 0x38]
mov rbx, rax
mov rcx, r13
call fcn.140067ef8
xor edx, edx
div rbx
mov rbx, rdx
mov rcx, r13
call fcn.140067ef8
mov rdi, rax
sub rdi, rbx
mov rdx, qword [r15]
mov rcx, r15
call qword [rdx + 0x38]
add rax, rdi
jmp 0x140087485
mov rcx, r13
call fcn.140067ef8
mov dword [rbp + 0xa0], eax
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.14005ca8c
nop
mov qword [rsp + 0x50], rsi
mov dword [rbp + 0xb8], esi
cmp qword [r15 + 0x88], rsi
je 0x1400874cb
lea rcx, [r15 + 0x70]
call fcn.140068510
mov qword [rsp + 0x50], rax
lea rcx, [r15 + 0x70]
call fcn.140067ef8
mov qword [rbp + 0xb8], rax
lea rcx, [rsp + 0x58]
call fcn.140067ef8
mov rsi, rax
lea rcx, [rsp + 0x58]
call fcn.140068510
mov rbx, rax
mov rcx, r13
call fcn.140067ef8
mov rdi, rax
mov rcx, r13
call fcn.140068510
mov rdx, rax
mov ecx, dword [r15 + 0x68]
mov dword [rsp + 0x48], ecx
lea rax, [rbp + 0xa0]
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x38], esi
mov qword [rsp + 0x30], rbx
mov rax, qword [rbp + 0xb8]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9, qword [r15 + 0x88]
mov r8d, edi
mov rcx, qword [r15 + 0x60]
call sub.bcrypt.dll_BCryptEncrypt
mov edi, eax
test eax, eax
jns 0x1400875c2
mov byte [r15 + 0x50], 1
call fcn.140067f0c
mov rbx, rax
test rax, rax
je 0x1400875b6
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + reloc.OLEAUT32.dll_VariantClear]
cmp eax, 2
jl 0x1400875b6
mov edx, 2
lea r8d, [rdx - 1]
lea rcx, [rbp - 0x80]
call fcn.14005ba84
nop
lea rdx, str.Failed_to_compute_encrypted_output_with_error_code
lea rcx, [rbp - 0x80]
call fcn.14002e2d0
mov rcx, rax
mov edx, edi
call fcn.14005f2a0
mov rax, qword [rbx]
lea r9, [rbp - 0x80]
mov r8, qword [str.BCryptSymmetricCipherImpl]
mov edx, 2
mov rcx, rbx
call qword [rax + 0x18]
nop
lea rcx, [rbp - 0x80]
call fcn.14001bb60
xor edx, edx
mov rcx, r14
call fcn.14005ca8c
jmp 0x1400875ff
mov ebx, dword [rbp + 0xa0]
lea rcx, [rsp + 0x58]
call fcn.140067ef8
cmp rbx, rax
jae 0x1400875f1
lea rcx, [rsp + 0x58]
call fcn.140068510
mov rdx, rax
mov r8d, ebx
mov rcx, r14
call fcn.14005ca68
jmp 0x1400875ff
lea rdx, [rsp + 0x58]
mov rcx, r14
call fcn.14005c9e4
nop
lea rcx, [rsp + 0x58]
call fcn.14005e214
mov rax, r14
lea r11, [rsp + 0x170]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop rdi
pop rbp
ret