Function at 0x406a24
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push 0x114
mov eax, 0x442f41
call fcn.0042bd2c
mov eax, dword [ebp + 0x14]
xor esi, esi
mov edi, dword [ebp + 8]
mov dword [ebp - 4], esi
mov ebx, dword [ecx + 8]
mov dword [ebp - 0xc0], ecx
mov dword [ebp - 0xb8], eax
test ebx, ebx
jne 0x406a93
push 0x80090003
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [ebp - 0xb8]
mov dword [ebp - 0xb8], str.Decrypt_1_:_Key_is_not_valid
push eax
lea ecx, [ebp - 0xfc]
call fcn.004282a1
mov dword [ebp - 0xfc], vtable.WinAESException.0
lea eax, [ebp - 0xfc]
push 0x45876c
push eax
call fcn.0042b404
test edi, edi
jne 0x406ad5
push 0x6f8
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [ebp - 0xb8]
mov dword [ebp - 0xb8], str.Decrypt_1_:_Buffer_is_NULL
push eax
lea ecx, [ebp - 0xcc]
call fcn.004282a1
mov dword [ebp - 0xcc], vtable.WinAESException.0
lea eax, [ebp - 0xcc]
push 0x45876c
jmp 0x406a8d
mov edx, dword [ebp + 0x10]
test edx, 0xf
je 0x406b21
push 0x80090005
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [ebp - 0xb8]
mov dword [ebp - 0xb8], str.Decrypt_1_:_Data_size_is_not_a_multple_of_block_size
push eax
lea ecx, [ebp - 0x108]
call fcn.004282a1
mov dword [ebp - method.std::logic_error.virtual_0], vtable.WinAESException.0
lea eax, [ebp - 0x108]
push 0x45876c
jmp 0x406a8d
lea eax, [edx - 0x10]
cmp dword [ebp + 0xc], eax
ja 0x406b6a
push 0x80090028
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [ebp - 0xb8]
mov dword [ebp - 0xb8], str.Decrypt_1_:_Buffer_is_too_small
push eax
lea ecx, [ebp - 0xf0]
call fcn.004282a1
mov dword [ebp - 0xf0], vtable.WinAESException.0
lea eax, [ebp - 0xf0]
push 0x45876c
jmp 0x406a8d
cmp byte [ecx + 0x10], 0
jne 0x406bb1
push 0x80090027
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [ebp - 0xb8]
mov dword [ebp - 0xb8], str.Decrypt_1_:_IV_has_not_been_set
push eax
lea ecx, [ebp - 0xd8]
call fcn.004282a1
mov dword [ebp - 0xd8], vtable.WinAESException.0
lea eax, [ebp - 0xd8]
push 0x45876c
jmp 0x406a8d
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], edx
push eax
push edi
push esi
push 1
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov ecx, eax
test ecx, ecx
jne 0x406ce5
push 0x98
lea eax, [ebp - 0xb4]
push esi
push eax
call fcn.0042b470
pop ecx
lea ecx, [ebp - 0xb4]
call fcn.00407803
mov edx, str.Decrypt_1_:_CryptDecrypt_failed__
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xb4]
call fcn.00409575
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
mov ecx, eax
call fcn.004071e6
mov edx, eax
lea ecx, [ebp - 0xb4]
call fcn.00409575
mov edx, str.__0x
lea ecx, [ebp - 0xb4]
call fcn.00409575
mov edi, eax
test edi, edi
jne 0x406c36
mov ecx, esi
jmp 0x406c3d
mov eax, dword [edi]
mov ecx, dword [eax + 4]
add ecx, edi
mov eax, dword [ecx + 0x14]
and eax, 0xfffff9ff
or eax, 0x800
mov dword [ecx + 0x14], eax
call ebx
push eax
mov ecx, edi
call fcn.00407736
mov edx, 0x44d71c
mov ecx, eax
call fcn.00409575
mov edx, dword [ebp - 0xb8]
lea eax, [ebp - 0x120]
push eax
lea ecx, [ebp - 0xb4]
mov dword [edx], esi
call fcn.004078cc
mov byte [ebp - 4], 2
cmp dword [eax + 0x14], 0x10
jb 0x406c89
mov eax, dword [eax]
mov dword [ebp - 0xbc], eax
lea ecx, [ebp - 0xe4]
lea eax, [ebp - 0xbc]
push eax
call fcn.004282a1
mov dword [ebp - 0xe4], vtable.WinAESException.0
lea eax, [ebp - 0xe4]
push 0x45876c
jmp 0x406a8d
mov edx, dword [ebp - 0xb8]
mov eax, dword [ebp - 0x1c]
mov dword [edx], eax
xor eax, eax
test ecx, ecx
setne al
call fcn.0042bc7e
ret 0x10