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

Disassembly:
mov rax, rsp
mov qword [rax + 0x20], rbx
mov qword [rax + 0x18], r8
mov dword [rax + 0x10], edx
mov qword [rax + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
xor edi, edi
xor r8d, r8d
and qword [rbp - 0x10], rdi
xor edx, edx
and qword [rbp - 0x18], rdi
xor ecx, ecx
mov r13, r9
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_HeapCreate]
mov r15, qword [rbp + 0x70]
mov rsi, rax
mov r12, qword [rbp + 0x68]
test rax, rax
je 0x14000326c
xor r9d, r9d
lea rdx, [0x14001d8c0]
xor r8d, r8d
lea rcx, [rbp - 0x10]
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
test eax, eax
js 0x14000326c
and dword [rsp + 0x28], ebx
lea rax, [rbp - 0x30]
mov rcx, qword [rbp - 0x10]
lea r9d, [rdi + 4]
and dword [rbp - 0x24], ebx
lea r8, [rbp - 0x24]
and dword [rbp - 0x30], ebx
lea rdx, str.ObjectLength
mov qword [rsp + 0x20], rax
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
test eax, eax
js 0x14000326c
mov r8d, dword [rbp - 0x24]
lea edx, [rdi + 8]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r14, rax
test rax, rax
je 0x14000326c
and dword [rsp + 0x28], ebx
lea rax, [rbp - 0x30]
mov rcx, qword [rbp - 0x10]
lea r9d, [rdi + 4]
and dword [rbp - 0x2c], ebx
lea r8, [rbp - 0x2c]
lea rdx, str.BlockLength
mov qword [rsp + 0x20], rax
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
test eax, eax
js 0x14000326c
cmp dword [rbp - 0x2c], 0x10
ja 0x14000326c
and dword [rsp + 0x30], ebx
lea rdx, [rbp - 0x18]
mov eax, dword [rbp + 0x60]
mov r8, r14
mov r9d, dword [rbp - 0x24]
mov rcx, qword [rbp - 0x10]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r13
call qword [sym.imp.bcrypt.dll_BCryptGenerateSymmetricKey]
test eax, eax
js 0x14000326c
mov r14, qword [rbp + 0x50]
lea rax, [rbp - 0x28]
mov r13d, dword [rbp + 0x48]
xor r9d, r9d
mov rdx, qword [rbp + 0x40]
mov r8d, r13d
mov rcx, qword [rbp - 0x18]
and dword [rbp - 0x28], ebx
mov dword [rsp + 0x48], 1
mov qword [rsp + 0x40], rax
and dword [rsp + 0x38], ebx
and qword [rsp + 0x30], rbx
mov eax, dword [rbp - 0x2c]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r14
call qword [sym.imp.bcrypt.dll_BCryptDecrypt]
test eax, eax
js 0x14000326c
mov eax, dword [rbp - 0x28]
lea r9, [rbp - 0x20]
mov edx, 0x3000
mov qword [rbp - 8], rax
lea rcx, [rbp - 8]
call fcn.14000d75c
mov rbx, rax
cmp dword [rbp - 0x20], edi
jl 0x14000326c
test rax, rax
je 0x14000326c
mov rdx, qword [rbp + 0x40]
lea rax, [rbp - 0x30]
mov rcx, qword [rbp - 0x18]
xor r9d, r9d
and dword [rbp - 0x30], edi
mov r8d, r13d
mov dword [rsp + 0x48], 1
mov qword [rsp + 0x40], rax
mov eax, dword [rbp - 0x28]
mov dword [rsp + 0x38], eax
mov eax, dword [rbp - 0x2c]
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r14
call qword [sym.imp.bcrypt.dll_BCryptDecrypt]
test eax, eax
js 0x14000326c
mov rcx, qword [rbp - 0x18]
call qword [sym.imp.bcrypt.dll_BCryptDestroyKey]
mov eax, dword [rbp - 0x28]
xor ecx, ecx
mov qword [rbp - 0x18], rcx
mov qword [r12], rbx
mov dword [r15], eax
lea edi, [rcx + 1]
jmp 0x140003270
mov rcx, qword [rbp - 0x18]
test rcx, rcx
je 0x14000327b
call qword [sym.imp.bcrypt.dll_BCryptDestroyKey]
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x14000328c
xor edx, edx
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
test rsi, rsi
je 0x14000329a
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_HeapDestroy]
test edi, edi
jne 0x1400032b4
test rbx, rbx
je 0x1400032ab
mov rcx, rbx
call fcn.14000d7d8
and qword [r12], 0
and dword [r15], 0
mov rbx, qword [rsp + 0xd8]
mov eax, edi
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret