Function at 0x180012a40
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, 0x60
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 + 0x80], ecx
mov r13d, ecx
mov dword [rbp + 0x60], ecx
mov dword [rbp + 0x58], ecx
mov dword [rax], ecx
lea eax, [r9 - 0x10]
mov dword [rbp + 0x68], ecx
test eax, 0xffffffef
je 0x180012ac7
lea rdx, str.WinAes::Bad_key_size__d
mov rax, qword [0x180053c08]
lea rcx, [0x180053c08]
mov r8d, 4
call qword [rax + 0x10]
jmp 0x180012cf5
xor r9d, r9d
lea rdx, [0x18004b198]
xor r8d, r8d
lea rcx, [rbp - 0x10]
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
test eax, eax
jns 0x180012aee
mov r9d, eax
lea rdx, str.WinAes::BCryptOpenAlgorithmProvider_failed__u
jmp 0x180012aab
mov rcx, qword [rbp - 0x10]
lea rax, [rbp + 0x80]
xor edx, edx
lea r8, [rbp + 0x60]
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]
test eax, eax
jns 0x180012b29
mov r9d, eax
lea rdx, str.WinAes::BCryptGetProperty_failed__u
jmp 0x180012aab
mov ecx, dword [rbp + 0x60]
call fcn.18001a484
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 + 0x80]
mov qword [rsp + 0x20], rax
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
test eax, eax
js 0x180012b1d
mov ecx, dword [rbp + 0x58]
call fcn.18001a484
mov ebx, 0x10
lea rdx, [0x18004a5c8]
cmp dword [rbp + 0x58], ebx
mov r8d, ebx
mov rcx, rax
mov rsi, rax
cmovb r8d, dword [rbp + 0x58]
call fcn.18001c300
mov ecx, dword [rbp + 0x58]
mov rdx, rdi
lea eax, [rcx - 0x10]
test eax, eax
cmove eax, edx
cmp ecx, ebx
mov r8d, eax
cmovb ebx, ecx
mov ecx, ebx
add rcx, rsi
call fcn.18001ca80
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]
test eax, eax
jns 0x180012be4
mov r9d, eax
lea rdx, str.WinAes::BCryptSetProperty_failed__u
jmp 0x180012aab
mov rax, qword [rbp + 0x50]
lea rdx, [rbp - 8]
mov r9d, dword [rbp + 0x60]
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]
test eax, eax
jns 0x180012c1e
mov r9d, eax
lea rdx, str.WinAes::BCryptGenerateSymmetricKey_failed__u
jmp 0x180012aab
mov rcx, r12
call fcn.18001a484
mov rdx, qword [rbp + 0x40]
mov r8, r12
mov rcx, rax
mov rdi, rax
call fcn.18001c300
mov rcx, qword [rbp - 8]
lea rax, [rbp + 0x68]
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]
test eax, eax
jns 0x180012c84
mov r9d, eax
lea rdx, str.WinAes::BCryptEncrypt_failed__u
jmp 0x180012aab
mov ecx, dword [rbp + 0x68]
call fcn.18001a484
mov ecx, dword [rbp + 0x68]
mov r13, rax
mov dword [rsp + 0x48], 1
lea rax, [rbp + 0x80]
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
js 0x180012c75
mov rcx, qword [rbp - 8]
call qword [sym.imp.bcrypt.dll_BCryptDestroyKey]
test eax, eax
jns 0x180012cef
mov r9d, eax
lea rdx, str.WinAes::BCryptDestroyKey_failed__u
jmp 0x180012aab
mov qword [rbp - 8], rbx
mov bl, 1
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x180012d06
xor edx, edx
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
mov rcx, qword [rbp - 8]
test rcx, rcx
je 0x180012d15
call qword [sym.imp.bcrypt.dll_BCryptDestroyKey]
test r14, r14
je 0x180012d22
mov rcx, r14
call fcn.180019ff0
test rsi, rsi
je 0x180012d2f
mov rcx, rsi
call fcn.180019ff0
test rdi, rdi
je 0x180012d3c
mov rcx, rdi
call fcn.180019ff0
mov rax, qword [rbp + 0x78]
mov ecx, dword [rbp + 0x68]
mov dword [rax], ecx
mov rax, qword [rbp + 0x70]
mov qword [rax], r13
movzx eax, bl
mov rbx, qword [rsp + 0xa8]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret