Function at 0x50ffa0
Capabilities:
Encrypt data using aes via winapi

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x67a7a8
mov eax, dword fs:[0]
push eax
sub esp, 0x94
mov eax, dword [0x74b738]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov eax, dword [edi + 8]
lea ebx, [edi + 8]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x18], ecx
test eax, eax
je 0x50fffa
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov ecx, dword [ebp - 0x18]
mov dword [ebx], 0
mov byte [edi + 0x10], 0
cmp dword [edi + 4], 0
mov dword [ebp - 4], 0
je 0x510129
test ecx, ecx
je 0x510144
mov esi, dword [ebp + 0xc]
cmp esi, 0x10
je 0x510029
cmp esi, 0x18
je 0x510029
cmp esi, 0x20
jne 0x51015f
push 0x2c
lea eax, [ebp - 0x44]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x44], 0x208
mov byte [ebp - 4], 1
cmp esi, 0x10
je 0x510070
cmp esi, 0x18
je 0x510062
cmp esi, 0x20
jne 0x51017a
mov dword [ebp - 0x40], 0x6610
mov eax, esi
jmp 0x51007c
mov dword [ebp - 0x40], 0x660f
mov eax, 0x18
jmp 0x51007c
mov dword [ebp - 0x40], 0x660e
mov eax, 0x10
push esi
push dword [ebp - 0x18]
mov dword [ebp - 0x3c], eax
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.00510e80
add esp, 0x10
test eax, eax
jne 0x510195
push ebx
push 0
push 0
lea eax, [esi + 0xc]
push eax
lea eax, [ebp - 0x44]
push eax
push dword [edi + 4]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x5101b6
push 0
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 1
push eax
push 4
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x5101d7
jmp 0x5100f3
mov al, 1
lea ecx, [ebp - 0x44]
mov edx, 4
nop dword [eax]
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub edx, 1
jne 0x510100
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00669a1e
mov esp, ebp
pop ebp
ret 8
push str.SetKey:_Provider_is_not_valid
lea ecx, [ebp - 0x58]
call fcn.0050e2f0
push 0x70db0c
lea eax, [ebp - 0x58]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push str.SetKey:_Key_buffer_is_NULL
lea ecx, [ebp - 0x64]
call fcn.0050e2f0
push 0x70db0c
lea eax, [ebp - 0x64]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push str.SetKey:_Key_size_is_not_valid
lea ecx, [ebp - 0x70]
call fcn.0050e2f0
push 0x70db0c
lea eax, [ebp - 0x70]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push str.SetKey:_Key_size_is_not_valid
lea ecx, [ebp - 0x7c]
call fcn.0050e2f0
push 0x70db0c
lea eax, [ebp - 0x7c]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push str.SetKey:_Unable_to_copy_key
lea ecx, [ebp - 0x88]
call fcn.0050e2f0
push 0x70db0c
lea eax, [ebp - 0x88]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push str.SetKey:_Import_key_failed
lea ecx, [ebp - 0x94]
call fcn.0050e2f0
push 0x70db0c
lea eax, [ebp - 0x94]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push str.SetKey:_Set_CBC_mode_failed
lea ecx, [ebp - 0xa0]
call fcn.0050e2f0
push 0x70db0c
lea eax, [ebp - 0xa0]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push 0
push 0
call sub.VCRUNTIME140.dll__CxxThrowException
int3