Function at 0x1000629d
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 0x10006434
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 0x1000641f
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 0x1000640b
lea eax, [esi + 0xf]
and eax, 0xfffffff0
cmp dword [ebp + 8], ebx
je 0x1000634e
cmp eax, esi
jne 0x1000634e
add eax, edi
push eax
call fcn.10003bf6
mov edi, eax
cmp edi, ebx
mov dword [ebp - 0x10], edi
je 0x10006402
mov eax, dword [ebp + 0x10]
mov dword [ebp + 0x10], eax
mov dword [ebp - 0xc], ebx
mov dword [ebp + 0xc], ebx
push 0x10
pop eax
cmp esi, eax
mov dword [ebp - 4], eax
ja 0x1000637a
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
cmp dword [ebp + 8], ebx
lea eax, [ebp - 4]
je 0x100063b2
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 0x100063c7
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 0x100063d9
mov eax, dword [ebp - 4]
add dword [ebp - 0xc], eax
add edi, eax
cmp esi, ebx
jne 0x1000636d
jmp 0x100063e6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
mov dword [ebp + 0xc], eax
jne 0x100063f8
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 0x10006414
push dword [ebp - 0x10]
call fcn.10005dd8
jmp 0x10006414
mov dword [ebp + 0xc], 8
jmp 0x10006414
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0xc], eax
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x10006428
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 0x1000643d
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