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

Disassembly:
sub esp, 0x38
mov eax, dword [0x4995d0]
xor eax, esp
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x3c]
push ebp
mov ebp, dword [esp + 0x44]
push esi
mov esi, ecx
lea ecx, [esi + 2]
push edi
push ecx
mov dword [esp + 0x20], eax
call fcn.00434490
mov edx, dword [esp + 0x20]
push esi
mov edi, eax
push edx
push edi
call fcn.0045a250
add esp, 0x10
push 0x40
push 0x18
push 0
mov byte [edi + esi], 0
push 0
lea eax, [esp + 0x28]
mov byte [edi + esi + 1], 0
push eax
mov dword [esp + 0x2c], 0
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x406c0c
push edi
call fcn.00434485
add esp, 4
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.004541a5
add esp, 0x38
ret
mov eax, dword [0x480c88]
mov edx, dword [0x480c84]
mov dword [esp + 0x30], eax
xor ecx, ecx
lea eax, [esp + 0x14]
push eax
push 1
mov word [esp + 0x2a], cx
mov ecx, dword [0x480c8c]
push 0
mov dword [esp + 0x38], edx
mov edx, dword [0x480c90]
mov dword [esp + 0x40], ecx
push 0x1c
lea ecx, [esp + 0x30]
mov dword [esp + 0x48], edx
mov edx, dword [esp + 0x28]
push ecx
push edx
mov byte [esp + 0x38], 8
mov byte [esp + 0x39], 2
mov dword [esp + 0x3c], 0x660e
mov dword [esp + 0x40], 0x10
mov dword [esp + 0x2c], 0
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x406c8f
push edi
call fcn.00434485
mov eax, dword [esp + 0x1c]
add esp, 4
push 0
jmp 0x406dce
mov ecx, dword [esp + 0x14]
push 0
push 0x480c70
push 1
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
jne 0x406cc6
push edi
call fcn.00434485
mov edx, dword [esp + 0x18]
add esp, 4
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov eax, dword [esp + 0x18]
push 0
jmp 0x406dce
xor eax, eax
lea ecx, [esi + esi + 2]
mov dword [esp + 0xc], eax
push ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], esi
call fcn.00434490
mov edx, dword [esp + 0x10]
push edx
push edi
push eax
mov dword [esp + 0x20], eax
call fcn.0045a250
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
add esp, 0x10
mov byte [eax + ecx*2], 0
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0xc]
shr esi, 4
inc esi
shl esi, 4
push esi
mov byte [edx + eax*2 + 1], 0
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x10]
push ecx
push edx
xor esi, esi
push esi
push 1
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x406d59
push edi
call fcn.00434485
mov ecx, dword [esp + 0x14]
push ecx
call fcn.00434485
mov edx, dword [esp + 0x1c]
add esp, 8
push edx
mov dword [esp + 0x14], esi
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov eax, dword [esp + 0x18]
jmp 0x406dcd
mov eax, dword [esp + 0xc]
mov dword [ebp], eax
add eax, 2
push eax
call fcn.00434490
mov edx, dword [esp + 0x14]
mov dword [ebx], eax
mov ecx, dword [ebp]
push ecx
push edx
push eax
call fcn.0045a250
mov eax, dword [ebp]
mov ecx, dword [ebx]
mov byte [eax + ecx], 0
mov edx, dword [ebp]
mov eax, dword [ebx]
add esp, 0x10
mov byte [edx + eax + 1], 0
cmp edi, esi
je 0x406d9d
push edi
call fcn.00434485
add esp, 4
mov eax, dword [esp + 0x10]
cmp eax, esi
je 0x406db2
push eax
call fcn.00434485
add esp, 4
mov dword [esp + 0x10], esi
mov eax, dword [esp + 0x14]
cmp eax, esi
je 0x406dc5
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0x18]
cmp eax, esi
je 0x406dd5
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov ecx, dword [esp + 0x3c]
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.004541a5
add esp, 0x38
ret