Function at 0x4a21a0
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
mov eax, dword [0x5603e8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 8]
push 0xf0000000
push 1
push 0
push 0
lea edx, [ebp - 0x88]
push edx
mov dword [ebp - 0x8c], eax
mov dword [ebp - 0x80], ecx
mov dword [ebp - 0x88], 0
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x4a2433
lea eax, [ebp - 0x1c]
mov ecx, eax
push ecx
lea edx, [ebp - 0x88]
push edx
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0x1c], vtable.._AV___Impl_no_alloc1_U___Callable_obj_V_lambda2___A0x6b3e3a81_Crypt_Internal_W10mdp___0A__tr1_std__XPAK_tr1_std__.0
mov dword [ebp - 0xc], eax
call fcn.0049ea80
mov ecx, dword [ebp - 0xc]
test ecx, ecx
je 0x4a222d
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
lea edx, [ebp - 0x1c]
cmp ecx, edx
setne dl
movzx edx, dl
push edx
call eax
mov ecx, dword [ebp - 0x88]
push edi
push ecx
call fcn.004a1e70
lea edx, [ebp - 0x1c]
add esp, 8
mov dword [ebp - 0x84], eax
mov eax, edx
push eax
lea ecx, [ebp - 0x84]
push ecx
lea ecx, [ebp - 0x7c]
mov dword [ebp - 0x1c], vtable.._AV___Impl_no_alloc1_U___Callable_obj_V_lambda3___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 0x4a227c
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]
mov dword [ebp - 0x90], 4
test eax, eax
je 0x4a240d
push 0
lea ecx, [ebp - 0x90]
push ecx
lea edx, [ebp - 0x94]
push edx
push 8
push eax
call dword [sym.imp.ADVAPI32.dll_CryptGetKeyParam]
test eax, eax
je 0x4a240d
mov eax, dword [ebp - 0x94]
cmp eax, 0xffffffff
je 0x4a240d
mov ecx, dword [ebp - 0x80]
shr eax, 3
sub eax, 0xb
cmp ecx, eax
ja 0x4a240d
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ecx
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
lea ecx, [ebp - 0x3c]
call fcn.004a0cc0
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x4a236f
mov eax, dword [ebp - 0x80]
push eax
mov dword [esi], eax
mov eax, dword [ebp - 0x8c]
push eax
push ecx
call sub.MSVCR100.dll_memcpy
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x84]
mov edi, dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
add esp, 0xc
push 0
push esi
push ecx
push 0
push 1
push 0
push edx
call edi
test eax, eax
jne 0x4a23d8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
je 0x4a2351
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4a234e
mov eax, 1
push eax
jmp 0x4a2371
mov eax, dword [esi]
push eax
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
lea ecx, [ebp - 0x3c]
call fcn.0049cc70
mov eax, dword [ebp - 0x3c]
test eax, eax
jne 0x4a23a2
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
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
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b12f6
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x80]
mov edx, dword [ebp - 0x8c]
push ecx
push edx
push eax
call sub.MSVCR100.dll_memcpy
mov eax, dword [esi]
mov edx, dword [ebp - 0x3c]
add esp, 0xc
push eax
mov eax, dword [ebp - 0x84]
lea ecx, [ebp - 0x80]
push ecx
push edx
push 0
push 1
push 0
push eax
call edi
test eax, eax
jne 0x4a23d8
xor esi, esi
jmp 0x4a23e2
mov esi, dword [ebp - 0x3c]
mov dword [ebp - 0x3c], 0
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 0x4a241c
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 edi
xor ecx, ebp
xor eax, eax
pop esi
call fcn.004b12f6
mov esp, ebp
pop ebp
ret