Function at 0x4a2450
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x90
mov eax, dword [0x5603e8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x14]
push 0xf0000000
push 1
push 0
push 0
lea ecx, [ebp - 0x80]
push ecx
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x80], 0
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x4a24a4
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b12f6
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x1c]
mov eax, edx
push eax
lea ecx, [ebp - 0x80]
push ecx
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0x1c], vtable.._AV___Impl_no_alloc1_U___Callable_obj_V_lambda4___A0x6b3e3a81_Crypt_Internal_W10mdp___0A__tr1_std__XPAK_tr1_std__.0
mov dword [ebp - 0xc], edx
call fcn.0049ea80
mov ecx, dword [ebp - 0xc]
test ecx, ecx
je 0x4a24da
mov edx, dword [ecx]
mov edx, dword [edx + 0xc]
lea eax, [ebp - 0x1c]
cmp ecx, eax
setne al
movzx eax, al
push eax
call edx
mov eax, dword [ebp - 0x80]
push esi
push eax
call fcn.004a2000
lea ecx, [ebp - 0x1c]
add esp, 8
mov edx, ecx
mov dword [ebp - 0x84], eax
push edx
lea eax, [ebp - 0x84]
mov dword [ebp - 0xc], ecx
push eax
lea ecx, [ebp - 0x7c]
mov dword [ebp - 0x1c], vtable.._AV___Impl_no_alloc1_U___Callable_obj_V_lambda5___A0x6b3e3a81_Crypt_Internal_W10mdp___0A__tr1_std__XPAK_tr1_std__.0
call fcn.0049ea80
mov ecx, dword [ebp - 0xc]
test ecx, ecx
je 0x4a2526
mov edx, dword [ecx]
mov edx, dword [edx + 0xc]
lea eax, [ebp - 0x1c]
cmp ecx, eax
setne al
movzx eax, al
push eax
call edx
mov eax, dword [ebp - 0x84]
push ebx
mov dword [ebp - 0x90], 4
test eax, eax
je 0x4a2617
push 0
lea ecx, [ebp - 0x90]
push ecx
lea edx, [ebp - 0x8c]
push edx
push 8
push eax
call dword [sym.imp.ADVAPI32.dll_CryptGetKeyParam]
test eax, eax
je 0x4a2617
mov esi, dword [ebp - 0x8c]
cmp esi, 0xffffffff
je 0x4a2617
mov ebx, dword [ebp + 0x10]
shr esi, 3
cmp ebx, esi
ja 0x4a2617
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
lea ecx, [ebp - 0x3c]
call fcn.004a0cc0
mov eax, dword [ebp - 0x3c]
test eax, eax
jne 0x4a25af
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea ecx, [ebp - 0x3c]
call fcn.0049efd0
jmp 0x4a262d
mov ecx, dword [ebp - 0x88]
push ebx
push ecx
push eax
mov dword [edi], esi
call sub.MSVCR100.dll_memcpy
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x84]
add esp, 0xc
push edi
push edx
push 0
push 1
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x4a25ea
mov esi, dword [ebp - 0x3c]
mov dword [ebp - 0x3c], 0
jmp 0x4a25ec
xor esi, esi
lea ecx, [ebp - 0x3c]
call fcn.0049efd0
lea ecx, [ebp - 0x7c]
call fcn.0049efd0
lea ecx, [ebp - 0x5c]
call fcn.0049efd0
pop ebx
pop edi
mov eax, esi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b12f6
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4a2626
mov eax, 0x18
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea ecx, [ebp - 0x7c]
call fcn.0049efd0
lea ecx, [ebp - 0x5c]
call fcn.0049efd0
mov ecx, dword [ebp - 4]
pop ebx
pop edi
xor ecx, ebp
xor eax, eax
pop esi
call fcn.004b12f6
mov esp, ebp
pop ebp
ret