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

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x80]
sub rsp, 0x180
mov rax, qword [0x140159040]
xor rax, rsp
mov qword [rbp + 0x78], rax
mov rsi, r8
mov r15, rdx
mov qword [rsp + 0x58], rcx
mov rdx, qword [r8 + 0x10]
cmp rdx, 0xf
ja 0x1400d88bb
mov byte [rsp + 0x50], 0
xorps xmm0, xmm0
movups xmmword [r15], xmm0
xor edi, edi
mov qword [r15 + 0x10], rdi
mov qword [r15 + 0x18], rdi
lea r8d, [rdi + 1]
lea rdx, [rsp + 0x50]
mov rcx, r15
call fcn.1400d16c0
jmp 0x1400d8f35
cmp qword [r8 + 0x18], 0xf
jbe 0x1400d88ca
mov r8, qword [r8]
mov rcx, r8
jmp 0x1400d88cd
mov rcx, rsi
add r8, 0xf
xorps xmm0, xmm0
movups xmmword [rbp + 0x58], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x68], xmm1
lea rax, [rcx + 3]
cmp rax, r8
jne 0x1400d88f7
mov qword [rbp + 0x70], 0xf
mov byte [rbp + 0x58], 0
jmp 0x1400d890a
sub r8, rax
mov rdx, rax
lea rcx, [rbp + 0x58]
call fcn.1400d16c0
mov rdx, qword [rsi + 0x10]
cmp qword [rsi + 0x18], 0xf
jbe 0x1400d891c
mov r14, qword [rsi]
mov rcx, r14
add r14, rdx
jmp 0x1400d8923
lea r14, [rdx + rsi]
mov rcx, rsi
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x18], xmm0
xor edi, edi
mov qword [rbp - 8], rdi
lea r13, [rcx + 0xf]
sub r14, r13
mov r12d, edi
je 0x1400d8968
mov rdx, r14
lea rcx, [rbp - 0x18]
call fcn.1400ddec0
mov rbx, qword [rbp - 0x18]
mov r8, r14
mov rdx, r13
mov rcx, rbx
call fcn.1401253f0
lea r12, [r14 + rbx]
mov rdx, r12
mov qword [rbp - 0x10], rdx
jmp 0x1400d896c
mov rdx, qword [rbp - 0x10]
sub r12d, dword [rbp - 0x18]
mov eax, 0x80
cmp r12d, eax
jge 0x1400d89b2
mov byte [rsp + 0x50], dil
sub eax, r12d
mov ebx, eax
cmp rdx, qword [rbp - 8]
je 0x1400d899a
mov byte [rdx], dil
mov rdx, qword [rbp - 0x10]
inc rdx
mov qword [rbp - 0x10], rdx
jmp 0x1400d89ac
lea r8, [rsp + 0x50]
lea rcx, [rbp - 0x18]
call fcn.1400e0a30
mov rdx, qword [rbp - 0x10]
sub rbx, 1
jne 0x1400d8984
mov qword [rsp + 0x60], rdi
mov qword [rsp + 0x68], rdi
xor eax, eax
mov qword [rsp + 0x70], rax
mov dword [rsp + 0x78], eax
mov dword [rbp], edi
mov dword [rbp - 0x20], edi
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x140141a28]
lea rcx, [rsp + 0x60]
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
mov ebx, eax
test eax, eax
js 0x1400d8ce9
mov dword [rsp + 0x20], edi
mov r9d, 0x20
lea r8, str.ChainingModeGCM
lea rdx, str.ChainingMode
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.bcrypt.dll_BCryptSetProperty]
mov ebx, eax
test eax, eax
js 0x1400d8ce9
mov dword [rsp + 0x28], edi
lea rax, [rbp - 0x20]
mov qword [rsp + 0x20], rax
mov r9d, 0xc
lea r8, [rsp + 0x70]
lea rdx, str.AuthTagLength
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
mov ebx, eax
test eax, eax
js 0x1400d8ce9
mov dword [rsp + 0x28], edi
lea rax, [rbp - 0x20]
mov qword [rsp + 0x20], rax
mov r9d, 4
lea r8, [rbp]
lea rdx, str.BlockLength
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
mov ebx, eax
test eax, eax
js 0x1400d8ce9
mov dword [rsp + 0x30], edi
mov rcx, qword [rsp + 0x58]
mov eax, dword [rcx + 0x20]
mov dword [rsp + 0x28], eax
mov rax, qword [rcx + 0x28]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x68]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.bcrypt.dll_BCryptGenerateSymmetricKey]
mov ebx, eax
test eax, eax
js 0x1400d8ce9
mov r14d, dword [rsp + 0x74]
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x38], xmm0
mov qword [rbp + 0x48], rdi
test r14, r14
je 0x1400d8af7
mov edx, r14d
lea rcx, [rbp + 0x38]
call fcn.1400ddec0
mov rbx, qword [rbp + 0x38]
mov r8d, r14d
xor edx, edx
mov rcx, rbx
call fcn.140125030
lea rax, [rbx + r14]
mov qword [rbp + 0x40], rax
mov r14d, dword [rsp + 0x70]
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x20], xmm0
mov qword [rbp + 0x30], rdi
mov ecx, edi
mov edx, edi
test r14, r14
je 0x1400d8b34
mov edx, r14d
lea rcx, [rbp + 0x20]
call fcn.1400ddec0
mov rbx, qword [rbp + 0x20]
mov r8d, r14d
xor edx, edx
mov rcx, rbx
call fcn.140125030
lea rcx, [rbx + r14]
mov edx, ecx
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x70], xmm0
movups xmmword [rbp - 0x60], xmm0
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x40], xmm0
mov qword [rbp - 0x30], rax
mov dword [rbp - 0x80], 0x58
mov dword [rbp - 0x7c], 1
lea rax, [rbp + 0x58]
cmp qword [rbp + 0x70], 0xf
jbe 0x1400d8b70
mov rax, qword [rbp + 0x58]
mov ecx, edx
mov qword [rbp - 0x78], rax
mov eax, dword [rbp + 0x68]
mov dword [rbp - 0x70], eax
mov rax, qword [rbp + 0x20]
mov qword [rbp - 0x58], rax
sub ecx, eax
mov dword [rbp - 0x50], ecx
mov rcx, qword [rbp + 0x38]
mov qword [rbp - 0x48], rcx
mov eax, dword [rbp + 0x40]
sub eax, ecx
mov dword [rbp - 0x40], eax
mov r14d, dword [rbp]
movdqu xmmword [rbp + 8], xmm0
mov qword [rbp + 0x18], rdi
mov ecx, edi
test r14, r14
je 0x1400d8bd0
mov edx, r14d
lea rcx, [rbp + 8]
call fcn.1400ddec0
mov rbx, qword [rbp + 8]
mov r8d, r14d
xor edx, edx
mov rcx, rbx
call fcn.140125030
lea rcx, [rbx + r14]
mov qword [rbp + 0x10], rcx
mov dword [rbp - 0x30], 1
mov rax, qword [rbp + 8]
sub ecx, eax
mov dword [rsp + 0x48], edi
lea rdx, [rbp - 0x20]
mov qword [rsp + 0x40], rdx
mov dword [rsp + 0x38], 0x40
mov rdx, qword [rbp - 0x18]
mov qword [rsp + 0x30], rdx
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x80]
mov r8d, 0x40
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.bcrypt.dll_BCryptDecrypt]
mov ebx, eax
test eax, eax
jns 0x1400d8daa
mov rcx, qword [rbp + 8]
test rcx, rcx
je 0x1400d8c69
mov rdx, qword [rbp + 0x18]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400d8c58
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400d8f73
call fcn.1400fc2f8
xorps xmm0, xmm0
movdqu xmmword [rbp + 8], xmm0
mov qword [rbp + 0x18], rdi
mov rcx, qword [rbp + 0x20]
test rcx, rcx
je 0x1400d8caf
mov rdx, qword [rbp + 0x30]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400d8c9e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400d8f73
call fcn.1400fc2f8
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x20], xmm0
mov qword [rbp + 0x30], rdi
mov rcx, qword [rbp + 0x38]
test rcx, rcx
je 0x1400d8ce9
mov rdx, qword [rbp + 0x48]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400d8ce4
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400d8f73
call fcn.1400fc2f8
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x1400d8cfb
xor edx, edx
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x1400d8d0b
call qword [sym.imp.bcrypt.dll_BCryptDestroyKey]
test ebx, ebx
jne 0x1400d8ec3
mov r8, qword [rbp - 0x10]
mov rdx, qword [rbp - 0x18]
lea rcx, [rbp + 0x38]
call fcn.1400dcd40
cmp r12d, 0x10
jbe 0x1400d8d2e
add r12d, 0xfffffff0
xorps xmm0, xmm0
movups xmmword [r15], xmm0
mov qword [r15 + 0x10], rdi
mov qword [r15 + 0x18], rdi
mov r8d, r12d
cmp qword [rbp + 0x48], r8
cmovb r8, qword [rbp + 0x48]
lea rdx, [rbp + 0x38]
cmp qword [rbp + 0x50], 0xf
cmova rdx, qword [rbp + 0x38]
mov rcx, r15
call fcn.1400d16c0
lea rcx, [rbp + 0x38]
call fcn.1400d1610
mov rcx, qword [rbp - 0x18]
test rcx, rcx
je 0x1400d8f2c
mov rdx, qword [rbp - 8]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400d8f1b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400d8f6d
jmp 0x1400d8f1b
mov rdx, qword [rbp - 0x18]
add rdx, 0x40
mov ecx, dword [rbp + 0x10]
mov rax, qword [rbp + 8]
sub ecx, eax
mov dword [rsp + 0x48], edi
lea r9, [rbp - 0x20]
mov qword [rsp + 0x40], r9
mov dword [rsp + 0x38], 0x40
mov qword [rsp + 0x30], rdx
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x80]
mov r8d, 0x40
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.bcrypt.dll_BCryptDecrypt]
mov ebx, eax
mov rcx, qword [rbp + 8]
test rcx, rcx
je 0x1400d8e3b
mov rdx, qword [rbp + 0x18]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400d8e2a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400d8f73
call fcn.1400fc2f8
xorps xmm0, xmm0
movdqu xmmword [rbp + 8], xmm0
mov qword [rbp + 0x18], rdi
mov rcx, qword [rbp + 0x20]
test rcx, rcx
je 0x1400d8e81
mov rdx, qword [rbp + 0x30]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400d8e70
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400d8f73
call fcn.1400fc2f8
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x20], xmm0
mov qword [rbp + 0x30], rdi
mov rcx, qword [rbp + 0x38]
test rcx, rcx
je 0x1400d8ce9
mov rdx, qword [rbp + 0x48]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400d8ce4
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400d8f73
jmp 0x1400d8ce4
mov byte [rsp + 0x50], dil
xorps xmm0, xmm0
movups xmmword [r15], xmm0
mov qword [r15 + 0x10], rdi
mov qword [r15 + 0x18], rdi
mov r8d, 1
lea rdx, [rsp + 0x50]
mov rcx, r15
call fcn.1400d16c0
mov rcx, qword [rbp - 0x18]
test rcx, rcx
je 0x1400d8f2c
mov rdx, qword [rbp - 8]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400d8f1b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400d8f67
call fcn.1400fc2f8
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x18], xmm0
mov qword [rbp - 8], rdi
lea rcx, [rbp + 0x58]
call fcn.1400d1610
mov rcx, rsi
call fcn.1400d1610
mov rax, r15
mov rcx, qword [rbp + 0x78]
xor rcx, rsp
call fcn.1400fbcf0
mov rbx, qword [rsp + 0x1d8]
add rsp, 0x180
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.140105498
int3
call fcn.140105498
int3
call fcn.140105498
int3