Function at 0x100039c5
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 0x10003b5c
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 0x10003b47
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 0x10003b33
lea eax, [esi + 0xf]
and eax, 0xfffffff0
cmp dword [ebp + 8], ebx
je 0x10003a76
cmp eax, esi
jne 0x10003a76
add eax, edi
push eax
call fcn.10006837
mov edi, eax
cmp edi, ebx
mov dword [ebp - 0x10], edi
je 0x10003b2a
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 0x10003aa2
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 0x10003ada
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 0x10003aef
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 0x10003b01
mov eax, dword [ebp - 4]
add dword [ebp - 0xc], eax
add edi, eax
cmp esi, ebx
jne 0x10003a95
jmp 0x10003b0e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
mov dword [ebp + 0xc], eax
jne 0x10003b20
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 0x10003b3c
push dword [ebp - 0x10]
call fcn.100050ca
jmp 0x10003b3c
mov dword [ebp + 0xc], 8
jmp 0x10003b3c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0xc], eax
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x10003b50
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 0x10003b65
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