Function at 0x401170
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using des via winapi
Encrypt or decrypt via wincrypt
Hash data via wincrypt
Hash data with md5
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [ebp - 0x10], 2
push 0
push 1
push str.Microsoft_Base_Cryptographic_Provider_v1.0
push 0
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x40121a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x4011ee
push 8
push 1
push str.Microsoft_Base_Cryptographic_Provider_v1.0
push 0
lea ecx, [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x4011ec
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_in_CryptAcquireContext_for_NewKeySet:_0x_08x_n
call dword [sym.imp.MSVCR110.dll___iob_func]
mov edx, 0x20
shl edx, 1
add eax, edx
push eax
call dword [sym.imp.MSVCR110.dll_fprintf]
add esp, 0xc
xor eax, eax
jmp 0x401453
jmp 0x40121a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_in_CryptAcquireContext:_0x_08x_n
call dword [sym.imp.MSVCR110.dll___iob_func]
mov ecx, 0x20
shl ecx, 1
add eax, ecx
push eax
call dword [sym.imp.MSVCR110.dll_fprintf]
add esp, 0xc
xor eax, eax
jmp 0x401453
lea edx, [ebp - 4]
push edx
push 0
push 0
push 0x8003
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x401261
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_in_CryptCreateHash:_0x_08x_n
call dword [sym.imp.MSVCR110.dll___iob_func]
mov ecx, 0x20
shl ecx, 1
add eax, ecx
push eax
call dword [sym.imp.MSVCR110.dll_fprintf]
add esp, 0xc
xor eax, eax
jmp 0x401453
push 0
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x4012af
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_in_CryptHashData:_0x_08x_n
call dword [sym.imp.MSVCR110.dll___iob_func]
mov edx, 0x20
shl edx, 1
add eax, edx
push eax
call dword [sym.imp.MSVCR110.dll_fprintf]
add esp, 0xc
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
xor eax, eax
jmp 0x401453
lea ecx, [ebp - 8]
push ecx
push 0x400000
mov edx, dword [ebp - 4]
push edx
push 0x6601
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
jne 0x401305
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_in_CryptDeriveKey:_0x_08x_n
call dword [sym.imp.MSVCR110.dll___iob_func]
mov ecx, 0x20
shl ecx, 1
add eax, ecx
push eax
call dword [sym.imp.MSVCR110.dll_fprintf]
add esp, 0xc
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
xor eax, eax
jmp 0x401453
push 0
lea eax, [ebp - 0x10]
push eax
push 4
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
jne 0x40135b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_in_CryptSetKeyPara:_KP_MODE:_0x_08x_n
call dword [sym.imp.MSVCR110.dll___iob_func]
mov edx, 0x20
shl edx, 1
add eax, edx
push eax
call dword [sym.imp.MSVCR110.dll_fprintf]
add esp, 0xc
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
xor eax, eax
jmp 0x401453
cmp dword [ebp + 0x1c], 1
jne 0x4013bf
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
push 0
push 1
push 0
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x4013bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_in_CryptDecrypt:_0x_08x_n
call dword [sym.imp.MSVCR110.dll___iob_func]
mov edx, 0x20
shl edx, 1
add eax, edx
push eax
call dword [sym.imp.MSVCR110.dll_fprintf]
add esp, 0xc
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
xor eax, eax
jmp 0x401453
jmp 0x40143c
cmp dword [ebp + 0x1c], 2
jne 0x401424
mov edx, dword [ebp + 0x18]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
push 0
push 1
push 0
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x401422
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_in_CryptEncrypt:_0x_08x_n
call dword [sym.imp.MSVCR110.dll___iob_func]
mov ecx, 0x20
shl ecx, 1
add eax, ecx
push eax
call dword [sym.imp.MSVCR110.dll_fprintf]
add esp, 0xc
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
xor eax, eax
jmp 0x401453
jmp 0x40143c
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
xor eax, eax
jmp 0x401453
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov eax, dword [ebp + 8]
mov esp, ebp
pop ebp
ret