Function at 0x4583a0
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 0xffffffffffffffff
push 0x4daa88
mov eax, dword fs:[0]
push eax
mov eax, 0x78
call fcn.00468d20
mov eax, dword [0x5808f0]
xor eax, esp
mov dword [esp + 0x74], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5808f0]
xor eax, esp
push eax
lea eax, [esp + 0x8c]
mov dword fs:[0], eax
xor ebp, ebp
xor eax, eax
mov esi, ecx
mov dword [esp + 0x50], 7
mov dword [esp + 0x4c], ebp
mov word [esp + 0x3c], ax
lea ecx, [esp + 0x54]
mov dword [esp + 0x94], ebp
call fcn.00424cc0
xor eax, eax
lea ecx, [esp + 0x14]
push ecx
mov byte [esp + 0x98], 1
mov byte [esp + 0x7c], 0
mov dword [esp + 0x7d], eax
mov dword [esp + 0x81], eax
mov dword [esp + 0x85], eax
mov word [esp + 0x89], ax
mov byte [esp + 0x8b], al
mov dword [esp + 0x1c], 0x10
call fcn.0041ae00
add esp, 4
cmp eax, 0x17
je 0x458492
mov edx, dword [esp + 0x14]
push edx
call fcn.004690f0
push str.Wrong_pass_file_size_n
call fcn.0041a700
add esp, 8
lea ecx, [esp + 0x54]
mov byte [esp + 0x94], 0
call fcn.00424ce0
cmp dword [esp + 0x50], 8
jb 0x4586de
mov eax, dword [esp + 0x3c]
push eax
call fcn.004699ce
add esp, 4
jmp 0x4586de
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 5]
mov dword [esi + 0x34], ecx
mov edx, dword [eax + 9]
lea ebx, [esi + 0x34]
mov dword [ebx + 4], edx
mov ecx, dword [eax + 0xd]
mov dword [ebx + 8], ecx
mov edx, dword [eax + 0x11]
mov dword [ebx + 0xc], edx
mov cx, word [eax + 0x15]
push eax
mov word [ebx + 0x10], cx
call fcn.004690f0
add esp, 4
cmp dword [0x584064], ebp
je 0x4584d6
mov ecx, 0x4f14b0
mov eax, 0x4e2e58
jmp 0x4584e0
mov ecx, 0x4f1468
mov eax, str.Choose_encrypted_doc_file
lea edx, [esp + 0x38]
push edx
push ecx
push eax
mov ecx, esi
call fcn.0042bd50
test al, al
je 0x458464
push 4
push 0xffffffffffffffff
push 0x4e463c
lea ecx, [esp + 0x44]
call fcn.0041b940
push 0xffffffffffffffff
add eax, 4
push eax
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x44]
call fcn.0041c930
push 0xffffffffffffffff
push ebp
push eax
lea ecx, [esi + 4]
mov byte [esp + 0xa0], 2
call fcn.0041c410
mov edi, 8
mov byte [esp + 0x94], 1
cmp dword [esp + 0x34], edi
jb 0x458550
mov edx, dword [esp + 0x20]
push edx
call fcn.004699ce
add esp, 4
mov eax, dword [esp + 0x3c]
cmp dword [esp + 0x50], edi
jae 0x45855e
lea eax, [esp + 0x3c]
push 1
push eax
lea ecx, [esp + 0x5c]
call fcn.00424d40
lea ecx, [esp + 0x54]
call fcn.00424740
test al, al
jne 0x458589
push str.Error_reading_file_for_test_n
call fcn.0041a700
add esp, 4
jmp 0x4586c4
push ebp
push 0x10
lea eax, [esp + 0x80]
push eax
push ebp
push ebp
lea ecx, [esp + 0x68]
call fcn.00424750
push 0x10
push 0x18
push ebp
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
lea edi, [esi + 0x24]
push edi
call ebp
test eax, eax
jne 0x4585bb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 8
push 0x18
push 0
push 0
push edi
mov dword [edi], 0
call ebp
test eax, eax
jne 0x4585e2
push str.CryptAcquireContext_error_n
call fcn.0041a700
add esp, 4
jmp 0x4586c4
mov ecx, dword [edi]
lea ebp, [esi + 0x2c]
push ebp
push 0
push 0
push 0x8004
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x45860e
push str.CryptCreateHash_error_n
call fcn.0041a700
add esp, 4
jmp 0x4586c4
mov edx, dword [ebp]
push 0
push 9
push ebx
push edx
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x458633
push str.CryptHashData_error_n
call fcn.0041a700
add esp, 4
jmp 0x4586c4
mov eax, dword [ebp]
mov ecx, dword [edi]
lea ebx, [esi + 0x28]
push ebx
push 0
push eax
push 0x660e
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
jne 0x45865e
push str.CryptDeriveKey_error_n
call fcn.0041a700
add esp, 4
jmp 0x4586c4
mov edx, dword [ebx]
lea edi, [esi + 0x30]
push edi
push 0
push 0
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDuplicateKey]
test eax, eax
jne 0x458682
push str.DuplicateKey_error_n
call fcn.0041a700
add esp, 4
jmp 0x4586c4
mov edx, dword [edi]
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x7c]
push ecx
push 0
push 0
push 0
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x4586b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR:_CryptDecrypt__0x_X__n
call fcn.0046bceb
jmp 0x4586c1
lea eax, [esp + 0x78]
push 0x10
push eax
call fcn.0041a7a0
mov byte [esi + 0x20], al
add esp, 8
lea ecx, [esp + 0x54]
mov byte [esp + 0x94], 0
call fcn.00424ce0
lea ecx, [esp + 0x38]
call fcn.0041b5b0
mov ecx, dword [esp + 0x8c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x74]
xor ecx, esp
call fcn.004690b5
add esp, 0x84
ret