Function at 0x100052f6
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 0x1000548d
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 0x10005478
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 0x10005464
lea eax, [esi + 0xf]
and eax, 0xfffffff0
cmp dword [ebp + 8], ebx
je 0x100053a7
cmp eax, esi
jne 0x100053a7
add eax, edi
push eax
call fcn.10006a51
mov edi, eax
mov dword [ebp - 0x10], edi
cmp edi, ebx
je 0x1000545b
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 0x100053d3
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 0x1000540b
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 0x10005420
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 0x10005432
mov eax, dword [ebp - 4]
add dword [ebp - 0xc], eax
add edi, eax
cmp esi, ebx
jne 0x100053c6
jmp 0x1000543f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0xc], eax
cmp eax, ebx
jne 0x10005451
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 0x1000546d
push dword [ebp - 0x10]
call fcn.1000692b
jmp 0x1000546d
mov dword [ebp + 0xc], 8
jmp 0x1000546d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0xc], eax
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x10005481
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 0x10005496
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