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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], r8
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov rax, qword [rbp + 0x70]
xor ecx, ecx
xor bl, bl
mov r12d, edx
mov r15d, r9d
mov qword [rbp - 0x10], rcx
mov qword [rbp - 8], rcx
mov r14d, ecx
mov qword [rax], rcx
mov esi, ecx
mov rax, qword [rbp + 0x78]
mov edi, ecx
mov dword [rbp - 0x18], ecx
mov r13d, ecx
mov dword [rbp - 0x1c], ecx
mov dword [rbp + 0x58], ecx
mov dword [rax], ecx
lea eax, [r9 - 0x10]
mov dword [rbp - 0x20], ecx
test eax, 0xffffffef
je 0x1400106ce
mov rcx, qword [rbp + 0x80]
lea r8d, [r13 + 4]
lea rdx, str.WinAes::Bad_key_size__d
mov rax, qword [rcx]
call qword [rax + 0x10]
jmp 0x1400109a3
xor r9d, r9d
lea rdx, [0x14005b6e8]
xor r8d, r8d
lea rcx, [rbp - 0x10]
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
mov r9d, eax
test eax, eax
jns 0x14001070b
mov rcx, qword [rbp + 0x80]
lea rdx, str.WinAes::BCryptOpenAlgorithmProvider_failed__u
mov r8d, 4
mov rax, qword [rcx]
call qword [rax + 0x10]
jmp 0x1400109a3
mov rcx, qword [rbp - 0x10]
lea rax, [rbp - 0x18]
xor edx, edx
lea r8, [rbp - 0x1c]
mov dword [rsp + 0x28], edx
mov qword [rsp + 0x20], rax
lea r9d, [rdx + 4]
lea rdx, str.ObjectLength
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
mov r9d, eax
test eax, eax
jns 0x140010759
mov rcx, qword [rbp + 0x80]
lea rdx, str.WinAes::BCryptGetProperty_failed__u
mov r8d, 4
mov rax, qword [rcx]
call qword [rax + 0x10]
jmp 0x1400109a3
mov ecx, dword [rbp - 0x1c]
call fcn.14002139c
mov rcx, qword [rbp - 0x10]
lea r8, [rbp + 0x58]
mov r14, rax
lea rdx, str.BlockLength
xor eax, eax
mov r9d, 4
mov dword [rsp + 0x28], eax
lea rax, [rbp - 0x18]
mov qword [rsp + 0x20], rax
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
mov r9d, eax
test eax, eax
jns 0x1400107b4
mov rcx, qword [rbp + 0x80]
lea rdx, str.WinAes::BCryptGetProperty_failed__u
mov r8d, 4
mov rax, qword [rcx]
call qword [rax + 0x10]
jmp 0x1400109a3
mov ecx, dword [rbp + 0x58]
call fcn.14002139c
mov ebx, dword [rbp + 0x68]
mov rcx, rax
cmp dword [rbp + 0x58], ebx
mov r8d, ebx
mov rdx, qword [rbp + 0x60]
mov rsi, rax
cmovb r8d, dword [rbp + 0x58]
call fcn.1400233b0
mov ecx, dword [rbp + 0x58]
mov rdx, rdi
mov r8d, ecx
sub r8d, ebx
cmove r8d, edx
cmp ecx, ebx
cmovb ebx, ecx
mov ecx, ebx
add rcx, rsi
call fcn.140023a60
mov rcx, qword [rbp - 0x10]
lea r8, str.ChainingModeCBC
xor ebx, ebx
lea rdx, str.ChainingMode
mov dword [rsp + 0x20], ebx
lea r9d, [rbx + 0x20]
call qword [sym.imp.bcrypt.dll_BCryptSetProperty]
mov r9d, eax
test eax, eax
jns 0x14001083e
mov rcx, qword [rbp + 0x80]
lea r8d, [rbx + 4]
lea rdx, str.WinAes::BCryptSetProperty_failed__u
mov rax, qword [rcx]
call qword [rax + 0x10]
jmp 0x1400109a3
mov rax, qword [rbp + 0x50]
lea rdx, [rbp - 8]
mov r9d, dword [rbp - 0x1c]
mov r8, r14
mov rcx, qword [rbp - 0x10]
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], rax
call qword [sym.imp.bcrypt.dll_BCryptGenerateSymmetricKey]
mov r9d, eax
test eax, eax
jns 0x14001088b
mov rcx, qword [rbp + 0x80]
lea rdx, str.WinAes::BCryptGenerateSymmetricKey_failed__u
mov r8d, 4
mov rax, qword [rcx]
call qword [rax + 0x10]
jmp 0x1400109a3
mov rcx, r12
call fcn.14002139c
mov rdx, qword [rbp + 0x40]
mov r8, r12
mov rcx, rax
mov rdi, rax
call fcn.1400233b0
mov rcx, qword [rbp - 8]
lea rax, [rbp - 0x20]
mov dword [rsp + 0x48], 1
xor r9d, r9d
mov qword [rsp + 0x40], rax
mov r8d, r12d
mov eax, dword [rbp + 0x58]
mov rdx, rdi
mov dword [rsp + 0x38], ebx
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rsi
call qword [sym.imp.bcrypt.dll_BCryptEncrypt]
mov r9d, eax
test eax, eax
jns 0x140010904
mov rcx, qword [rbp + 0x80]
lea rdx, str.WinAes::BCryptEncrypt_failed__u
mov r8d, 4
mov rax, qword [rcx]
call qword [rax + 0x10]
jmp 0x1400109a3
mov ecx, dword [rbp - 0x20]
call fcn.14002139c
mov ecx, dword [rbp - 0x20]
mov r13, rax
mov dword [rsp + 0x48], 1
lea rax, [rbp - 0x18]
mov qword [rsp + 0x40], rax
xor r9d, r9d
mov dword [rsp + 0x38], ecx
mov r8d, r12d
mov ecx, dword [rbp + 0x58]
mov rdx, rdi
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], ecx
mov rcx, qword [rbp - 8]
mov qword [rsp + 0x20], rsi
call qword [sym.imp.bcrypt.dll_BCryptEncrypt]
test eax, eax
jns 0x14001096f
mov rcx, qword [rbp + 0x80]
lea rdx, str.WinAes::BCryptEncrypt_failed__u
mov r9d, eax
mov r8d, 4
mov r10, qword [rcx]
call qword [r10 + 0x10]
jmp 0x1400109a3
mov rcx, qword [rbp - 8]
call qword [sym.imp.bcrypt.dll_BCryptDestroyKey]
test eax, eax
jns 0x14001099d
mov rcx, qword [rbp + 0x80]
lea rdx, str.WinAes::BCryptDestroyKey_failed__u
mov r9d, eax
mov r8d, 4
mov r10, qword [rcx]
call qword [r10 + 0x10]
jmp 0x1400109a3
mov qword [rbp - 8], rbx
mov bl, 1
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x1400109b4
xor edx, edx
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
mov rcx, qword [rbp - 8]
test rcx, rcx
je 0x1400109c3
call qword [sym.imp.bcrypt.dll_BCryptDestroyKey]
test r14, r14
je 0x1400109d0
mov rcx, r14
call fcn.140021394
test rsi, rsi
je 0x1400109dd
mov rcx, rsi
call fcn.140021394
test rdi, rdi
je 0x1400109ea
mov rcx, rdi
call fcn.140021394
mov rax, qword [rbp + 0x78]
mov ecx, dword [rbp - 0x20]
mov dword [rax], ecx
mov rax, qword [rbp + 0x70]
mov qword [rax], r13
movzx eax, bl
mov rbx, qword [rsp + 0xb8]
add rsp, 0x70
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret