Function at 0x408f90
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using des via winapi
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x45c
mov eax, dword [0x4441a0]
xor eax, ebp
mov dword [ebp - 0x18], eax
mov byte [ebp - 0x3c], 8
mov byte [ebp - 0x3b], 2
xor eax, eax
mov word [ebp - 0x3a], ax
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x38], ecx
mov edx, dword [ebp + 8]
mov dword [ebp - 0x454], edx
cmp dword [ebp - 0x454], 0x6601
je 0x408fe6
cmp dword [ebp - 0x454], 0x6603
je 0x408ff8
cmp dword [ebp - 0x454], 0x6609
je 0x408fef
jmp 0x408fff
mov dword [ebp - 0x34], 8
jmp 0x408fff
mov dword [ebp - 0x34], 0x10
jmp 0x408fff
mov dword [ebp - 0x34], 0x18
mov eax, dword [ebp - 0x34]
push eax
push 0
lea ecx, [ebp - 0x30]
push ecx
call fcn.004135e0
add esp, 0xc
mov edx, dword [ebp + 0x10]
cmp edx, dword [ebp - 0x34]
jbe 0x409024
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x458], eax
jmp 0x40902d
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x458], ecx
mov edx, dword [ebp - 0x458]
push edx
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x30]
push ecx
call fcn.00413ae0
add esp, 0xc
push 0
push 1
push 0x43cc48
push 0
lea edx, [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x4090c8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x44c], eax
cmp dword [ebp - 0x44c], 0x80090016
jne 0x4090c1
push 0x10
push 1
push 0x43cc48
push 0
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
push 8
push 1
push 0x43cc48
push 0
lea ecx, [ebp - 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
push 0
push 1
push 0x43cc48
push 0
lea edx, [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x4090bf
xor eax, eax
jmp 0x409295
jmp 0x4090c8
xor eax, eax
jmp 0x409295
lea eax, [ebp - 0xc]
push eax
push 0
push 0
push 0x24
lea ecx, [ebp - 0x3c]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x4090f7
push 0
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor eax, eax
jmp 0x409295
mov dword [ebp - 8], 2
push 0
lea ecx, [ebp - 8]
push ecx
push 4
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
jne 0x409131
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push 0
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor eax, eax
jmp 0x409295
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x44], 0x400
mov dword [ebp - 4], 0
mov dword [ebp - 0x450], 0
jmp 0x409164
mov edx, dword [ebp - 0x450]
add edx, 0x400
mov dword [ebp - 0x450], edx
mov eax, dword [ebp - 0x450]
cmp eax, dword [ebp + 0x18]
jae 0x409274
mov ecx, dword [ebp + 0x18]
sub ecx, dword [ebp - 0x450]
mov edx, 0x400
cmp edx, ecx
sbb eax, eax
add eax, 1
mov dword [ebp - 0x48], eax
je 0x40919e
mov ecx, dword [ebp + 0x18]
sub ecx, dword [ebp - 0x450]
mov dword [ebp - 0x45c], ecx
jmp 0x4091a8
mov dword [ebp - 0x45c], 0x400
mov edx, dword [ebp - 0x45c]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp + 0x14]
add ecx, dword [ebp - 0x450]
push ecx
lea edx, [ebp - 0x448]
push edx
call fcn.00413ae0
add esp, 0xc
cmp dword [ebp + 0x24], 0
je 0x4091f6
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x448]
push ecx
push 0
mov edx, dword [ebp - 0x48]
push edx
push 0
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov dword [ebp - 0x40], eax
jmp 0x40921b
push 0x400
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x448]
push edx
push 0
mov eax, dword [ebp - 0x48]
push eax
push 0
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x409223
jmp 0x409274
cmp dword [ebp + 0x1c], 0
je 0x409266
mov edx, dword [ebp - 4]
add edx, dword [ebp - 0x14]
mov eax, dword [ebp + 0x20]
cmp edx, dword [eax]
jbe 0x409241
mov dword [ebp - 0x40], 0
jmp 0x409274
mov ecx, dword [ebp - 0x14]
push ecx
lea edx, [ebp - 0x448]
push edx
mov eax, dword [ebp + 0x1c]
add eax, dword [ebp - 4]
push eax
call fcn.00413ae0
add esp, 0xc
mov ecx, dword [ebp - 4]
add ecx, dword [ebp - 0x14]
mov dword [ebp - 4], ecx
jmp 0x40926f
mov edx, dword [ebp - 4]
add edx, dword [ebp - 0x14]
mov dword [ebp - 4], edx
jmp 0x409152
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp - 4]
mov dword [eax], ecx
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push 0
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.00412dbc
mov esp, ebp
pop ebp
ret