Function at 0x100197c0
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 + 0x10]
xorps xmm0, xmm0
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0x20]
push esi
mov dword [ebp - 0x38], eax
xor esi, esi
mov eax, dword [ebp + 0x28]
push edi
mov edi, dword [ebp + 0x24]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 0x2c]
push 0x40
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x84]
push esi
push eax
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x2c], 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 0x10019aca
test ebx, ebx
je 0x10019ab8
mov ebx, dword [ebp + 0xc]
cmp ebx, 0x10
je 0x10019863
cmp ebx, 0x18
je 0x10019863
cmp ebx, 0x20
je 0x10019863
push eax
push eax
push eax
push eax
push 0xfffffda7
jmp 0x10019ac5
cmp dword [ebp - 0x30], esi
je 0x10019ab8
cmp dword [ebp + 0x14], 0xc
jb 0x10019ab8
cmp dword [ebp - 0x34], esi
jne 0x10019884
cmp dword [ebp + 0x1c], esi
jne 0x10019ab8
cmp dword [ebp - 0x38], esi
je 0x10019ab8
test edi, edi
je 0x10019ab8
cmp dword [ebp - 0x3c], esi
je 0x10019ab8
push 0
push 0
cmp dword [ebp - 0x40], esi
je 0x10019abc
push 0x1010d938
lea eax, [ebp - 0x14]
push eax
call sub.bcrypt.dll_BCryptOpenAlgorithmProvider
push 0
test eax, eax
jns 0x100198ce
push 0
push 0
push eax
call fcn.100091d0
jmp 0x10019aca
push 0x20
push str.ChainingModeGCM
push str.ChainingMode
push dword [ebp - 0x14]
call sub.bcrypt.dll_BCryptSetProperty
push 0
test eax, eax
jns 0x100198f7
push 0
push 0
push eax
call fcn.100091d0
jmp 0x10019aca
lea eax, [ebp - 0x2c]
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 0x10019923
push 0
push 0
push eax
call fcn.100091d0
jmp 0x10019aca
lea eax, [ebp - 0x2c]
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 0x1001994f
push 0
push 0
push eax
call fcn.100091d0
jmp 0x10019aca
push ebx
push dword [ebp - 0x44]
lea eax, [ebp - 0x24]
push 0
push 0
push eax
push dword [ebp - 0x14]
call sub.bcrypt.dll_BCryptGenerateSymmetricKey
test eax, eax
jns 0x10019978
push 0
push 0
push 0
push eax
call fcn.100091d0
jmp 0x10019aca
mov eax, dword [ebp + 0x14]
lea ecx, [ebp - 0x7c]
push ecx
push eax
push dword [ebp - 0x30]
mov dword [ebp - 0x84], 0x40
push 1
mov dword [ebp - 0x80], 1
mov dword [ebp - 0x78], eax
call fcn.10009980
test eax, eax
jne 0x10019aca
mov eax, dword [ebp + 0x1c]
lea ecx, [ebp - 0x74]
push ecx
push eax
push dword [ebp - 0x34]
mov dword [ebp - 0x70], eax
push 1
call fcn.10009980
test eax, eax
jne 0x10019aca
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x68], ecx
cmp edi, ecx
ja 0x100199db
push eax
push eax
push eax
push eax
push 0xffffff36
jmp 0x10019ac5
mov ebx, dword [ebp - 0x38]
lea eax, [ebp - 0x6c]
push eax
mov eax, edi
sub eax, ecx
push ecx
add eax, ebx
push eax
push 1
call fcn.10009980
test eax, eax
jne 0x10019aca
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 0x10019aca
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x1c]
call fcn.100097c0
test eax, eax
jne 0x10019aca
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
mov eax, edi
sub eax, dword [ebp - 0x68]
push eax
push ebx
push dword [ebp - 0x24]
call sub.bcrypt.dll_BCryptDecrypt
test eax, eax
jns 0x10019a5c
push 0
push 0
push 0
push eax
call fcn.100091d0
jmp 0x10019aca
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x20]
call fcn.100097c0
test eax, eax
jne 0x10019aca
sub edi, dword [ebp - 0x68]
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 edi
push ebx
push dword [ebp - 0x24]
call sub.bcrypt.dll_BCryptDecrypt
test eax, eax
jns 0x10019aa3
push 0
push 0
push 0
push eax
call fcn.100091d0
jmp 0x10019aca
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x18], esi
mov dword [ecx], eax
mov ecx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x20]
mov dword [ecx], eax
jmp 0x10019acc
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 0x10019ad9
push eax
call sub.bcrypt.dll_BCryptDestroyKey
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x10019ae8
push 0
push eax
call sub.bcrypt.dll_BCryptCloseAlgorithmProvider
mov eax, dword [ebp - 0x7c]
test eax, eax
je 0x10019af5
push eax
call fcn.10009af0
mov eax, dword [ebp - 0x74]
test eax, eax
je 0x10019b02
push eax
call fcn.10009af0
mov eax, dword [ebp - 0x64]
test eax, eax
je 0x10019b0f
push eax
call fcn.10009af0
mov eax, dword [ebp - 0x6c]
test eax, eax
je 0x10019b1c
push eax
call fcn.10009af0
push dword [ebp - 0x28]
call fcn.10009af0
push dword [ebp - 0x18]
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