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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x84
mov eax, dword [0x10188068]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x18]
xorps xmm0, xmm0
push ebx
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0x20]
push esi
mov dword [ebp - 0x2c], eax
xor esi, esi
mov eax, dword [ebp + 0x28]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 0x2c]
push 0x40
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x84]
push esi
push eax
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x30], esi
movq qword [ebp - 0x10], xmm0
mov dword [ebp - 8], esi
call fcn.1002ae80
add esp, 0xc
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x18], esi
call fcn.1001a1e0
test eax, eax
jne 0x10019e51
test edi, edi
je 0x10019e3f
mov edi, dword [ebp + 0xc]
cmp edi, 0x10
je 0x10019bf0
cmp edi, 0x18
je 0x10019bf0
cmp edi, 0x20
je 0x10019bf0
push eax
push eax
push eax
push eax
push 0xfffffda7
jmp 0x10019e4c
test ebx, ebx
je 0x10019e3f
cmp dword [ebp + 0x14], 0xc
jb 0x10019e3f
mov ebx, dword [ebp + 0x1c]
cmp dword [ebp - 0x34], esi
jne 0x10019c12
test ebx, ebx
jne 0x10019e3f
cmp dword [ebp - 0x2c], esi
je 0x10019e3f
cmp dword [ebp + 0x24], esi
jbe 0x10019e3f
cmp dword [ebp - 0x38], esi
je 0x10019e3f
push 0
push 0
cmp dword [ebp - 0x3c], esi
je 0x10019e43
push 0x1010d938
lea eax, [ebp - 0x14]
push eax
call sub.bcrypt.dll_BCryptOpenAlgorithmProvider
push 0
test eax, eax
jns 0x10019c5d
push 0
push 0
push eax
call fcn.100091d0
jmp 0x10019e51
push 0x20
push str.ChainingModeGCM
push str.ChainingMode
push dword [ebp - 0x14]
call sub.bcrypt.dll_BCryptSetProperty
push 0
test eax, eax
jns 0x10019c86
push 0
push 0
push eax
call fcn.100091d0
jmp 0x10019e51
lea eax, [ebp - 0x30]
push eax
push 4
lea eax, [ebp - 0x1c]
push eax
push str.BlockLength
push dword [ebp - 0x14]
call sub.bcrypt.dll_BCryptGetProperty
push 0
test eax, eax
jns 0x10019cb2
push 0
push 0
push eax
call fcn.100091d0
jmp 0x10019e51
lea eax, [ebp - 0x30]
push eax
push 0xc
lea eax, [ebp - 0x10]
push eax
push str.AuthTagLength
push dword [ebp - 0x14]
call sub.bcrypt.dll_BCryptGetProperty
push 0
test eax, eax
jns 0x10019cde
push 0
push 0
push eax
call fcn.100091d0
jmp 0x10019e51
push edi
push dword [ebp - 0x40]
lea eax, [ebp - 0x24]
push 0
push 0
push eax
push dword [ebp - 0x14]
call sub.bcrypt.dll_BCryptGenerateSymmetricKey
test eax, eax
jns 0x10019d07
push 0
push 0
push 0
push eax
call fcn.100091d0
jmp 0x10019e51
mov eax, dword [ebp + 0x14]
lea ecx, [ebp - 0x7c]
push ecx
push eax
push dword [ebp - 0x44]
mov dword [ebp - 0x84], 0x40
push 1
mov dword [ebp - 0x80], 1
mov dword [ebp - 0x78], eax
call fcn.10009980
test eax, eax
jne 0x10019e51
lea eax, [ebp - 0x74]
mov dword [ebp - 0x70], ebx
push eax
push ebx
push dword [ebp - 0x34]
push 1
call fcn.10009980
test eax, eax
jne 0x10019e51
mov eax, dword [ebp - 0xc]
lea ecx, [ebp - 0x6c]
push ecx
push eax
mov dword [ebp - 0x68], eax
call fcn.100097c0
test eax, eax
jne 0x10019e51
mov eax, dword [ebp - 0xc]
lea ecx, [ebp - 0x64]
push ecx
push eax
mov dword [ebp - 0x60], eax
call fcn.100097c0
test eax, eax
jne 0x10019e51
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x1c]
call fcn.100097c0
test eax, eax
jne 0x10019e51
mov ebx, dword [ebp + 0x24]
push eax
lea eax, [ebp - 0x20]
push eax
push 0
push 0
push dword [ebp - 0x1c]
lea eax, [ebp - 0x84]
push dword [ebp - 0x28]
push eax
push ebx
push dword [ebp - 0x2c]
push dword [ebp - 0x24]
call sub.bcrypt.dll_BCryptEncrypt
test eax, eax
jns 0x10019dcd
push 0
push 0
push 0
push eax
call fcn.100091d0
jmp 0x10019e51
mov edi, dword [ebp - 0x20]
lea eax, [ebp - 0x18]
add edi, dword [ebp - 0x68]
push eax
push edi
call fcn.100097c0
test eax, eax
jne 0x10019e51
push eax
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x20]
lea eax, [ebp - 0x84]
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
push dword [ebp - 0x28]
push eax
push ebx
push dword [ebp - 0x2c]
push dword [ebp - 0x24]
call sub.bcrypt.dll_BCryptEncrypt
test eax, eax
jns 0x10019e17
push 0
push 0
push 0
push eax
call fcn.100091d0
jmp 0x10019e51
push dword [ebp - 0x68]
mov eax, dword [ebp - 0x20]
push dword [ebp - 0x6c]
add eax, dword [ebp - 0x18]
push eax
call fcn.10009d90
test eax, eax
jne 0x10019e51
mov ecx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x18], esi
mov dword [ecx], eax
mov eax, dword [ebp - 0x3c]
mov dword [eax], edi
jmp 0x10019e53
push 0
push 0
push 0
push 0
push 0xffffff37
call sym.NBUidai.dll_NBErrorsSetLastA
mov esi, eax
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x10019e60
push eax
call sub.bcrypt.dll_BCryptDestroyKey
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x10019e6f
push 0
push eax
call sub.bcrypt.dll_BCryptCloseAlgorithmProvider
mov eax, dword [ebp - 0x7c]
test eax, eax
je 0x10019e7c
push eax
call fcn.10009af0
mov eax, dword [ebp - 0x74]
test eax, eax
je 0x10019e89
push eax
call fcn.10009af0
mov eax, dword [ebp - 0x64]
test eax, eax
je 0x10019e96
push eax
call fcn.10009af0
mov eax, dword [ebp - 0x6c]
test eax, eax
je 0x10019ea3
push eax
call fcn.10009af0
push dword [ebp - 0x18]
call fcn.10009af0
push dword [ebp - 0x28]
call fcn.10009af0
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10029ae5
mov esp, ebp
pop ebp
ret 0x28