Function at 0x4f3570
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:
sub esp, 0x14
push ebx
mov ebx, dword [esp + 0x28]
push ebp
push esi
push edi
test ebx, ebx
je 0x4f3698
mov esi, dword [esp + 0x38]
test esi, esi
je 0x4f3698
mov ebp, dword [esp + 0x3c]
test ebp, ebp
je 0x4f3698
mov edi, dword [esp + 0x40]
test edi, edi
je 0x4f3698
push 0
push 0x18
push str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
push 0
lea eax, [esp + 0x44]
mov dword [esp + 0x44], 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x4f3698
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0
push eax
push 0
push 0
push 0x8004
push dword [esp + 0x44]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
push 0
test eax, eax
je 0x4f368e
push dword [esp + 0x34]
push dword [esp + 0x34]
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x4f3682
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0
push eax
push 0
push dword [esp + 0x18]
push 0x6610
push dword [esp + 0x44]
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
je 0x4f3682
cmp byte [esp + 0x28], 0
mov dword [esp + 0x18], esi
push esi
je 0x4f36e1
call fcn.005021d8
push esi
mov edi, eax
push ebx
push edi
call fcn.00588420
add esp, 0x10
lea eax, [esp + 0x18]
push eax
push edi
push 0
push 1
push 0
push dword [esp + 0x28]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x4f36a2
push edi
call fcn.00501fb5
add esp, 4
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push 0
push dword [esp + 0x38]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x14
ret
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push 0
push dword [esp + 0x38]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x40]
mov byte [edi + eax], 0
mov eax, dword [esp + 0x18]
mov dword [ebp], edi
pop edi
pop esi
pop ebp
mov dword [ecx], eax
mov al, 1
pop ebx
add esp, 0x14
ret
lea eax, [esp + 0x1c]
push eax
push 0
push 0
push 1
push 0
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4f3678
inc eax
push eax
call fcn.005021d8
push esi
push ebx
mov ebx, eax
push ebx
call fcn.00588420
add esp, 0x10
mov dword [esp + 0x20], esi
lea eax, [esp + 0x20]
push dword [esp + 0x18]
push eax
push ebx
push 0
push 1
push 0
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x4f3740
push ebx
jmp 0x4f3670
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push 0
push dword [esp + 0x38]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [esp + 0x18]
mov dword [ebp], ebx
mov dword [edi], eax
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret