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 sub.msvcrt.dll_printf
cmp dword [ebp + 0xc], 0
jne 0x4014a5
mov dword [esp], str._ERROR__Encrypted_payload_is_empty._Exiting...
call sub.msvcrt.dll_puts
jmp 0x4017d9
mov dword [esp], str._DEBUG__Starting_CryptAcquireContext...
call sub.msvcrt.dll_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 sub.ADVAPI32.DLL_CryptAcquireContextA
sub esp, 0x14
test eax, eax
jne 0x4014fd
call sub.KERNEL32.dll_GetLastError
mov dword [esp + 4], eax
mov dword [esp], str._ERROR__CryptAcquireContext_failed._Error:__lu_n
call sub.msvcrt.dll_printf
jmp 0x4017d9
mov dword [esp], str._DEBUG__CryptAcquireContext_successful.
call sub.msvcrt.dll_puts
mov dword [esp], str._DEBUG__Starting_CryptCreateHash...
call sub.msvcrt.dll_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 sub.ADVAPI32.DLL_CryptCreateHash
sub esp, 0x14
test eax, eax
jne 0x401576
call sub.KERNEL32.dll_GetLastError
mov dword [esp + 4], eax
mov dword [esp], str._ERROR__CryptCreateHash_failed._Error:__lu_n
call sub.msvcrt.dll_printf
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.ADVAPI32.DLL_CryptReleaseContext
sub esp, 8
jmp 0x4017d9
mov dword [esp], str._DEBUG__CryptCreateHash_successful.
call sub.msvcrt.dll_puts
mov dword [esp], str._DEBUG__Hashing_the_key_with_CryptHashData...
call sub.msvcrt.dll_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 sub.ADVAPI32.DLL_CryptHashData
sub esp, 0x10
test eax, eax
jne 0x4015f6
call sub.KERNEL32.dll_GetLastError
mov dword [esp + 4], eax
mov dword [esp], str._ERROR__CryptHashData_failed._Error:__lu_n
call sub.msvcrt.dll_printf
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sub.ADVAPI32.DLL_CryptDestroyHash
sub esp, 4
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.ADVAPI32.DLL_CryptReleaseContext
sub esp, 8
jmp 0x4017d9
mov dword [esp], str._DEBUG__CryptHashData_successful.
call sub.msvcrt.dll_puts
mov dword [esp], str._DEBUG__Deriving_AES_key_with_CryptDeriveKey...
call sub.msvcrt.dll_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 sub.ADVAPI32.DLL_CryptDeriveKey
sub esp, 0x14
test eax, eax
jne 0x40167c
call sub.KERNEL32.dll_GetLastError
mov dword [esp + 4], eax
mov dword [esp], str._ERROR__CryptDeriveKey_failed._Error:__lu_n
call sub.msvcrt.dll_printf
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sub.ADVAPI32.DLL_CryptDestroyHash
sub esp, 4
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.ADVAPI32.DLL_CryptReleaseContext
sub esp, 8
jmp 0x4017d9
mov dword [esp], str._DEBUG__CryptDeriveKey_successful.
call sub.msvcrt.dll_puts
mov dword [esp], str._DEBUG__Setting_IV_with_CryptSetKeyParam...
call sub.msvcrt.dll_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 sub.ADVAPI32.DLL_CryptSetKeyParam
sub esp, 0x10
test eax, eax
jne 0x40170a
call sub.KERNEL32.dll_GetLastError
mov dword [esp + 4], eax
mov dword [esp], str._ERROR__CryptSetKeyParam_failed._Error:__lu_n
call sub.msvcrt.dll_printf
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.ADVAPI32.DLL_CryptDestroyKey
sub esp, 4
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sub.ADVAPI32.DLL_CryptDestroyHash
sub esp, 4
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.ADVAPI32.DLL_CryptReleaseContext
sub esp, 8
jmp 0x4017d9
mov dword [esp], str._DEBUG__CryptSetKeyParam_successful.
call sub.msvcrt.dll_puts
mov dword [esp], str._DEBUG__Preparing_to_decrypt_payload...
call sub.msvcrt.dll_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 sub.msvcrt.dll_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 sub.ADVAPI32.DLL_CryptDecrypt
sub esp, 0x18
test eax, eax
jne 0x401792
call sub.KERNEL32.dll_GetLastError
mov dword [esp + 4], eax
mov dword [esp], str._ERROR__CryptDecrypt_failed._Error:__lu_n
call sub.msvcrt.dll_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 sub.msvcrt.dll_printf
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.ADVAPI32.DLL_CryptDestroyKey
sub esp, 4
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sub.ADVAPI32.DLL_CryptDestroyHash
sub esp, 4
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.ADVAPI32.DLL_CryptReleaseContext
sub esp, 8
leave
ret