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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x810
push esi
push edi
push 0x800
lea eax, [esp + 0x1c]
mov dword [esp + 0xc], edx
push 0
push eax
mov esi, ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [esp + 0x14]
push 0xf0000000
push 0x18
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x4a0a81
lea eax, [esp + 0xc]
push eax
push 0
push 0
push 0x8004
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x4a0a81
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x4a0996
mov eax, dword [ecx]
test eax, eax
je 0x4a0996
cmp ecx, 0x4e5234
jne 0x4a08ea
mov eax, 0x35
jmp 0x4a08ed
movzx eax, word [eax]
mov word [esp + 0x18], ax
jne 0x4a08fb
mov eax, 0x4a
jmp 0x4a0901
mov eax, dword [ecx + 4]
movzx eax, word [eax]
mov word [esp + 0x1a], ax
mov eax, 0x4dd996
je 0x4a0910
mov eax, dword [ecx + 8]
mov ax, word [eax]
mov word [esp + 0x1c], ax
mov eax, 0x4dda4a
je 0x4a0922
mov eax, dword [ecx + 0xc]
mov ax, word [eax]
mov word [esp + 0x1e], ax
mov eax, 0x4dda7c
je 0x4a0934
mov eax, dword [ecx + 0x10]
mov ax, word [eax]
mov word [esp + 0x20], ax
mov eax, 0x4dd98c
je 0x4a0946
mov eax, dword [ecx + 0x14]
mov ax, word [eax]
mov word [esp + 0x22], ax
mov eax, 0x4dd9b4
je 0x4a0958
mov eax, dword [ecx + 0x18]
mov ax, word [eax]
mov word [esp + 0x24], ax
mov eax, 0x4dd9e6
je 0x4a096a
mov eax, dword [ecx + 0x1c]
mov ax, word [eax]
mov word [esp + 0x26], ax
mov eax, 0x4dd9a0
je 0x4a097c
mov eax, dword [ecx + 0x20]
mov ax, word [eax]
mov word [esp + 0x28], ax
mov eax, 0x4dda72
je 0x4a098e
mov eax, dword [ecx + 0x24]
mov ax, word [eax]
mov word [esp + 0x2a], ax
lea ecx, [esp + 0x18]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4a09a0
sub ecx, edx
sar ecx, 1
push 0
lea eax, [ecx + ecx]
push eax
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x4a0a81
xor eax, eax
lea edi, [esp + 0x18]
mov ecx, 0x200
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0x10]
cmp ecx, 0x80
jne 0x4a09eb
mov eax, 0x660e
jmp 0x4a09fb
xor eax, eax
cmp ecx, 0xc0
setne al
add eax, 0x660f
lea edx, [esp + 0x10]
shl ecx, 0x10
push edx
push ecx
push dword [esp + 0x14]
push eax
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
je 0x4a0a81
push dword [esp + 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
test eax, eax
je 0x4a0a81
cmp byte [ebp + 0xc], 0
je 0x4a0a4b
mov eax, dword [esp + 8]
add eax, 0x10
push eax
lea eax, [esp + 0xc]
push eax
push esi
push 0
push 1
push 0
push dword [esp + 0x28]
call dword [0x4e6a14]
jmp 0x4a0a61
lea eax, [esp + 8]
push eax
push esi
push 0
push 1
push 0
push dword [esp + 0x24]
call dword [0x4e6a10]
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push 0
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [esp + 8]
pop edi
pop esi
mov esp, ebp
pop ebp
ret
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret