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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x576d58
mov eax, dword fs:[0]
push eax
sub esp, 0xac
mov eax, dword [0x5c8128]
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 - 0x48], ecx
test eax, eax
je 0x46882a
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov ecx, dword [ebp - 0x48]
mov dword [ebx], 0
mov byte [edi + 0x10], 0
mov dword [ebp - 4], 0
cmp dword [edi + 4], 0
jne 0x468876
lea eax, [ebp - 0x54]
mov dword [ebp - 0x58], vtable.std::exception.0
push eax
lea eax, [ebp - 0x78]
mov dword [ebp - 0x78], str.SetKey:_Provider_is_not_valid
xorps xmm0, xmm0
mov byte [ebp - 0x74], 1
push eax
movq qword [ebp - 0x54], xmm0
call fcn.0051aae1
add esp, 8
mov dword [ebp - 0x58], vtable.WinAESException.0
lea eax, [ebp - 0x58]
push 0x5c4788
push eax
call fcn.00519b04
test ecx, ecx
jne 0x4688b9
lea eax, [ebp - 0x60]
mov dword [ebp - 0x64], vtable.std::exception.0
push eax
lea eax, [ebp - 0x80]
mov dword [ebp - 0x80], str.SetKey:_Key_buffer_is_NULL
xorps xmm0, xmm0
mov byte [ebp - 0x7c], 1
push eax
movq qword [ebp - 0x60], xmm0
call fcn.0051aae1
add esp, 8
mov dword [ebp - 0x64], vtable.WinAESException.0
lea eax, [ebp - 0x64]
push 0x5c4788
push eax
call fcn.00519b04
mov esi, dword [ebp + 0xc]
cmp esi, 0x10
je 0x4688ec
cmp esi, 0x18
je 0x4688ec
cmp esi, 0x20
je 0x4688ec
push str.SetKey:_Key_size_is_not_valid
lea ecx, [ebp - 0x94]
call fcn.00466bc0
push 0x5c4788
lea eax, [ebp - 0x94]
push eax
call fcn.00519b04
push 0x2c
lea eax, [ebp - 0x40]
push 0
push eax
call fcn.0051a560
add esp, 0xc
mov dword [ebp - 0x40], 0x208
mov byte [ebp - 4], 1
cmp esi, 0x10
je 0x468953
cmp esi, 0x18
je 0x468945
cmp esi, 0x20
je 0x468937
push str.SetKey:_Key_size_is_not_valid
lea ecx, [ebp - 0xa0]
call fcn.00466bc0
push 0x5c4788
lea eax, [ebp - 0xa0]
push eax
call fcn.00519b04
mov dword [ebp - 0x3c], 0x6610
mov edx, 0x20
jmp 0x46895f
mov dword [ebp - 0x3c], 0x660f
mov edx, 0x18
jmp 0x46895f
mov dword [ebp - 0x3c], 0x660e
mov edx, 0x10
push esi
push dword [ebp - 0x48]
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x38], edx
call fcn.0046de50
add esp, 8
test eax, eax
je 0x4689bd
lea eax, [ebp - 0x6c]
mov dword [ebp - 0x70], vtable.std::exception.0
push eax
lea eax, [ebp - 0x88]
mov dword [ebp - 0x88], str.SetKey:_Unable_to_copy_key
xorps xmm0, xmm0
mov byte [ebp - 0x84], 1
push eax
movq qword [ebp - 0x6c], xmm0
call fcn.0051aae1
add esp, 8
mov dword [ebp - 0x70], vtable.WinAESException.0
lea eax, [ebp - 0x70]
push 0x5c4788
push eax
call fcn.00519b04
push ebx
push 0
push 0
lea eax, [esi + 0xc]
push eax
lea eax, [ebp - 0x40]
push eax
push dword [edi + 4]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x4689f8
push str.SetKey:_Import_key_failed
lea ecx, [ebp - 0xac]
call fcn.00466bc0
push 0x5c4788
lea eax, [ebp - 0xac]
push eax
call fcn.00519b04
push 0
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 1
push eax
push 4
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
jne 0x468a55
push str.SetKey:_Set_CBC_mode_failed
lea ecx, [ebp - 0xb8]
call fcn.00466bc0
push 0x5c4788
lea eax, [ebp - 0xb8]
push eax
call fcn.00519b04
mov eax, dword [ebp - 0x4c]
test byte [eax + 0x14], 0x10
je 0x468a46
push 0
push 0
call fcn.00519b04
mov byte [ebp - 0x41], 0
mov eax, 0x468a50
ret
mov al, 1
lea ecx, [ebp - 0x40]
mov edx, 4
nop
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub edx, 1
jne 0x468a60
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.004f5c19
mov esp, ebp
pop ebp
ret 8