Function at 0x12aafb7
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using aes via winapi

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
xor edi, edi
xor ebx, ebx
cmp dword [ebp + 8], edi
mov esi, ecx
mov dword [ebp - 4], edi
je 0x12ab20a
cmp dword [ebp + 0x14], edi
je 0x12ab20a
push dword [esi + 0x14]
call fcn.01043bb7
push dword [esi + 0xc]
mov dword [esi + 0x14], edi
call fcn.01043bb7
lea eax, [esi + 0x20]
mov dword [ebp - 8], eax
mov eax, dword [eax]
cmp eax, edi
pop ecx
pop ecx
mov dword [esi + 0xc], edi
mov dword [esi + 0x10], edi
je 0x12ab010
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov eax, dword [ebp - 8]
mov dword [eax], edi
lea eax, [esi + 0x24]
cmp dword [eax], edi
mov dword [ebp - 0xc], eax
jne 0x12ab04a
push 0xf0000000
push 0x18
push edi
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x12ab04a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, edi
jle 0x12ab042
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 4], eax
jmp 0x12ab211
cmp dword [ebp + 0xc], edi
je 0x12ab0a8
push dword [esi + 0xc]
call fcn.01043bb7
mov eax, dword [ebp + 0xc]
pop ecx
mov dword [esi + 0xc], edi
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
cmp dx, di
jne 0x12ab061
sub eax, ecx
sar eax, 1
mov dword [esi + 0x10], eax
xor ecx, ecx
push 2
inc eax
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.01043ba8
cmp eax, edi
pop ecx
mov dword [esi + 0xc], eax
je 0x12ab0be
push dword [ebp + 0xc]
mov ecx, dword [esi + 0x10]
inc ecx
push ecx
push eax
call fcn.01050bf6
cmp eax, edi
mov dword [ebp - 4], eax
jne 0x12ab211
mov eax, dword [ebp + 0x10]
add eax, 0xc
push eax
mov dword [ebp + 0xc], eax
call fcn.01043ba8
mov ebx, eax
cmp ebx, edi
pop ecx
jne 0x12ab0ca
mov dword [ebp - 4], 0x8007000e
jmp 0x12ab211
cmp dword [ebp + 0x10], 0x10
mov byte [ebx], 8
mov byte [ebx + 1], 2
mov word [ebx + 2], di
jne 0x12ab129
mov eax, dword [ebp + 8]
mov ecx, 0x1021090
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x12ab109
cmp dx, di
je 0x12ab105
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x12ab109
add eax, 4
add ecx, 4
cmp dx, di
jne 0x12ab0e3
xor eax, eax
jmp 0x12ab10e
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, edi
jne 0x12ab1b7
mov dword [ebx + 4], 0x660e
mov dword [esi + 8], 1
jmp 0x12ab1ce
cmp dword [ebp + 0x10], 0x18
jne 0x12ab176
mov eax, dword [ebp + 8]
mov ecx, 0x1021038
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x12ab15d
cmp dx, di
je 0x12ab159
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x12ab15d
add eax, 4
add ecx, 4
cmp dx, di
jne 0x12ab137
xor eax, eax
jmp 0x12ab162
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, edi
jne 0x12ab1b7
mov dword [ebx + 4], 0x660f
mov dword [esi + 8], 2
jmp 0x12ab1ce
cmp dword [ebp + 0x10], 0x20
jne 0x12ab201
mov eax, dword [ebp + 8]
mov ecx, 0x1020fe0
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x12ab1ae
cmp dx, di
je 0x12ab1aa
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x12ab1ae
add eax, 4
add ecx, 4
cmp dx, di
jne 0x12ab188
xor eax, eax
jmp 0x12ab1b3
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, edi
je 0x12ab1c0
mov dword [ebp - 4], 0x80049e2f
jmp 0x12ab211
mov dword [ebx + 4], 0x6610
mov dword [esi + 8], 3
mov eax, dword [ebp + 0x10]
push eax
push dword [ebp + 0x14]
mov dword [ebx + 8], eax
lea eax, [ebx + 0xc]
push eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0xc]
add esp, 0xc
push dword [ebp - 8]
push edi
push edi
push dword [ebp + 0xc]
push ebx
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x12ab211
jmp 0x12ab02e
mov dword [ebp - 4], 0x80049e2e
jmp 0x12ab211
mov dword [ebp - 4], 0x80070057
push ebx
call fcn.01043bb7
mov eax, dword [ebp - 4]
pop ecx
pop edi
pop esi
pop ebx
leave
ret 0x10