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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
mov dword [rsp + 0x10], edx
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x160
mov r12d, r9d
mov r13, r8
mov r15, rcx
mov byte [rsp + 0x70], 0
xor eax, eax
mov qword [rsp + 0x71], rax
mov word [rsp + 0x79], ax
mov byte [rsp + 0x7b], al
xor r14b, r14b
xor sil, sil
mov byte [rsp + 0x50], sil
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x180030958]
lea rcx, [rsp + 0x58]
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
mov ebx, eax
test eax, eax
js 0x180001661
xor edi, edi
mov dword [rsp + 0x20], edi
lea r9d, [rdi + 0x20]
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 0x180001640
mov dword [rsp + 0x28], edi
lea rax, [rsp + 0x1d8]
mov qword [rsp + 0x20], rax
lea r9d, [rdi + 4]
lea r8, [rsp + 0x1c8]
lea rdx, str.ObjectLength
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
mov ebx, eax
test eax, eax
jns 0x18000164e
lea rcx, str.ERROR____BCryptGetProperty:_0x_08x_n
jmp 0x180001647
lea rcx, str.ERROR____BCryptSetProperty:_0x_08x_n
mov edx, eax
call fcn.1800023d0
test ebx, ebx
jns 0x180001671
xor edx, edx
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
jmp 0x180001671
mov edx, eax
lea rcx, str.ERROR____BCryptOpenAlgorithmProvider:_0x_08x_n
call fcn.1800023d0
xor edi, edi
mov dword [rsp + 0x60], ebx
test ebx, ebx
js 0x18000178f
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 0x1800016f2
mov dword [rsp + 0x28], edi
lea rax, [rsp + 0x1f0]
mov qword [rsp + 0x20], rax
mov r9d, 4
lea r8, [rsp + 0x198]
lea rdx, str.ObjectLength
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
mov ebx, eax
test eax, eax
jns 0x180001700
mov edx, eax
lea rcx, str.ERROR____BCryptGetProperty:_0x_08x_n
call fcn.1800023d0
xor edx, edx
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
jmp 0x180001700
mov edx, eax
lea rcx, str.ERROR____BCryptOpenAlgorithmProvider:_0x_08x_n
call fcn.1800023d0
mov dword [rsp + 0x60], ebx
test ebx, ebx
js 0x180001786
mov sil, 1
mov byte [rsp + 0x50], sil
mov edx, dword [rsp + 0x198]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsp + 0x90], rax
test rax, rax
je 0x18000179d
mov dword [rsp + 0x30], edi
mov dword [rsp + 0x28], 0x20
mov qword [rsp + 0x20], r15
mov r9d, dword [rsp + 0x198]
mov r8, rax
lea rdx, [rsp + 0x88]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.bcrypt.dll_BCryptGenerateSymmetricKey]
mov ebx, eax
mov dword [rsp + 0x60], eax
test eax, eax
jns 0x18000179d
mov edx, eax
lea rcx, str.ERROR____SkpImportMasterKeyInKdf:_0x_08x_n
call fcn.1800023d0
lea rcx, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x18000179d
lea rcx, str.ERROR____SkpOpenKdfProvider:_0x_08x_n
jmp 0x180001796
lea rcx, str.ERROR____SkpOpenAesGcmProvider:_0x_08x_n
mov edx, ebx
call fcn.1800023d0
test ebx, ebx
jns 0x1800017c5
test r14b, r14b
je 0x1800017b3
xor edx, edx
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
test sil, sil
je 0x1800017c5
xor edx, edx
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
mov dword [rsp + 0x54], ebx
test ebx, ebx
js 0x180001a45
mov qword [rsp + 0xb0], 0xe
lea rax, str.SHA256
mov qword [rsp + 0xb8], rax
mov dword [rsp + 0xc0], 0xf
mov dword [rsp + 0xc4], 0xd
lea rax, str.IUMDATAPROTECT
mov qword [rsp + 0xc8], rax
mov dword [rsp + 0xd0], 0x20
mov dword [rsp + 0xd4], 0xe
mov rax, qword [rsp + 0x1c0]
mov qword [rsp + 0xd8], rax
mov dword [rsp + 0xa0], edi
mov dword [rsp + 0xa4], 3
lea rax, [rsp + 0xb0]
mov qword [rsp + 0xa8], rax
mov dword [rsp + 0x28], edi
lea rax, [rsp + 0x1d8]
mov qword [rsp + 0x20], rax
mov r9d, 0x20
lea r8, [rsp + 0x140]
lea rdx, [rsp + 0xa0]
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.bcrypt.dll_BCryptKeyDerivation]
mov ebx, eax
mov dword [rsp + 0x54], eax
test eax, eax
js 0x1800019ff
mov edx, dword [rsp + 0x1c8]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x180001a0d
mov dword [rsp + 0x30], edi
mov dword [rsp + 0x28], 0x20
lea rax, [rsp + 0x140]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x1c8]
mov r8, rsi
lea rdx, [rsp + 0x80]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.bcrypt.dll_BCryptGenerateSymmetricKey]
mov ebx, eax
mov dword [rsp + 0x54], eax
test eax, eax
js 0x1800019e6
xor edx, edx
lea r8d, [rdx + 0x58]
lea rcx, [rsp + 0xe0]
call fcn.18000a9c0
mov dword [rsp + 0xe0], 0x58
mov dword [rsp + 0xe4], 1
lea rax, [rsp + 0x70]
mov qword [rsp + 0xe8], rax
mov dword [rsp + 0xf0], 0xc
mov rax, qword [rsp + 0x1b0]
mov qword [rsp + 0xf8], rax
mov eax, dword [rsp + 0x1b8]
mov dword [rsp + 0x100], eax
mov rax, qword [rsp + 0x1d0]
mov qword [rsp + 0x108], rax
mov dword [rsp + 0x110], 0x10
mov dword [rsp + 0x48], edi
lea rax, [rsp + 0x98]
mov qword [rsp + 0x40], rax
mov eax, dword [rsp + 0x1e8]
mov dword [rsp + 0x38], eax
mov rax, qword [rsp + 0x1e0]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0xc
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0xe0]
mov r8d, r12d
mov rdx, r13
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.bcrypt.dll_BCryptDecrypt]
mov ebx, eax
mov dword [rsp + 0x54], eax
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.bcrypt.dll_BCryptDestroyKey]
jmp 0x1800019f4
mov edx, eax
lea rcx, str.ERROR____BCryptGenerateSymmetricKey:_0x_08x_n
call fcn.1800023d0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x180001a0d
mov edx, eax
lea rcx, str.ERROR____SkpDeriveSymmetricKey:_0x_08x_n
call fcn.1800023d0
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.bcrypt.dll_BCryptDestroyKey]
mov rcx, qword [rsp + 0x90]
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 0x180001a53
mov edx, ebx
lea rcx, str.ERROR____SkpInitSymmetricEncryption:_0x_08x_n
call fcn.1800023d0
jmp 0x180001a65
mov eax, ebx
lea r11, [rsp + 0x160]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret