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

Disassembly:
mov r11, rsp
push rbp
push rsi
push rdi
push r15
lea rbp, [r11 - 0x5f]
sub rsp, 0x88
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov qword [r11 + 0x18], r12
lea rdx, [0x1400032c0]
xor r12d, r12d
mov qword [r11 - 0x28], r14
mov rsi, rcx
mov qword [rbp + 0xf], r12
xor r9d, r9d
mov qword [rbp + 0x17], r12
xor r8d, r8d
mov dword [rbp + 0x1f], r12d
lea rcx, [rbp + 0xf]
mov dword [rbp + 0x23], r12d
mov dword [rbp + 0xb], r12d
mov r14d, r12d
mov r15d, r12d
mov dword [rbp + 7], r12d
mov edi, 1
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
test eax, eax
jns 0x1400010f3
mov edx, eax
lea rcx, str.____BCryptOpenAlgorithmProvider_Failed_With_Error:_0x_0.8X__n
call fcn.140001010
mov edi, r12d
jmp 0x1400012e5
mov rcx, qword [rbp + 0xf]
lea rax, [rbp + 0x1f]
mov dword [rsp + 0x28], r12d
lea r8, [rbp + 0xb]
mov r9d, 4
mov qword [rsp + 0x20], rax
lea rdx, str.ObjectLength
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
test eax, eax
jns 0x140001136
mov edx, eax
lea rcx, str.____BCryptGetProperty_1__Failed_With_Error:_0x_0.8X__n
call fcn.140001010
mov edi, r12d
jmp 0x1400012e5
mov rcx, qword [rbp + 0xf]
lea rax, [rbp + 0x1f]
mov dword [rsp + 0x28], r12d
lea r8, [rbp + 0x23]
mov r9d, 4
mov qword [rsp + 0x20], rax
lea rdx, str.BlockLength
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
test eax, eax
jns 0x140001179
mov edx, eax
lea rcx, str.____BCryptGetProperty_2__Failed_With_Error:_0x_0.8X__n
call fcn.140001010
mov edi, r12d
jmp 0x1400012e5
cmp dword [rbp + 0x23], 0x10
je 0x140001187
mov edi, r12d
jmp 0x1400012e5
mov qword [rsp + 0xb8], rbx
mov ebx, dword [rbp + 0xb]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r14, rax
test rax, rax
je 0x1400012da
mov rcx, qword [rbp + 0xf]
lea r8, str.ChainingModeCBC
mov r9d, 0x20
mov dword [rsp + 0x20], r12d
lea rdx, str.ChainingMode
call qword [sym.imp.bcrypt.dll_BCryptSetProperty]
test eax, eax
jns 0x1400011e5
lea rcx, str.____BCryptSetProperty_Failed_With_Error:_0x_0.8X__n
jmp 0x1400012d3
mov rax, qword [rsi + 0x20]
lea rdx, [rbp + 0x17]
mov r9d, dword [rbp + 0xb]
mov r8, r14
mov rcx, qword [rbp + 0xf]
mov dword [rsp + 0x30], r12d
mov dword [rsp + 0x28], 0x20
mov qword [rsp + 0x20], rax
call qword [sym.imp.bcrypt.dll_BCryptGenerateSymmetricKey]
test eax, eax
jns 0x140001220
lea rcx, str.____BCryptGenerateSymmetricKey_Failed_With_Error:_0x_0.8X__n
jmp 0x1400012d3
mov r8d, dword [rsi + 0x18]
lea rax, [rbp + 7]
mov rdx, qword [rsi + 0x10]
xor r9d, r9d
mov rcx, qword [rbp + 0x17]
mov dword [rsp + 0x48], edi
mov qword [rsp + 0x40], rax
mov rax, qword [rsi + 0x28]
mov dword [rsp + 0x38], r12d
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x10
mov qword [rsp + 0x20], rax
call qword [sym.imp.bcrypt.dll_BCryptDecrypt]
test eax, eax
jns 0x14000126a
lea rcx, str.____BCryptDecrypt_1__Failed_With_Error:_0x_0.8X__n
jmp 0x1400012d3
mov ebx, dword [rbp + 7]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r15, rax
test rax, rax
je 0x1400012da
mov r8d, dword [rsi + 0x18]
lea rax, [rbp + 0x1f]
mov rdx, qword [rsi + 0x10]
xor r9d, r9d
mov rcx, qword [rbp + 0x17]
mov dword [rsp + 0x48], edi
mov qword [rsp + 0x40], rax
mov eax, dword [rbp + 7]
mov dword [rsp + 0x38], eax
mov rax, qword [rsi + 0x28]
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x10
mov qword [rsp + 0x20], rax
call qword [sym.imp.bcrypt.dll_BCryptDecrypt]
test eax, eax
jns 0x1400012dd
lea rcx, str.____BCryptDecrypt_2__Failed_With_Error:_0x_0.8X__n
mov edx, eax
call fcn.140001010
mov edi, r12d
mov rbx, qword [rsp + 0xb8]
mov rcx, qword [rbp + 0x17]
mov r12, qword [rsp + 0xc0]
test rcx, rcx
je 0x1400012fc
call qword [sym.imp.bcrypt.dll_BCryptDestroyKey]
mov rcx, qword [rbp + 0xf]
test rcx, rcx
je 0x14000130d
xor edx, edx
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
test r14, r14
je 0x140001326
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r14, qword [rsp + 0x80]
mov eax, edi
test r15, r15
je 0x140001342
test edi, edi
je 0x140001342
mov ecx, dword [rbp + 7]
mov dword [rsi + 8], ecx
mov qword [rsi], r15
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.1400015b0
add rsp, 0x88
pop r15
pop rdi
pop rsi
pop rbp
ret