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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r12
mov dword [rax + 0x10], edx
push r13
push r14
push r15
sub rsp, 0x160
mov r12d, r9d
mov r13, r8
mov r15, rcx
xor eax, eax
mov qword [rsp + 0x88], rax
mov dword [rsp + 0x90], eax
xor r14b, r14b
xor dil, dil
mov byte [rsp + 0x50], dil
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x1400ffdd8]
lea rcx, [rsp + 0x58]
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
mov ebx, eax
test eax, eax
js 0x1400060b5
and dword [rsp + 0x20], 0
mov r9d, Ordinal_36
lea r8, str.ChainingModeGCM
lea rdx, str.ChainingMode
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.bcrypt.dll_BCryptSetProperty]
mov ebx, eax
test eax, eax
js 0x1400060a4
and dword [rsp + 0x28], 0
lea rax, [rsp + 0x1c8]
mov qword [rsp + 0x20], rax
mov r9d, 4
lea r8, [rsp + 0x1b8]
lea rdx, str.ObjectLength
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
mov ebx, eax
test ebx, ebx
jns 0x1400060b5
xor edx, edx
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
mov dword [rsp + 0x60], ebx
test ebx, ebx
js 0x14000619b
mov r14b, 1
xor r9d, r9d
xor r8d, r8d
lea rdx, str.SP800_108_CTR_HMAC
lea rcx, [rsp + 0x68]
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
mov ebx, eax
test eax, eax
js 0x140006127
and dword [rsp + 0x28], 0
lea rax, [rsp + 0x1e0]
mov qword [rsp + 0x20], rax
mov r9d, 4
lea r8, [rsp + 0x188]
lea rdx, str.ObjectLength
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
mov ebx, eax
test eax, eax
jns 0x140006127
xor edx, edx
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
mov dword [rsp + 0x60], ebx
test ebx, ebx
js 0x14000619b
mov dil, r14b
mov byte [rsp + 0x50], r14b
mov edx, dword [rsp + 0x188]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsp + 0x80], rax
test rax, rax
je 0x14000619b
and dword [rsp + 0x30], 0
mov dword [rsp + 0x28], Ordinal_36
mov qword [rsp + 0x20], r15
mov r9d, dword [rsp + 0x188]
mov r8, rax
lea rdx, [rsp + 0x78]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.bcrypt.dll_BCryptGenerateSymmetricKey]
mov ebx, eax
mov dword [rsp + 0x60], eax
test eax, eax
jns 0x14000619b
lea rcx, [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor r15d, r15d
test ebx, ebx
jns 0x1400061c6
test r14b, r14b
je 0x1400061b4
xor edx, edx
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
test dil, dil
je 0x1400061c6
xor edx, edx
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
mov dword [rsp + 0x54], ebx
test ebx, ebx
js 0x140006415
mov ecx, reloc.Cabinet.dll_FCIDestroy
mov qword [rsp + 0xb0], rcx
lea rax, str.SHA256
mov qword [rsp + 0xb8], rax
mov dword [rsp + 0xc0], SQLAllocHandle
mov dword [rsp + 0xc4], reloc.Cabinet.dll_FCIFlushCabinet
lea rax, str.IUMDATAPROTECT
mov qword [rsp + 0xc8], rax
mov dword [rsp + 0xd0], Ordinal_36
mov dword [rsp + 0xd4], ecx
mov rax, qword [rsp + 0x1b0]
mov qword [rsp + 0xd8], rax
mov dword [rsp + 0xa0], r15d
mov dword [rsp + 0xa4], 3
lea rax, [rsp + 0xb0]
mov qword [rsp + 0xa8], rax
mov dword [rsp + 0x28], r15d
lea rax, [rsp + 0x1c8]
mov qword [rsp + 0x20], rax
lea r9d, [rcx + 0x12]
lea r8, [rsp + 0x140]
lea rdx, [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.bcrypt.dll_BCryptKeyDerivation]
mov ebx, eax
mov dword [rsp + 0x54], eax
test eax, eax
js 0x1400063e2
mov edx, dword [rsp + 0x1b8]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x1400063e2
mov dword [rsp + 0x30], r15d
mov dword [rsp + 0x28], Ordinal_36
lea rax, [rsp + 0x140]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x1b8]
mov r8, rdi
lea rdx, [rsp + 0x70]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.bcrypt.dll_BCryptGenerateSymmetricKey]
mov ebx, eax
mov dword [rsp + 0x54], eax
test eax, eax
js 0x1400063d9
mov ebx, reloc.WLDAP32.dll_Ordinal_88
mov r8d, ebx
xor edx, edx
lea rcx, [rsp + 0xe0]
call fcn.1400c5520
mov dword [rsp + 0xe0], ebx
mov dword [rsp + 0xe4], 1
lea rax, [rsp + 0x88]
mov qword [rsp + 0xe8], rax
lea ecx, [rbx - 0x4c]
mov dword [rsp + 0xf0], ecx
mov rax, qword [rsp + 0x1a0]
mov qword [rsp + 0xf8], rax
mov eax, dword [rsp + 0x1a8]
mov dword [rsp + 0x100], eax
mov rax, qword [rsp + 0x1c0]
mov qword [rsp + 0x108], rax
mov dword [rsp + 0x110], SQLAllocHandle
mov dword [rsp + 0x48], r15d
lea rax, [rsp + 0x98]
mov qword [rsp + 0x40], rax
mov eax, dword [rsp + 0x1d8]
mov dword [rsp + 0x38], eax
mov rax, qword [rsp + 0x1d0]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ecx
lea rax, [rsp + 0x88]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0xe0]
mov r8d, r12d
mov rdx, r13
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.bcrypt.dll_BCryptDecrypt]
mov ebx, eax
mov dword [rsp + 0x54], eax
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.bcrypt.dll_BCryptDestroyKey]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.bcrypt.dll_BCryptDestroyKey]
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor edx, edx
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
xor edx, edx
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
jmp 0x14000641b
mov eax, ebx
lea r11, [rsp + 0x160]
mov rbx, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r13
ret