Function at 0x14012c810
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 0x14012c8b9
call fcn.14010cdc0
mov rbx, rax
test rax, rax
je 0x14012c8aa
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + reloc.OLEAUT32.dll_VariantClear]
cmp eax, 1
jl 0x14012c8aa
lea edx, [rsi + 2]
lea r8d, [rsi + 1]
lea rcx, [rbp - 0x80]
call fcn.140027a90
nop
lea rdx, str.Cipher_not_properly_initialized_for_encryption._Aborting
lea rcx, [rbp - 0x80]
call fcn.14002c360
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.14001a870
xor edx, edx
mov rcx, r14
call fcn.140102308
jmp 0x14012ca91
mov rcx, r13
call fcn.1400ce2ac
test rax, rax
je 0x14012c8aa
test byte [r15 + 0x68], 1
je 0x14012c905
mov rax, qword [r15]
mov rcx, r15
call qword [rax + 0x38]
mov rbx, rax
mov rcx, r13
call fcn.1400ce2ac
xor edx, edx
div rbx
mov rbx, rdx
mov rcx, r13
call fcn.1400ce2ac
mov rdi, rax
sub rdi, rbx
mov rdx, qword [r15]
mov rcx, r15
call qword [rdx + 0x38]
add rax, rdi
jmp 0x14012c90d
mov rcx, r13
call fcn.1400ce2ac
mov dword [rbp + 0xa0], eax
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.140102308
nop
mov qword [rsp + 0x50], rsi
mov dword [rbp + 0xb8], esi
cmp qword [r15 + 0x88], rsi
je 0x14012c953
lea rcx, [r15 + 0x70]
call fcn.1400d5658
mov qword [rsp + 0x50], rax
lea rcx, [r15 + 0x70]
call fcn.1400ce2ac
mov qword [rbp + 0xb8], rax
lea rcx, [rsp + 0x58]
call fcn.1400ce2ac
mov rsi, rax
lea rcx, [rsp + 0x58]
call fcn.1400d5658
mov rbx, rax
mov rcx, r13
call fcn.1400ce2ac
mov rdi, rax
mov rcx, r13
call fcn.1400d5658
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 0x14012ca4a
mov byte [r15 + 0x50], 1
call fcn.14010cdc0
mov rbx, rax
test rax, rax
je 0x14012ca3e
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + reloc.OLEAUT32.dll_VariantClear]
cmp eax, 2
jl 0x14012ca3e
mov edx, 2
lea r8d, [rdx - 1]
lea rcx, [rbp - 0x80]
call fcn.140027a90
nop
lea rdx, str.Failed_to_compute_encrypted_output_with_error_code
lea rcx, [rbp - 0x80]
call fcn.14002c360
mov rcx, rax
mov edx, edi
call fcn.1401046dc
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.14001a870
xor edx, edx
mov rcx, r14
call fcn.140102308
jmp 0x14012ca87
mov ebx, dword [rbp + 0xa0]
lea rcx, [rsp + 0x58]
call fcn.1400ce2ac
cmp rbx, rax
jae 0x14012ca79
lea rcx, [rsp + 0x58]
call fcn.1400d5658
mov rdx, rax
mov r8d, ebx
mov rcx, r14
call fcn.1401022e4
jmp 0x14012ca87
lea rdx, [rsp + 0x58]
mov rcx, r14
call fcn.140102260
nop
lea rcx, [rsp + 0x58]
call fcn.1401037a8
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