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

Disassembly:
push 0x138
mov eax, 0x1023ea9f
call fcn.10236073
mov esi, ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x13c], eax
mov dword [ebp - 0x144], ecx
test eax, eax
je 0x1002825e
test ecx, ecx
jne 0x10028063
push str.InternalError
lea ecx, [ebp - 0x28]
call fcn.100047be
push str.Win32SealedKeyWriter::EncryptDecrypt___Null_pointer_outData_exception
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 2
call fcn.100047be
mov byte [ebp - 4], 3
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x40]
jmp 0x10028287
mov eax, dword [ebp + 0xc]
xor edx, edx
div dword [esi + 0x10]
xor ebx, ebx
cmp byte [esi + 0x18], bl
je 0x1002808e
test edx, edx
setne bl
and dword [ebp - 0x138], 0
mov ecx, dword [esi + 4]
mov eax, dword [esi + 8]
cmp ecx, eax
jne 0x100280b9
xor ecx, ecx
xor eax, eax
jmp 0x100280bb
test edx, edx
je 0x10028077
push str.InternalError
lea ecx, [ebp - 0x28]
call fcn.100047be
push str.Win32SealedKeyWriter::EncryptDecrypt_Output_buffer_not_a_multiple_of_block_size_and_cipher_does_not_support_padding.
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 4
call fcn.100047be
mov byte [ebp - 4], 5
jmp 0x10028057
sub eax, ecx
push ebx
lea edx, [ebp - 0x138]
push edx
xor edx, edx
push edx
push edx
push eax
mov eax, dword [esi + 0x14]
push ecx
push edx
push dword [ebp + 0xc]
push dword [ebp - 0x13c]
push dword [eax + 4]
call sub.bcrypt.dll_BCryptEncrypt
mov dword [ebp - 0x134], eax
test eax, eax
jns 0x10028123
push str.InternalError
lea ecx, [ebp - 0x28]
lfence
call fcn.100047be
push dword [ebp - 0x134]
lea eax, [ebp - 0x40]
mov dword [ebp - 4], 6
push str.BCrypt_Failed_to_determine_required_output_buffer_size_for_sealed_key_encryption_decryption____08x
push eax
call fcn.1000d1e8
add esp, 0xc
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 7
push ecx
jmp 0x10028287
mov eax, dword [edi]
cmp dword [ebp - 0x138], eax
jbe 0x10028157
push str.InternalError
lea ecx, [ebp - 0x28]
call fcn.100047be
push str.Win32SealedKeyWriter::EncryptDecrypt_Output_buffer_not_large_enough.
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 8
call fcn.100047be
mov byte [ebp - 4], 9
jmp 0x10028057
mov dword [ebp - 0x140], eax
sub eax, dword [ebp - 0x138]
cmp byte [esi + 0x18], 0
je 0x10028187
test eax, eax
je 0x10028170
xor ebx, ebx
inc ebx
mov eax, dword [esi + 8]
lea ecx, [ebp - 0x134]
cmp dword [esi + 4], eax
jne 0x100281b5
and dword [ebp - 0x134], 0
jmp 0x100281be
test eax, eax
je 0x10028170
push str.InternalError
lea ecx, [ebp - 0x28]
call fcn.100047be
push str.Win32SealedKeyWriter::EncryptDecrypt_Output_buffer_not_filled_and_cipher_does_not_support_padding.
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 0xa
call fcn.100047be
mov byte [ebp - 4], 0xb
jmp 0x10028057
sub eax, dword [esi + 4]
mov dword [ebp - 0x134], eax
lfence
mov eax, dword [esi + 4]
xor edx, edx
cmp eax, dword [esi + 8]
push ebx
cmove eax, edx
lea edx, [ebp - 0x140]
push edx
push dword [edi]
push dword [ebp - 0x144]
push dword [ecx]
push eax
mov eax, dword [esi + 0x14]
push 0
push dword [ebp + 0xc]
push dword [ebp - 0x13c]
push dword [eax + 4]
call sub.bcrypt.dll_BCryptEncrypt
mov esi, eax
test esi, esi
jns 0x1002824e
push str.InternalError
lea ecx, [ebp - 0xb8]
lfence
call fcn.100047be
push esi
lea eax, [ebp - 0xd0]
mov dword [ebp - 4], 0xc
push str.BCrypt_Failed_to_encrypt_or_decrypt_block_with_sealed_key____08x
push eax
call fcn.1000d1e8
add esp, 0xc
lea ecx, [ebp - 0xb8]
mov byte [ebp - 4], 0xd
push ecx
push eax
lea ecx, [ebp - 0x130]
call fcn.10237091
push 0x102e88c4
lea eax, [ebp - 0x130]
jmp 0x1002829e
mov eax, dword [ebp - 0x140]
mov dword [edi], eax
call fcn.10236022
ret 0x10
push str.InternalError
lea ecx, [ebp - 0x40]
call fcn.100047be
and dword [ebp - 4], 0
lea ecx, [ebp - 0x28]
push str.Win32SealedKeyWriter::EncryptDecrypt___Null_pointer_inData_exception
call fcn.100047be
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0xa0]
call fcn.10237091
push 0x102e88c4
lea eax, [ebp - 0xa0]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
int3