Function at 0x408ed0
Capabilities:
Create new key via cryptacquirecontext
Encrypt or decrypt via wincrypt

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47c965
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x48
mov eax, dword [0x4b41e0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x50], edx
mov edi, ecx
test edi, edi
jne 0x408f21
mov dword [ebp - 0x40], ecx
xor al, al
jmp 0x409280
xor esi, esi
cmp word [edi], si
je 0x408f30
inc esi
cmp word [edi + esi*2], 0
jne 0x408f28
mov dword [ebp - 0x40], esi
cmp esi, 0x10
jae 0x408f3f
xor al, al
jmp 0x409280
xorps xmm0, xmm0
xor eax, eax
movlpd qword [ebp - 0x3c], xmm0
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 4], eax
cmp dword [edx], eax
jne 0x408f70
push 2
call fcn.0046a22b
mov edx, dword [ebp - 0x50]
add esp, 4
xor ecx, ecx
mov dword [edx], eax
mov word [eax], cx
mov esi, dword [ebp - 0x40]
mov dword [edx + 4], ecx
mov eax, dword [edx]
mov byte [edx + 8], 1
cmp edi, eax
jne 0x408f89
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], 0xffffffff
jmp 0x408f9c
test eax, eax
je 0x408f9c
push eax
call fcn.00469e73
mov esi, dword [ebp - 0x40]
add esp, 4
mov edx, dword [ebp - 0x50]
mov ecx, edx
mov al, 1
mov dword [ecx], 0
mov dword [edx + 4], 0
mov byte [edx + 8], al
cmp word [edi], 0x30
jne 0x408fcf
movzx eax, word [edi + 2]
mov ecx, eax
cmp eax, 0x78
je 0x408fc6
cmp ecx, 0x58
jne 0x408fcf
add edi, 4
sub esi, 2
mov dword [ebp - 0x40], esi
xorps xmm0, xmm0
add esi, 2
push esi
movlpd qword [ebp - 0x48], xmm0
call fcn.0046a22b
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], esi
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x40]
add ecx, 2
push ecx
push 0
push eax
call fcn.0046b980
add esp, 0x10
test edi, edi
je 0x409256
movzx eax, word [edi]
xor esi, esi
mov ecx, eax
test ax, ax
je 0x409018
inc esi
cmp word [edi + esi*2], 0
jne 0x409010
mov eax, esi
and eax, 0x80000001
jns 0x409026
dec eax
or eax, 0xfffffffe
inc eax
sub esi, eax
je 0x409256
mov eax, esi
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x34], eax
cmp ecx, 0x30
jne 0x409057
movzx ecx, word [edi + 2]
mov edx, ecx
cmp ecx, 0x78
je 0x40904d
cmp edx, 0x58
jne 0x409057
dec eax
add edi, 4
mov dword [ebp - 0x34], eax
sub esi, 2
mov ecx, dword [ebp - 0x40]
cmp ecx, eax
jl 0x409256
mov eax, dword [0x49eb64]
movups xmm0, xmmword [str.0123456789ABCDEFabcdef]
mov dword [ebp - 0x1c], eax
mov ax, word [0x49eb68]
push ecx
mov word [ebp - 0x18], ax
mov al, byte [0x49eb6a]
push 0
push dword [ebp - 0x48]
movups xmmword [ebp - 0x2c], xmm0
mov byte [ebp - 0x16], al
call fcn.0046b980
xor eax, eax
add esp, 0xc
mov dword [ebp - 0x30], eax
test esi, esi
jle 0x4090ef
nop
movzx edx, word [edi + eax*2]
xor ecx, ecx
movsx eax, byte [ebp + ecx - 0x2c]
cmp edx, eax
je 0x4090b7
inc ecx
cmp ecx, 0x16
jl 0x4090a6
jmp 0x4090e4
mov eax, dword [ebp - 0x30]
shr eax, 1
add eax, dword [ebp - 0x48]
mov dword [ebp - 0x54], eax
mov al, cl
sub al, 6
cmp ecx, 0xf
movzx edx, al
movzx eax, cl
cmovle edx, eax
test byte [ebp - 0x30], 1
mov eax, dword [ebp - 0x54]
mov cl, byte [eax]
jne 0x4090e0
shl dl, 4
or dl, cl
mov byte [eax], dl
mov eax, dword [ebp - 0x30]
inc eax
mov dword [ebp - 0x30], eax
cmp eax, esi
jl 0x4090a0
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x40], eax
test eax, eax
je 0x40925d
mov esi, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
lea eax, [ebp - 0x30]
push 0xf0000000
push 0x18
push str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
push 0
push eax
mov dword [ebp - 0x30], 0
call esi
test eax, eax
jne 0x409135
push 0xf0000000
push 0x18
push str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider__Prototype_
push eax
lea eax, [ebp - 0x30]
push eax
call esi
mov esi, dword [ebp - 0x30]
test esi, esi
je 0x40925d
sub esp, 8
mov dword [ebp - 0x34], 0
lea edx, [ebp - 0x34]
mov byte [ebp - 0x49], 0
mov ecx, esi
call fcn.00408e30
mov edi, dword [ebp - 0x48]
test al, al
je 0x409179
lea eax, [ebp - 0x40]
push eax
push edi
push 0
push 1
push 0
push dword [ebp - 0x34]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
setne byte [ebp - 0x49]
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x409187
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
cmp byte [ebp - 0x49], 0
je 0x40925d
mov eax, dword [ebp - 0x40]
mov byte [edi + eax], 0
mov eax, dword [ebp - 0x40]
mov byte [edi + eax + 1], 0
mov esi, dword [ebp - 0x40]
test esi, esi
jne 0x4091bc
cmp byte [edi], 0
je 0x4091bc
inc esi
cmp byte [esi + edi], 0
jne 0x4091b5
mov eax, dword [ebp - 0x50]
mov edx, 2
mov ecx, dword [eax]
mov dword [ebp - 0x54], ecx
xor ecx, ecx
mov dword [eax + 4], 0
lea eax, [esi + 2]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046a22b
mov edx, dword [ebp - 0x50]
lea ecx, [esi + 1]
xor edi, edi
add esp, 4
mov dword [edx], eax
mov word [eax + ecx*2], di
mov eax, dword [edx]
mov word [eax], di
mov eax, dword [ebp - 0x54]
mov edi, dword [ebp - 0x48]
test eax, eax
je 0x409213
push eax
call fcn.00469e73
mov edx, dword [ebp - 0x50]
lea ecx, [esi + 1]
add esp, 4
mov eax, dword [edx]
test eax, eax
je 0x40924e
test esi, esi
jne 0x40922a
xor ecx, ecx
mov word [eax], cx
mov al, byte [edx + 8]
mov byte [ebp - 0x49], al
jmp 0x409264
push ecx
push eax
push esi
push edi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edx, dword [ebp - 0x50]
xor esi, esi
test eax, eax
mov ecx, dword [edx]
mov word [ecx + eax*2], si
setg al
mov byte [edx + 8], al
mov al, byte [edx + 8]
mov byte [ebp - 0x49], al
jmp 0x409264
mov dword [ebp - 0x40], 0
mov edi, dword [ebp - 0x48]
mov byte [ebp - 0x49], 0
push edi
call fcn.00469e73
mov eax, dword [ebp - 0x58]
add esp, 4
test eax, eax
je 0x40927d
push eax
call fcn.00469e73
add esp, 4
mov al, byte [ebp - 0x49]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00469e65
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0xc