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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x510728
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x5623e8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
xor edi, edi
xor eax, eax
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x54], 1
mov dword [ebp - 0x28], 7
mov dword [ebp - 0x2c], edi
mov word [ebp - 0x3c], ax
push 0xf0000000
push 0x18
push edi
push edi
lea ecx, [ebp - 0x40]
push ecx
mov dword [ebp - 4], edi
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x404a63
push edi
xor edx, edx
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], edi
push 0x51df78
mov ecx, esi
mov word [esi], dx
call fcn.00403d80
cmp dword [ebp - 0x28], 8
jb 0x404c67
mov eax, dword [ebp - 0x3c]
push eax
call fcn.004057d2
add esp, 4
jmp 0x404c67
mov edx, dword [ebp - 0x40]
lea ecx, [ebp - 0x44]
push ecx
push edi
push edi
push 0x800c
push edx
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
push edi
test eax, eax
jne 0x404abe
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor ecx, ecx
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], edi
push edi
mov word [esi], cx
push 0x51df78
mov ecx, esi
call fcn.00403d80
cmp dword [ebp - 0x28], 8
jb 0x404c67
mov edx, dword [ebp - 0x3c]
push edx
call fcn.004057d2
add esp, 4
jmp 0x404c67
mov eax, dword [ebp - 0x44]
push 8
push str.password
push eax
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x404af9
mov ecx, dword [ebp - 0x44]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov edx, dword [ebp - 0x40]
push edi
push edx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push 0x51df78
mov ecx, esi
call fcn.004042c0
jmp 0x404a48
mov edx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x40]
lea ecx, [ebp - 0x48]
push ecx
push 0x1000001
push edx
push 0x6610
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
jne 0x404b3f
mov ecx, dword [ebp - 0x44]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov edx, dword [ebp - 0x40]
push edi
push edx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push 0x51df78
mov ecx, esi
call fcn.004042c0
jmp 0x404c5f
mov ecx, dword [ebp - 0x48]
push edi
lea eax, [ebp - 0x54]
push eax
push 4
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
mov eax, dword [ebp - 0x48]
push edi
lea edx, [ebp - 0x20]
push edx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
mov eax, dword [ebx + 0x10]
add eax, eax
mov dword [ebp - 0x4c], eax
add eax, 0x10
push eax
mov dword [ebp - 0x50], eax
call fcn.004057dd
add esp, 4
cmp dword [ebx + 0x14], 8
mov edi, eax
jb 0x404b82
mov ebx, dword [ebx]
mov ecx, dword [ebp - 0x4c]
push ecx
push ebx
push edi
call fcn.004f42e0
add esp, 0xc
cmp byte [ebp + 0x10], 0
je 0x404bdb
mov edx, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x48]
push edx
lea eax, [ebp - 0x4c]
push eax
push edi
push 0
push 1
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x404c1c
push edi
call fcn.004057d2
mov edx, dword [ebp - 0x48]
add esp, 4
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov ecx, dword [ebp - 0x40]
push 0
push ecx
jmp 0x404b28
mov eax, dword [ebp - 0x48]
lea edx, [ebp - 0x4c]
push edx
push edi
push 0
push 1
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x404c1c
push edi
call fcn.004057d2
mov ecx, dword [ebp - 0x48]
add esp, 4
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov edx, dword [ebp - 0x44]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [ebp - 0x40]
push 0
push eax
jmp 0x404b28
mov ecx, dword [ebp - 0x4c]
shr ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x3c]
call fcn.00403d80
push edi
call fcn.004057d2
mov edx, dword [ebp - 0x48]
add esp, 4
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov ecx, dword [ebp - 0x40]
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea edx, [ebp - 0x3c]
push edx
mov ecx, esi
call fcn.00404650
lea ecx, [ebp - 0x3c]
call fcn.00401e00
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004f42c5
mov esp, ebp
pop ebp
ret