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

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x70]
sub rsp, 0x170
mov r14, r8
mov rbx, rdx
mov rsi, rcx
xor r13d, r13d
cmp byte [rcx + 0x50], r13b
je 0x140038910
call fcn.1400170f0
mov rdi, rax
test rax, rax
je 0x1400388f9
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + htons]
cmp eax, 1
jl 0x1400388f9
lea edx, [r13 + 1]
lea rcx, [rbp - 0x80]
call fcn.140002860
nop
lea rdx, str.Cipher_not_properly_initialized_for_decryption._Aborting
lea rcx, [rbp - 0x80]
call fcn.1400019a0
mov rax, qword [rdi]
lea r9, [rbp - 0x80]
mov r8, qword [str.BCryptSymmetricCipherImpl]
lea edx, [r13 + 1]
mov rcx, rdi
call qword [rax + 0x18]
nop
lea rcx, [rbp - 0x80]
call fcn.140003bc0
mov qword [rbx + 8], r13
mov qword [rbx + 0x10], r13
lea rdi, vtable.Aws::Utils::CryptoBuffer.0
mov qword [rbx], rdi
jmp 0x140038b4f
mov rdx, qword [r8 + 8]
test rdx, rdx
jne 0x140038939
cmp byte [rcx + 0x90], r13b
je 0x140038939
mov qword [rbx + 8], r13
mov qword [rbx + 0x10], r13
lea rdi, vtable.Aws::Utils::CryptoBuffer.0
mov qword [rbx], rdi
jmp 0x140038b4f
mov r15, r13
mov r12d, r13d
cmp qword [rcx + 0x88], r12
je 0x140038953
mov r15, qword [rcx + 0x80]
mov r12d, dword [rcx + 0x78]
mov dword [rbp + 0xb0], edx
lea rax, vtable.Aws::Utils::Array_unsigned_char_.0
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], rdx
test rdx, rdx
je 0x1400389b9
mov r8, qword [str.Aws::Array]
lea rcx, [rsp + 0x70]
call fcn.140008c10
mov rcx, qword [rax]
mov qword [rax], r13
lea rax, [rbp + 0xc8]
mov qword [rax], r13
mov qword [rsp + 0x60], rcx
mov rcx, qword [rbp + 0xc8]
test rcx, rcx
je 0x1400389a7
call fcn.140015ad0
nop
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x1400389b7
call fcn.140015ad0
nop
jmp 0x1400389d6
lea rax, [rsp + 0x78]
mov qword [rax], r13
mov qword [rsp + 0x60], r13
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x1400389d6
call fcn.140015ad0
nop
lea rdi, vtable.Aws::Utils::CryptoBuffer.0
mov qword [rsp + 0x50], rdi
mov eax, dword [rsi + 0x68]
mov dword [rsp + 0x48], eax
lea rax, [rbp + 0xb0]
mov qword [rsp + 0x40], rax
mov eax, dword [rsp + 0x58]
mov dword [rsp + 0x38], eax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r15
mov r9, qword [rsi + 0x88]
mov r8d, dword [r14 + 8]
mov rdx, qword [r14 + 0x10]
mov rcx, qword [rsi + 0x60]
call sub.bcrypt.dll_BCryptDecrypt
mov r14d, eax
mov byte [rsi + 0x90], 1
test eax, eax
jns 0x140038ad4
mov byte [rsi + 0x50], 1
call fcn.1400170f0
mov rsi, rax
test rax, rax
je 0x140038aa7
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + htons]
cmp eax, 2
jl 0x140038aa7
mov edx, 1
lea rcx, [rbp - 0x80]
call fcn.140002860
nop
lea rdx, str.Failed_to_compute_encrypted_output_with_error_code
lea rcx, [rbp - 0x80]
call fcn.1400019a0
mov rcx, rax
mov edx, r14d
call fcn.1400107d0
mov rax, qword [rsi]
lea r9, [rbp - 0x80]
mov r8, qword [str.BCryptSymmetricCipherImpl]
mov edx, 2
mov rcx, rsi
call qword [rax + 0x18]
nop
lea rcx, [rbp - 0x80]
call fcn.140003bc0
mov qword [rbx + 8], r13
mov qword [rbx + 0x10], r13
mov qword [rbx], rdi
mov qword [rsp + 0x50], rdi
lea rcx, [rsp + 0x50]
call fcn.140035800
nop
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x140038ad2
call fcn.140015ad0
nop
jmp 0x140038b4f
mov r8d, dword [rbp + 0xb0]
mov rax, qword [rsp + 0x58]
cmp r8, rax
jae 0x140038b15
mov rdx, qword [rsp + 0x60]
mov rcx, rbx
call fcn.140036f90
nop
mov qword [rsp + 0x50], rdi
lea rcx, [rsp + 0x50]
call fcn.140035800
nop
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x140038b13
call fcn.140015ad0
nop
jmp 0x140038b4f
mov qword [rbx + 8], rax
mov rax, qword [rsp + 0x60]
mov qword [rbx + 0x10], rax
mov qword [rsp + 0x58], r13
mov qword [rsp + 0x60], r13
mov qword [rbx], rdi
mov qword [rsp + 0x50], rdi
lea rcx, [rsp + 0x50]
call fcn.140035800
nop
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x140038b4f
call fcn.140015ad0
nop
mov rax, rbx
mov rbx, qword [rsp + 0x1b8]
add rsp, 0x170
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret