Function at 0x401460
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using aes via winapi
Encrypt or decrypt via wincrypt
Hash data using sha1
Hash data using sha1 via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov dword [esp], 0x4060d0
call sym._printf
cmp dword [ebp + 0xc], 0
jne 0x4014a5
mov dword [esp], str._ERROR__Encrypted_payload_is_empty._Exiting...
call sym._puts
jmp 0x4017d9
mov dword [esp], str._DEBUG__Starting_CryptAcquireContext...
call sym._puts
mov dword [esp + 0x10], 0xf0000000
mov dword [esp + 0xc], 0x18
mov dword [esp + 8], 0
mov dword [esp + 4], 0
lea eax, [ebp - 0xc]
mov dword [esp], eax
call sym._CryptAcquireContextA_20
sub esp, 0x14
test eax, eax
jne 0x4014fd
call sym._GetLastError_0
mov dword [esp + 4], eax
mov dword [esp], str._ERROR__CryptAcquireContext_failed._Error:__lu_n
call sym._printf
jmp 0x4017d9
mov dword [esp], str._DEBUG__CryptAcquireContext_successful.
call sym._puts
mov dword [esp], str._DEBUG__Starting_CryptCreateHash...
call sym._puts
mov eax, dword [ebp - 0xc]
lea edx, [ebp - 0x14]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x8004
mov dword [esp], eax
call sym._CryptCreateHash_20
sub esp, 0x14
test eax, eax
jne 0x401576
call sym._GetLastError_0
mov dword [esp + 4], eax
mov dword [esp], str._ERROR__CryptCreateHash_failed._Error:__lu_n
call sym._printf
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._CryptReleaseContext_8
sub esp, 8
jmp 0x4017d9
mov dword [esp], str._DEBUG__CryptCreateHash_successful.
call sym._puts
mov dword [esp], str._DEBUG__Hashing_the_key_with_CryptHashData...
call sym._puts
mov eax, dword [ebp - 0x14]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x20
mov dword [esp + 4], 0x4060a0
mov dword [esp], eax
call sym._CryptHashData_16
sub esp, 0x10
test eax, eax
jne 0x4015f6
call sym._GetLastError_0
mov dword [esp + 4], eax
mov dword [esp], str._ERROR__CryptHashData_failed._Error:__lu_n
call sym._printf
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._CryptDestroyHash_4
sub esp, 4
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._CryptReleaseContext_8
sub esp, 8
jmp 0x4017d9
mov dword [esp], str._DEBUG__CryptHashData_successful.
call sym._puts
mov dword [esp], str._DEBUG__Deriving_AES_key_with_CryptDeriveKey...
call sym._puts
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
lea ecx, [ebp - 0x10]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
mov dword [esp + 4], 0x6610
mov dword [esp], eax
call sym._CryptDeriveKey_20
sub esp, 0x14
test eax, eax
jne 0x40167c
call sym._GetLastError_0
mov dword [esp + 4], eax
mov dword [esp], str._ERROR__CryptDeriveKey_failed._Error:__lu_n
call sym._printf
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._CryptDestroyHash_4
sub esp, 4
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._CryptReleaseContext_8
sub esp, 8
jmp 0x4017d9
mov dword [esp], str._DEBUG__CryptDeriveKey_successful.
call sym._puts
mov dword [esp], str._DEBUG__Setting_IV_with_CryptSetKeyParam...
call sym._puts
mov eax, dword [ebp - 0x10]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x4060c0
mov dword [esp + 4], 1
mov dword [esp], eax
call sym._CryptSetKeyParam_16
sub esp, 0x10
test eax, eax
jne 0x40170a
call sym._GetLastError_0
mov dword [esp + 4], eax
mov dword [esp], str._ERROR__CryptSetKeyParam_failed._Error:__lu_n
call sym._printf
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._CryptDestroyKey_4
sub esp, 4
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._CryptDestroyHash_4
sub esp, 4
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._CryptReleaseContext_8
sub esp, 8
jmp 0x4017d9
mov dword [esp], str._DEBUG__CryptSetKeyParam_successful.
call sym._puts
mov dword [esp], str._DEBUG__Preparing_to_decrypt_payload...
call sym._puts
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call sym._memcpy
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0xc]
mov dword [eax], edx
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp + 0x14]
mov dword [esp + 0x14], edx
mov edx, dword [ebp + 0x10]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._CryptDecrypt_24
sub esp, 0x18
test eax, eax
jne 0x401792
call sym._GetLastError_0
mov dword [esp + 4], eax
mov dword [esp], str._ERROR__CryptDecrypt_failed._Error:__lu_n
call sym._printf
jmp 0x4017a7
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], str._DEBUG__Payload_decrypted_successfully._Size:__lu_bytes_n
call sym._printf
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._CryptDestroyKey_4
sub esp, 4
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._CryptDestroyHash_4
sub esp, 4
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._CryptReleaseContext_8
sub esp, 8
leave
ret