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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xf]
sub rsp, 0x98
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp - 9], rax
mov rax, qword [rbp + 0x77]
xor ebx, ebx
mov r14, qword [rbp + 0x7f]
mov r13, r9
mov qword [rbp - 0x39], r8
mov r12d, edx
mov r15, rcx
mov qword [rbp - 0x31], rax
xor r9d, r9d
mov qword [rbp - 0x29], rbx
xor r8d, r8d
mov qword [rbp - 0x21], rbx
lea rdx, [0x1400312d0]
mov dword [rbp - 0x11], ebx
lea rcx, [rbp - 0x29]
mov dword [rbp - 0x15], ebx
mov esi, ebx
mov dword [rbp - 0x19], ebx
mov edi, 1
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
test eax, eax
jns 0x1400010fa
mov edx, eax
lea rcx, str.____BCryptOpenAlgorithmProvider_Failed:_0x_0.8X__n
call fcn.140001010
xor eax, eax
jmp 0x1400012f6
mov rcx, qword [rbp - 0x29]
lea rax, [rbp - 0x11]
mov dword [rsp + 0x28], ebx
lea r8, [rbp - 0x15]
mov r9d, 4
mov qword [rsp + 0x20], rax
lea rdx, str.ObjectLength
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
test eax, eax
jns 0x14000113b
mov edx, eax
lea rcx, str.____BCryptGetProperty_Failed:_0x_0.8X__n
call fcn.140001010
mov edi, ebx
jmp 0x1400012bb
mov ebx, dword [rbp - 0x15]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rsi, rax
test rax, rax
jne 0x140001161
xor edi, edi
jmp 0x1400012bb
mov rcx, qword [rbp - 0x29]
lea r8, str.ChainingModeCBC
xor ebx, ebx
lea rdx, str.ChainingMode
mov r9d, 0x20
mov dword [rsp + 0x20], ebx
call qword [sym.imp.bcrypt.dll_BCryptSetProperty]
test eax, eax
jns 0x14000119e
mov edx, eax
lea rcx, str.____BCryptSetProperty_Failed:_0x_0.8X__n
call fcn.140001010
mov edi, ebx
jmp 0x1400012bb
mov rax, qword [rbp - 0x39]
lea rdx, [rbp - 0x21]
mov r9d, dword [rbp - 0x15]
mov r8, rsi
mov rcx, qword [rbp - 0x29]
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], 0x20
mov qword [rsp + 0x20], rax
call qword [sym.imp.bcrypt.dll_BCryptGenerateSymmetricKey]
test eax, eax
jns 0x1400011e1
mov edx, eax
lea rcx, str.____BCryptGenerateSymmetricKey_Failed:_0x_0.8X__n
call fcn.140001010
mov edi, ebx
jmp 0x1400012bb
mov rcx, qword [rbp - 0x21]
lea rax, [rbp - 0x19]
mov dword [rsp + 0x48], edi
xor r9d, r9d
mov qword [rsp + 0x40], rax
mov r8d, r12d
mov dword [rsp + 0x38], ebx
mov rdx, r15
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x10
mov qword [rsp + 0x20], r13
call qword [sym.imp.bcrypt.dll_BCryptDecrypt]
test eax, eax
jns 0x140001230
mov edx, eax
lea rcx, str.____BCryptDecrypt_Failed__Size_:_0x_0.8X__n
call fcn.140001010
mov edi, ebx
jmp 0x1400012bb
mov ebx, dword [rbp - 0x19]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
jne 0x140001253
xor edi, edi
jmp 0x1400012bb
mov rcx, qword [rbp - 0x21]
lea rax, [rbp - 0x11]
mov dword [rsp + 0x48], edi
xor r9d, r9d
mov qword [rsp + 0x40], rax
mov r8d, r12d
mov eax, dword [rbp - 0x19]
mov rdx, r15
mov dword [rsp + 0x38], eax
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x10
mov qword [rsp + 0x20], r13
call qword [sym.imp.bcrypt.dll_BCryptDecrypt]
test eax, eax
jns 0x1400012a2
mov edx, eax
lea rcx, str.____BCryptDecrypt_Failed:_0x_0.8X__n
call fcn.140001010
xor edi, edi
jmp 0x1400012bb
mov rax, qword [rbp - 0x31]
mov edx, dword [rbp - 0x19]
mov qword [rax], rbx
mov dword [r14], edx
lea eax, [rdx - 1]
movzx eax, byte [rax + rbx]
sub edx, eax
mov dword [r14], edx
mov rcx, qword [rbp - 0x21]
test rcx, rcx
je 0x1400012ca
call qword [sym.imp.bcrypt.dll_BCryptDestroyKey]
mov rcx, qword [rbp - 0x29]
test rcx, rcx
je 0x1400012db
xor edx, edx
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
test rsi, rsi
je 0x1400012f4
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rsi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
mov rcx, qword [rbp - 9]
xor rcx, rsp
call fcn.14002f860
add rsp, 0x98
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret