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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
push esi
push edi
mov esi, eax
push 6
xor eax, eax
pop ecx
xor ebx, ebx
mov byte [ebp - 0x40], bl
lea edi, [ebp - 0x3f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [ebp - 0x24], bl
lea edi, [ebp - 0x23]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0xf0000000
stosw word es:[edi], ax
push 0x18
push ebx
stosb byte es:[edi], al
push ebx
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x1000169f
push 0x10
pop edi
push edi
push dword [ebp + 0xc]
lea eax, [ebp - 0x34]
push eax
call sub.ntdll.dll_memcpy
add esp, 0xc
lea eax, [ebp - 8]
push eax
push ebx
push ebx
push 0x1c
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0x14]
mov dword [ebp - 0x38], edi
mov byte [ebp - 0x3f], 2
mov dword [ebp - 0x3c], 0x660e
mov byte [ebp - 0x40], 8
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x1000168a
push ebx
lea eax, [ebp - 0x24]
push eax
push 1
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x10001676
lea eax, [esi + 0xf]
and eax, 0xfffffff0
cmp dword [ebp + 8], ebx
je 0x100015b9
cmp eax, esi
jne 0x100015b9
add eax, edi
push eax
call fcn.100033dc
mov edi, eax
mov dword [ebp - 0x10], edi
cmp edi, ebx
je 0x1000166d
mov eax, dword [ebp + 0x10]
mov dword [ebp + 0x10], eax
mov dword [ebp - 0xc], ebx
mov dword [ebp + 0xc], ebx
push 0x10
pop eax
mov dword [ebp - 4], eax
cmp esi, eax
ja 0x100015e5
mov dword [ebp - 4], esi
push dword [ebp - 4]
push dword [ebp + 0x10]
push edi
call sub.ntdll.dll_memcpy
mov eax, dword [ebp - 4]
add dword [ebp + 0x10], eax
sub esi, eax
add esp, 0xc
lea eax, [ebp - 4]
cmp dword [ebp + 8], ebx
je 0x1000161d
push 0x20
push eax
xor eax, eax
cmp esi, ebx
sete al
push edi
push ebx
push eax
push ebx
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
jmp 0x10001632
push eax
xor eax, eax
cmp esi, ebx
sete al
push edi
push ebx
push eax
push ebx
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x10001644
mov eax, dword [ebp - 4]
add dword [ebp - 0xc], eax
add edi, eax
cmp esi, ebx
jne 0x100015d8
jmp 0x10001651
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0xc], eax
cmp eax, ebx
jne 0x10001663
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x10]
mov dword [eax], ecx
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp - 0xc]
mov dword [eax], ecx
jmp 0x1000167f
push dword [ebp - 0x10]
call fcn.100061da
jmp 0x1000167f
mov dword [ebp + 0xc], 8
jmp 0x1000167f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0xc], eax
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x10001693
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0xc], eax
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x100016a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0xc], eax
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
leave
ret 0x14