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

Disassembly:
push rbp
push rbx
sub rsp, 0x98
lea rbp, [rsp + 0x90]
mov qword [rbp + 0x20], rcx
mov dword [rbp - 4], 1
mov qword [rbp - 0x28], 0
mov qword [rbp - 0x30], 0
mov dword [rbp - 0x34], 0
mov dword [rbp - 0x38], 0
mov dword [rbp - 0x3c], 0
mov qword [rbp - 0x10], 0
mov qword [rbp - 0x18], 0
mov dword [rbp - 0x40], 0
lea rax, [rbp - 0x28]
mov r9d, 0
mov r8d, 0
lea rdx, [0x140f0f032]
mov rcx, rax
call sym.BCryptOpenAlgorithmProvider
mov dword [rbp - 0x1c], eax
mov eax, dword [rbp - 0x1c]
test eax, eax
jns 0x14000167a
mov eax, dword [rbp - 0x1c]
mov edx, eax
lea rax, str.____BCryptOpenAlgorithmProvider_Failed_With_Error:_0x_0.8X__n
mov rcx, rax
call dbg.printf
mov dword [rbp - 4], 0
jmp 0x140001972
mov rax, qword [rbp - 0x28]
lea rcx, [rbp - 0x3c]
mov dword [rsp + 0x28], 0
lea rdx, [rbp - 0x34]
mov qword [rsp + 0x20], rdx
mov r9d, 4
mov r8, rcx
lea rdx, str.ObjectLength
mov rcx, rax
call sym.BCryptGetProperty
mov dword [rbp - 0x1c], eax
mov eax, dword [rbp - 0x1c]
test eax, eax
jns 0x1400016d5
mov eax, dword [rbp - 0x1c]
mov edx, eax
lea rax, str.____BCryptGetProperty_1__Failed_With_Error:_0x_0.8X__n
mov rcx, rax
call dbg.printf
mov dword [rbp - 4], 0
jmp 0x140001972
mov rax, qword [rbp - 0x28]
lea rcx, [rbp - 0x38]
mov dword [rsp + 0x28], 0
lea rdx, [rbp - 0x34]
mov qword [rsp + 0x20], rdx
mov r9d, 4
mov r8, rcx
lea rdx, str.BlockLength
mov rcx, rax
call sym.BCryptGetProperty
mov dword [rbp - 0x1c], eax
mov eax, dword [rbp - 0x1c]
test eax, eax
jns 0x140001730
mov eax, dword [rbp - 0x1c]
mov edx, eax
lea rax, str.____BCryptGetProperty_2__Failed_With_Error:_0x_0.8X__n
mov rcx, rax
call dbg.printf
mov dword [rbp - 4], 0
jmp 0x140001972
mov eax, dword [rbp - 0x38]
cmp eax, 0x10
je 0x140001744
mov dword [rbp - 4], 0
jmp 0x140001972
mov eax, dword [rbp - 0x3c]
mov ebx, eax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcessHeap]
call rax
mov r8, rbx
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_HeapAlloc]
call rax
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x14000177d
mov dword [rbp - 4], 0
jmp 0x140001972
mov rax, qword [rbp - 0x28]
mov dword [rsp + 0x20], 0
mov r9d, 0x20
lea r8, str.ChainingModeCBC
lea rdx, str.ChainingMode
mov rcx, rax
call sym.BCryptSetProperty
mov dword [rbp - 0x1c], eax
mov eax, dword [rbp - 0x1c]
test eax, eax
jns 0x1400017cf
mov eax, dword [rbp - 0x1c]
mov edx, eax
lea rax, str.____BCryptSetProperty_Failed_With_Error:_0x_0.8X__n
mov rcx, rax
call dbg.printf
mov dword [rbp - 4], 0
jmp 0x140001972
mov rax, qword [rbp + 0x20]
mov rcx, qword [rax + 0x20]
mov r9d, dword [rbp - 0x3c]
mov rax, qword [rbp - 0x28]
mov r8, qword [rbp - 0x10]
lea rdx, [rbp - 0x30]
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x20
mov qword [rsp + 0x20], rcx
mov rcx, rax
call sym.BCryptGenerateSymmetricKey
mov dword [rbp - 0x1c], eax
mov eax, dword [rbp - 0x1c]
test eax, eax
jns 0x14000182e
mov eax, dword [rbp - 0x1c]
mov edx, eax
lea rax, str.____BCryptGenerateSymmetricKey_Failed_With_Error:_0x_0.8X__n
mov rcx, rax
call dbg.printf
mov dword [rbp - 4], 0
jmp 0x140001972
mov rax, qword [rbp + 0x20]
mov rcx, qword [rax + 0x28]
mov rax, qword [rbp + 0x20]
mov r10d, dword [rax + 0x18]
mov rax, qword [rbp + 0x20]
mov rdx, qword [rax + 0x10]
mov rax, qword [rbp - 0x30]
mov dword [rsp + 0x48], 1
lea r8, [rbp - 0x40]
mov qword [rsp + 0x40], r8
mov dword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x10
mov qword [rsp + 0x20], rcx
mov r9d, 0
mov r8d, r10d
mov rcx, rax
call sym.BCryptDecrypt
mov dword [rbp - 0x1c], eax
mov eax, dword [rbp - 0x1c]
test eax, eax
jns 0x1400018b4
mov eax, dword [rbp - 0x1c]
mov edx, eax
lea rax, str.____BCryptDecrypt_1__Failed_With_Error:_0x_0.8X__n
mov rcx, rax
call dbg.printf
mov dword [rbp - 4], 0
jmp 0x140001972
mov eax, dword [rbp - 0x40]
mov ebx, eax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcessHeap]
call rax
mov r8, rbx
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_HeapAlloc]
call rax
mov qword [rbp - 0x18], rax
cmp qword [rbp - 0x18], 0
jne 0x1400018ed
mov dword [rbp - 4], 0
jmp 0x140001972
mov r8d, dword [rbp - 0x40]
mov rax, qword [rbp + 0x20]
mov rcx, qword [rax + 0x28]
mov rax, qword [rbp + 0x20]
mov r10d, dword [rax + 0x18]
mov rax, qword [rbp + 0x20]
mov rdx, qword [rax + 0x10]
mov rax, qword [rbp - 0x30]
mov dword [rsp + 0x48], 1
lea r9, [rbp - 0x34]
mov qword [rsp + 0x40], r9
mov dword [rsp + 0x38], r8d
mov r8, qword [rbp - 0x18]
mov qword [rsp + 0x30], r8
mov dword [rsp + 0x28], 0x10
mov qword [rsp + 0x20], rcx
mov r9d, 0
mov r8d, r10d
mov rcx, rax
call sym.BCryptDecrypt
mov dword [rbp - 0x1c], eax
mov eax, dword [rbp - 0x1c]
test eax, eax
jns 0x140001971
mov eax, dword [rbp - 0x1c]
mov edx, eax
lea rax, str.____BCryptDecrypt_2__Failed_With_Error:_0x_0.8X__n
mov rcx, rax
call dbg.printf
mov dword [rbp - 4], 0
jmp 0x140001972
nop
mov rax, qword [rbp - 0x30]
test rax, rax
je 0x140001987
mov rax, qword [rbp - 0x30]
mov rcx, rax
call sym.BCryptDestroyKey
mov rax, qword [rbp - 0x28]
test rax, rax
je 0x1400019a1
mov rax, qword [rbp - 0x28]
mov edx, 0
mov rcx, rax
call sym.BCryptCloseAlgorithmProvider
cmp qword [rbp - 0x10], 0
je 0x1400019c9
mov rax, qword [sym.imp.KERNEL32.dll_GetProcessHeap]
call rax
mov rdx, qword [rbp - 0x10]
mov r8, rdx
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_HeapFree]
call rax
cmp qword [rbp - 0x18], 0
je 0x1400019eb
cmp dword [rbp - 4], 0
je 0x1400019eb
mov rax, qword [rbp + 0x20]
mov rdx, qword [rbp - 0x18]
mov qword [rax], rdx
mov edx, dword [rbp - 0x40]
mov rax, qword [rbp + 0x20]
mov dword [rax + 8], edx
mov eax, dword [rbp - 4]
add rsp, 0x98
pop rbx
pop rbp
ret