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

Disassembly:
push rbp
push rsi
push rdi
push rbx
sub rsp, 0x228
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x198], 0xfffffffffffffffe
mov qword [rbp + 0x48], rcx
mov rax, rcx
mov qword [rbp + 0x50], rax
mov rax, qword [rbp + 0x1f0]
mov rax, rcx
mov qword [rbp + 0x190], rax
mov qword [rbp + 0x188], r9
mov qword [rbp + 0x180], r8
mov qword [rbp + 0x178], rdx
mov qword [rbp + 0x170], 0
mov qword [rbp + 0x168], 0
mov dword [rbp + 0x164], 0
mov byte [rbp + 0x163], 0
call fcn.140030680
lea rcx, [rbp + 0x170]
lea rdx, [0x1400919be]
xor eax, eax
mov r8d, eax
xor r9d, r9d
call sub.bcrypt.dll_BCryptOpenAlgorithmProvider
mov dword [rbp + 0x164], eax
cmp dword [rbp + 0x164], 0
jge 0x140053545
lea rdx, str.Failed_to_open_AES_algorithm_provider
lea rcx, [rbp + 0x148]
mov qword [rbp + 0x40], rcx
call fcn.140022380
mov rcx, qword [rbp + 0x40]
lea rdx, [0x140097ab0]
call fcn.14005fc0c
jmp 0x140053968
mov rcx, qword [rbp + 0x170]
lea rdx, str.ChainingMode
lea r8, str.ChainingModeCBC
mov r9d, 0x20
xor eax, eax
mov dword [rsp + 0x20], 0
call sub.bcrypt.dll_BCryptSetProperty
mov dword [rbp + 0x164], eax
cmp dword [rbp + 0x164], 0
jge 0x1400535ae
lea rdx, str.Failed_to_set_CBC_chaining_mode
lea rcx, [rbp + 0x130]
mov qword [rbp + 0x38], rcx
call fcn.140022380
mov rcx, qword [rbp + 0x38]
lea rdx, [0x140097ab0]
call fcn.14005fc0c
jmp 0x140053968
lea r8, [rbp + 0x12c]
mov rcx, qword [rbp + 0x170]
lea rdx, str.ObjectLength
mov r9d, 4
lea rax, [rbp + 0x128]
xor r10d, r10d
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x28], 0
call sub.bcrypt.dll_BCryptGetProperty
mov dword [rbp + 0x164], eax
cmp dword [rbp + 0x164], 0
jge 0x140053624
lea rdx, str.Failed_to_get_key_object_length
lea rcx, [rbp + 0x110]
mov qword [rbp + 0x30], rcx
call fcn.140022380
mov rcx, qword [rbp + 0x30]
lea rdx, [0x140097ab0]
call fcn.14005fc0c
jmp 0x140053968
lea rcx, [rbp + 0xf0]
mov qword [rbp + 0x28], rcx
call fcn.140002930
mov r8, qword [rbp + 0x28]
mov eax, dword [rbp + 0x12c]
mov edx, eax
lea rcx, [rbp + 0xf8]
call fcn.1400528d0
jmp 0x140053651
mov rax, qword [rbp + 0x1f0]
mov dword [rbp + 0x24], eax
mov rax, qword [rbp + 0x188]
mov qword [rbp + 0x18], rax
mov eax, dword [rbp + 0x12c]
mov dword [rbp + 0x14], eax
lea rcx, [rbp + 0xf8]
call fcn.14004d0b0
mov r9d, dword [rbp + 0x14]
mov r10, qword [rbp + 0x18]
mov r8, rax
mov eax, dword [rbp + 0x24]
mov rcx, qword [rbp + 0x170]
lea rdx, [rbp + 0x168]
xor r11d, r11d
mov qword [rsp + 0x20], r10
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x30], 0
call sub.bcrypt.dll_BCryptGenerateSymmetricKey
mov dword [rbp + 0x164], eax
cmp dword [rbp + 0x164], 0
jge 0x1400536ef
lea rdx, str.Failed_to_generate_symmetric_key
lea rcx, [rbp + 0xd8]
mov qword [rbp + 8], rcx
call fcn.140022380
mov rcx, qword [rbp + 8]
lea rdx, [0x140097ab0]
call fcn.14005fc0c
jmp 0x140053968
lea r8, [rbp + 0xd4]
mov rcx, qword [rbp + 0x170]
lea rdx, str.BlockLength
mov r9d, 4
lea rax, [rbp + 0x128]
xor r10d, r10d
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x28], 0
call sub.bcrypt.dll_BCryptGetProperty
mov dword [rbp + 0x164], eax
cmp dword [rbp + 0x164], 0
jge 0x140053765
lea rdx, str.Failed_to_get_block_size
lea rcx, [rbp + 0xb8]
mov qword [rbp], rcx
call fcn.140022380
mov rcx, qword [rbp]
lea rdx, [0x140097ab0]
call fcn.14005fc0c
jmp 0x140053968
lea rcx, [rbp + 0x98]
mov qword [rbp - 8], rcx
call fcn.140002930
mov r9, qword [rbp - 8]
mov rdx, qword [rbp + 0x188]
mov eax, dword [rbp + 0xd4]
mov r8, rdx
add r8, rax
lea rcx, [rbp + 0xa0]
call fcn.140053a90
jmp 0x14005379d
lea rcx, [rbp + 0x78]
mov qword [rbp - 0x10], rcx
call fcn.140002930
mov r9, qword [rbp - 0x10]
mov rdx, qword [rbp + 0x178]
mov rax, qword [rbp + 0x180]
mov r8, rdx
add r8, rax
lea rcx, [rbp + 0x80]
call fcn.140053a90
jmp 0x1400537d3
mov eax, dword [rbp + 0xd4]
mov edx, eax
lea rcx, [rbp + 0x80]
call fcn.140052b50
jmp 0x1400537ec
lea rcx, [rbp + 0x80]
call fcn.140030730
mov rcx, qword [rbp + 0x48]
mov rdx, rax
call fcn.140053b30
jmp 0x140053809
mov rcx, qword [rbp + 0x48]
call fcn.140030730
mov rcx, qword [rbp + 0x48]
mov dword [rbp - 0x14], eax
call fcn.14004d0b0
mov qword [rbp - 0x20], rax
lea rcx, [rbp + 0xa0]
call fcn.140030730
mov esi, eax
lea rcx, [rbp + 0xa0]
call fcn.14004d0b0
mov rdi, rax
lea rcx, [rbp + 0x80]
call fcn.140030730
mov dword [rbp - 0x24], eax
lea rcx, [rbp + 0x80]
call fcn.14004d0b0
mov r8d, dword [rbp - 0x24]
mov r11, qword [rbp - 0x20]
mov r10d, dword [rbp - 0x14]
mov rdx, rax
mov rcx, qword [rbp + 0x168]
xor eax, eax
mov r9d, eax
lea rax, [rbp + 0x74]
xor ebx, ebx
mov qword [rsp + 0x20], rdi
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x30], r11
mov dword [rsp + 0x38], r10d
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x48], 0
call sub.bcrypt.dll_BCryptEncrypt
mov dword [rbp + 0x164], eax
cmp dword [rbp + 0x164], 0
jge 0x1400538dc
lea rdx, str.Failed_to_encrypt_data
lea rcx, [rbp + 0x58]
mov qword [rbp - 0x30], rcx
call fcn.140022380
mov rcx, qword [rbp - 0x30]
lea rdx, [0x140097ab0]
call fcn.14005fc0c
jmp 0x140053968
lea rcx, [rbp + 0x80]
call fcn.1400306e0
lea rcx, [rbp + 0xa0]
call fcn.1400306e0
lea rcx, [rbp + 0xf8]
call fcn.1400306e0
cmp qword [rbp + 0x168], 0
jne 0x140053913
jmp 0x14005391f
mov rcx, qword [rbp + 0x168]
call sub.bcrypt.dll_BCryptDestroyKey
cmp qword [rbp + 0x170], 0
je 0x14005393b
mov rcx, qword [rbp + 0x170]
xor edx, edx
call sub.bcrypt.dll_BCryptCloseAlgorithmProvider
mov byte [rbp + 0x163], 1
test byte [rbp + 0x163], 1
jne 0x140053958
mov rcx, qword [rbp + 0x48]
call fcn.1400306e0
mov rax, qword [rbp + 0x50]
add rsp, 0x228
pop rbx
pop rdi
pop rsi
pop rbp
ret
int3