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

Disassembly:
push 0x58c
mov eax, 0x1023e21a
call fcn.102360df
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
and dword [ebp - 4], 0
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x1c]
mov esi, dword [ebp + 0x20]
mov dword [ebp - 0x58c], ecx
mov dword [ebp - 0x588], edx
mov dword [ebp - 0x564], eax
mov dword [ebp - 0x570], esi
test ecx, ecx
je 0x100257cd
test edx, edx
jne 0x10025156
push str.InternalError
lea ecx, [ebp - 0x44]
call fcn.100047be
push str.Win32AESCryptoWriter:_Null_pointer_pbOut_exception
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 3
call fcn.100047be
lea eax, [ebp - 0x44]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x134]
call fcn.100d3840
push 0x102e88c4
lea eax, [ebp - 0x134]
jmp 0x1002580d
mov edi, dword [ebp + 0x24]
mov eax, edi
mov dword [ebp - 0x56c], edi
mov edi, dword [ebp + 0x28]
or eax, edi
mov dword [ebp - 0x568], edi
jne 0x10025174
test esi, esi
jne 0x10025178
jmp 0x10025199
test esi, esi
jne 0x10025199
and dword [ebp - 0x570], 0
xorps xmm0, xmm0
movlpd qword [ebp + 0x24], xmm0
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0x568], eax
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x56c], eax
push 0x24
call fcn.100d3840
pop ecx
mov edx, eax
xor eax, eax
push 9
pop ecx
mov edi, edx
rep stosd dword es:[edi], eax
mov ecx, edx
call fcn.10024df3
mov edi, eax
mov dword [ebp - 0x574], edi
push 0
push 0
push 0x102614cc
push edi
mov byte [ebp - 4], 5
call sub.bcrypt.dll_BCryptOpenAlgorithmProvider
mov esi, eax
test esi, esi
jns 0x10025221
push str.InternalError
lea ecx, [ebp - 0x44]
call fcn.100047be
push esi
lea eax, [ebp - 0x5c]
mov byte [ebp - 4], 6
push str.Win32AESCryptoWriter::Win32AESCryptoWriter:_BCrypt_Failed_to_open_symmetric_algorithm_provider____08x
push eax
lfence
call fcn.1000d1e8
add esp, 0xc
lea ecx, [ebp - 0x44]
push ecx
lfence
push eax
lea ecx, [ebp - 0x194]
mov byte [ebp - 4], 7
call fcn.100d3840
push 0x102e88c4
lea eax, [ebp - 0x194]
jmp 0x1002580d
xor eax, eax
push eax
mov dword [ebp - 0x578], eax
mov dword [ebp - 0x580], eax
lea eax, [ebp - 0x580]
push eax
push 4
lea eax, [ebp - 0x578]
push eax
push str.BlockLength
push dword [edi]
call sub.bcrypt.dll_BCryptGetProperty
mov esi, eax
test esi, esi
jns 0x1002529f
push str.InternalError
lea ecx, [ebp - 0x44]
call fcn.100047be
push esi
lea eax, [ebp - 0x5c]
mov byte [ebp - 4], 8
push str.Win32AESCryptoWriter::Win32AESCryptoWriter:_BCrypt_Failed_to_get_symmetric_block_length____08x
push eax
lfence
call fcn.1000d1e8
add esp, 0xc
lea ecx, [ebp - 0x44]
push ecx
lfence
push eax
lea ecx, [ebp - 0x1f4]
mov byte [ebp - 4], 9
call fcn.100d3840
push 0x102e88c4
lea eax, [ebp - 0x1f4]
jmp 0x1002580d
mov eax, dword [ebx + 0x10]
mov byte [ebp - 0x555], 0
sub eax, 0
je 0x10025332
sub eax, 1
je 0x1002531d
sub eax, 1
je 0x10025301
push str.InternalError
lea ecx, [ebp - 0x44]
call fcn.100047be
push str.Win32AESCryptoWriter::Win32AESCryptoWriter:_Unsupported_symmetric_algorithm.
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0xa
call fcn.100047be
lea eax, [ebp - 0x44]
mov byte [ebp - 4], 0xb
push eax
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x254]
call fcn.100d3840
push 0x102e88c4
lea eax, [ebp - 0x254]
jmp 0x1002580d
mov eax, dword [ebp - 0x578]
mov dword [ebp - 0x57c], str.ChainingModeCBC
mov dword [ebx + 0x14], eax
mov byte [ebp - 0x555], 1
jmp 0x1002533c
mov eax, dword [ebp - 0x578]
mov dword [ebp - 0x57c], str.ChainingModeCBC
mov dword [ebx + 0x14], eax
jmp 0x1002533c
mov dword [ebp - 0x57c], str.ChainingModeECB
cmp dword [ebp - 0x570], 0
je 0x100253b0
lea eax, [ebp - 0x55c]
push eax
push dword [ebp - 0x568]
push dword [ebp - 0x56c]
call fcn.10024dca
mov eax, dword [ebp - 0x55c]
add esp, 0xc
cmp eax, dword [ebx + 0x14]
je 0x100253b0
push str.InternalError
lea ecx, [ebp - 0x44]
call fcn.100047be
push str.Win32AESCryptoWriter:_Invalid_initial_vector_length
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0xc
call fcn.100047be
lea eax, [ebp - 0x44]
mov byte [ebp - 4], 0xd
push eax
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x2b4]
call fcn.100d3840
push 0x102e88c4
lea eax, [ebp - 0x2b4]
jmp 0x1002580d
mov eax, dword [ebx + 8]
sub eax, dword [ebx + 4]
push eax
push dword [ebx + 0x10]
call fcn.10025046
pop ecx
pop ecx
test al, al
jne 0x1002540a
push str.InternalError
lea ecx, [ebp - 0x44]
call fcn.100047be
push str.Win32AESCryptoWriter:_Invalid_key_length_cipher_key_
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0xe
call fcn.100047be
lea eax, [ebp - 0x44]
mov byte [ebp - 4], 0xf
push eax
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x314]
call fcn.100d3840
push 0x102e88c4
lea eax, [ebp - 0x314]
jmp 0x1002580d
and dword [ebp - 0x584], 0
lea eax, [ebp - 0x580]
push 0
push eax
push 4
lea eax, [ebp - 0x584]
push eax
push str.ObjectLength
push dword [edi]
call sub.bcrypt.dll_BCryptGetProperty
mov esi, eax
test esi, esi
jns 0x10025482
push str.InternalError
lea ecx, [ebp - 0x44]
call fcn.100047be
push esi
lea eax, [ebp - 0x5c]
mov byte [ebp - 4], 0x10
push str.Win32AESCryptoWriter::Win32AESCryptoWriter:_BCrypt_Failed_to_get_symmetric_key_size____08x
push eax
lfence
call fcn.1000d1e8
add esp, 0xc
lea ecx, [ebp - 0x44]
push ecx
lfence
push eax
lea ecx, [ebp - 0x374]
mov byte [ebp - 4], 0x11
call fcn.100d3840
push 0x102e88c4
lea eax, [ebp - 0x374]
jmp 0x1002580d
mov edi, dword [ebp - 0x584]
xor eax, eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
test edi, edi
je 0x100254d7
cmp edi, 0x7fffffff
ja 0x10025813
lfence
push edi
cmp edi, 0x1000
jb 0x100254b6
call fcn.100038ad
jmp 0x100254bb
call fcn.100d3840
pop ecx
push edi
lfence
lea esi, [eax + edi]
mov dword [ebp - 0x20], eax
push 0
push eax
mov dword [ebp - 0x18], esi
call fcn.10008a17
add esp, 0xc
mov dword [ebp - 0x1c], esi
mov esi, dword [ebp - 0x574]
lea eax, [ebp - 0x20]
push eax
lea ecx, [esi + 0xc]
call fcn.100d3840
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x1002553d
mov eax, dword [ebp - 0x18]
sub eax, ecx
mov dword [ebp - 0x55c], ecx
mov dword [ebp - 0x560], eax
cmp eax, 0x1000
jb 0x10025529
lea eax, [ebp - 0x560]
push eax
lea eax, [ebp - 0x55c]
push eax
call fcn.10006a87
mov eax, dword [ebp - 0x560]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x55c]
push eax
push ecx
call fcn.100d3840
xor eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov ecx, dword [ebx + 8]
sub ecx, dword [ebx + 4]
mov eax, dword [esi + 0x10]
mov edx, dword [ebp - 0x574]
sub eax, dword [esi + 0xc]
push 0
push ecx
push dword [ebx + 4]
lea edi, [edx + 4]
push eax
push dword [esi + 0xc]
push edi
push dword [edx]
call sub.bcrypt.dll_BCryptGenerateSymmetricKey
mov esi, eax
test esi, esi
jns 0x100255b7
push str.InternalError
lea ecx, [ebp - 0x44]
call fcn.100047be
push esi
lea eax, [ebp - 0x5c]
mov byte [ebp - 4], 0x12
push str.Win32AESCryptoWriter::Win32AESCryptoWriter:_BCrypt_Failed_to_generate_session_key____08x
push eax
lfence
call fcn.1000d1e8
add esp, 0xc
lea ecx, [ebp - 0x44]
push ecx
lfence
push eax
lea ecx, [ebp - 0x3d4]
mov byte [ebp - 4], 0x13
call fcn.100d3840
push 0x102e88c4
lea eax, [ebp - 0x3d4]
jmp 0x1002580d
push 0
push 0x20
push dword [ebp - 0x57c]
push str.ChainingMode
push dword [edi]
call sub.bcrypt.dll_BCryptSetProperty
mov esi, eax
test esi, esi
jns 0x10025620
push str.InternalError
lea ecx, [ebp - 0x44]
call fcn.100047be
push esi
lea eax, [ebp - 0x5c]
mov byte [ebp - 4], 0x14
push str.Win32AESCryptoWriter::Win32AESCryptoWriter:_BCrypt_Failed_to_set_symmetric_algorithm_chaining_mode____08x
push eax
lfence
call fcn.1000d1e8
add esp, 0xc
lea ecx, [ebp - 0x44]
push ecx
lfence
push eax
lea ecx, [ebp - 0x434]
mov byte [ebp - 4], 0x15
call fcn.100d3840
push 0x102e88c4
lea eax, [ebp - 0x434]
jmp 0x1002580d
mov ebx, dword [ebp - 0x564]
lea eax, [ebp - 0x55c]
movzx esi, byte [ebp - 0x555]
and dword [ebp - 0x594], 0
push eax
push dword [ebx + 4]
push dword [ebx]
call fcn.10024dca
add esp, 0xc
lea eax, [ebp - 0x564]
push eax
push dword [ebp - 0x568]
push dword [ebp - 0x56c]
call fcn.10024dca
add esp, 0xc
lea eax, [ebp - 0x560]
push eax
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.10024dca
add esp, 0xc
lea eax, [ebp - 0x594]
cmp byte [ebp + 8], 0
push esi
push eax
push dword [ebp - 0x55c]
push dword [ebp - 0x588]
push dword [ebp - 0x564]
push dword [ebp - 0x570]
push 0
push dword [ebp - 0x560]
push dword [ebp - 0x58c]
push dword [edi]
je 0x100256b5
call sub.bcrypt.dll_BCryptEncrypt
jmp 0x100256ba
call sub.bcrypt.dll_BCryptDecrypt
mov esi, eax
test esi, esi
jns 0x1002570d
push str.InternalError
lea ecx, [ebp - 0x44]
call fcn.100047be
push esi
lea eax, [ebp - 0x5c]
mov byte [ebp - 4], 0x16
push str.Win32AESCryptoWriter::Win32AESCryptoWriter:_BCrypt_Failed_to_encrypt_symmetric_data____08x
push eax
lfence
call fcn.1000d1e8
add esp, 0xc
lea ecx, [ebp - 0x44]
push ecx
lfence
push eax
lea ecx, [ebp - 0x494]
mov byte [ebp - 4], 0x17
call fcn.100d3840
push 0x102e88c4
lea eax, [ebp - 0x494]
jmp 0x1002580d
mov eax, dword [ebp - 0x594]
lea ecx, [ebp - 0x574]
and dword [ebx + 4], 0
mov dword [ebx], eax
mov eax, dword [ebp - 0x574]
push eax
call fcn.10024fa7
call fcn.10236031
ret 0x24
push str.InternalError
lea ecx, [ebp - 0x2c]
call fcn.100047be
push str.Win32AESCryptoWriter:_Null_pointer_pbIn_exception
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 1
call fcn.100047be
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0xd4]
call fcn.100d3840
push 0x102e88c4
lea eax, [ebp - 0xd4]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
call fcn.10009a88
int3