Function at 0x40c3c0
Capabilities:
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push ebp
xor eax, eax
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x86c
nop
mov byte [ebp + eax - 0x80c], al
add eax, 1
cmp eax, 0x800
jne 0x40c3d0
lea edi, [ebp - 0x858]
mov ebx, dword fs:[0x18]
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x800c
mov eax, dword [0x42b014]
mov dword [esp], eax
mov eax, dword [sym.imp.advapi32.dll_CryptCreateHash]
mov dword [ebp - 0x85c], eax
call eax
sub esp, 0x14
test eax, eax
jne 0x40c545
cmp dword [ebx + 0x34], 0x80090008
je 0x40cadc
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x50f
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
mov dword [esp], 0
call fcn.00401ac0
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x800d
mov eax, dword [0x42b014]
mov esi, dword fs:[0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x85c]
call eax
sub esp, 0x14
mov ebx, eax
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x524
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.00401ac0
test ebx, ebx
jne 0x40c90b
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x800e
mov eax, dword [0x42b014]
mov esi, dword fs:[0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x85c]
call eax
sub esp, 0x14
mov ebx, eax
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x539
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.00401ac0
test ebx, ebx
jne 0x40c758
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x860], eax
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x50f
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x860]
mov dword [esp], edx
call fcn.00401ac0
lea ecx, [ebp - 0x850]
lea eax, [ebp - 0x854]
mov dword [ebp - 0x850], 4
mov dword [esp + 0xc], ecx
mov esi, dword [sym.imp.advapi32.dll_CryptGetHashParam]
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 4
mov eax, dword [ebp - 0x858]
mov dword [esp], eax
call esi
sub esp, 0x14
mov dword [ebp - 0x860], eax
mov eax, 0x513
call fcn.00401310
mov eax, dword [ebp - 0x854]
mov dword [esp + 0xc], eax
mov edx, dword [ebx + 0x34]
cmp eax, 0x20
mov dword [esp + 4], str._08lx__hashlen:__ld_n
mov dword [esp + 8], edx
mov ecx, dword [ebp - 0x860]
sete dl
xor eax, eax
test ecx, ecx
setne al
and eax, edx
mov dword [esp], eax
call fcn.00401ac0
lea eax, [ebp - 0x80c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x800
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x858]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_CryptHashData]
sub esp, 0x10
mov dword [ebp - 0x860], eax
mov eax, 0x516
call fcn.00401310
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x860]
mov dword [esp], edx
call fcn.00401ac0
lea edx, [ebp - 0x84c]
lea ecx, [ebp - 0x850]
mov dword [ebp - 0x850], 0x20
mov dword [esp + 8], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], 0
mov dword [esp + 4], 2
mov eax, dword [ebp - 0x858]
mov dword [esp], eax
call esi
sub esp, 0x14
mov dword [ebp - 0x860], eax
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x51a
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x860]
mov dword [esp], ecx
call fcn.00401ac0
call fcn.00412e10
lea edx, [ebp - 0x84c]
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x51c
mov dword [esp], edx
mov dword [esp + 8], 0x20
mov dword [esp + 4], 0x418720
call sub.msvcrt.dll_memcmp
mov dword [esp + 4], str.Wrong_SHA_256_hash__n
test eax, eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401ac0
mov eax, dword [ebp - 0x858]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_CryptDestroyHash]
sub esp, 4
mov dword [ebp - 0x860], eax
mov eax, 0x51f
call fcn.00401310
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x860]
mov dword [esp], edx
call fcn.00401ac0
jmp 0x40c46b
lea edx, [ebp - 0x850]
lea eax, [ebp - 0x854]
mov dword [ebp - 0x850], 4
mov edi, dword [sym.imp.advapi32.dll_CryptGetHashParam]
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 4
mov eax, dword [ebp - 0x858]
mov dword [esp], eax
call edi
sub esp, 0x14
mov ebx, eax
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x53d
mov eax, dword [ebp - 0x854]
mov dword [esp + 0xc], eax
mov ecx, dword [esi + 0x34]
cmp eax, 0x40
mov dword [esp + 4], str._08lx__hashlen:__ld_n
mov dword [esp + 8], ecx
sete cl
xor eax, eax
test ebx, ebx
setne al
and eax, ecx
mov dword [esp], eax
call fcn.00401ac0
lea eax, [ebp - 0x80c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x800
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x858]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_CryptHashData]
sub esp, 0x10
mov ebx, eax
mov eax, 0x540
call fcn.00401310
mov eax, dword [esi + 0x34]
mov dword [esp], ebx
lea ebx, [ebp - 0x84c]
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
call fcn.00401ac0
lea edx, [ebp - 0x850]
mov dword [ebp - 0x850], 0x40
mov dword [esp + 0xc], edx
mov dword [esp + 8], ebx
mov dword [esp + 0x10], 0
mov dword [esp + 4], 2
mov eax, dword [ebp - 0x858]
mov dword [esp], eax
call edi
sub esp, 0x14
mov edi, eax
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x544
mov eax, dword [esi + 0x34]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], str._08lx_n
call fcn.00401ac0
mov eax, 0x546
call fcn.00401310
mov dword [esp], ebx
mov dword [esp + 8], 0x40
mov dword [esp + 4], 0x4186a0
call sub.msvcrt.dll_memcmp
mov dword [esp + 4], str.Wrong_SHA_512_hash__n
test eax, eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401ac0
mov eax, dword [ebp - 0x858]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_CryptDestroyHash]
sub esp, 4
mov ebx, eax
mov eax, 0x549
call fcn.00401310
mov eax, dword [esi + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
call fcn.00401ac0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea ecx, [ebp - 0x850]
lea eax, [ebp - 0x854]
mov edx, dword [sym.imp.advapi32.dll_CryptGetHashParam]
mov dword [ebp - 0x850], 4
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 4
mov eax, dword [ebp - 0x858]
mov dword [esp], eax
mov dword [ebp - 0x864], edx
call edx
sub esp, 0x14
mov ebx, eax
mov eax, 0x528
call fcn.00401310
mov eax, dword [ebp - 0x854]
mov dword [esp + 0xc], eax
mov ecx, dword [esi + 0x34]
cmp eax, 0x30
mov dword [esp + 4], str._08lx__hashlen:__ld_n
mov dword [esp + 8], ecx
sete byte [ebp - 0x860]
xor eax, eax
movzx ecx, byte [ebp - 0x860]
test ebx, ebx
setne al
and eax, ecx
mov dword [esp], eax
call fcn.00401ac0
lea eax, [ebp - 0x80c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x800
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x858]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_CryptHashData]
sub esp, 0x10
mov ebx, eax
mov eax, 0x52b
call fcn.00401310
mov eax, dword [esi + 0x34]
mov dword [esp], ebx
lea ebx, [ebp - 0x84c]
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
call fcn.00401ac0
lea ecx, [ebp - 0x850]
mov dword [ebp - 0x850], 0x30
mov dword [esp + 0xc], ecx
mov dword [esp + 8], ebx
mov dword [esp + 0x10], 0
mov dword [esp + 4], 2
mov eax, dword [ebp - 0x858]
mov dword [esp], eax
mov edx, dword [ebp - 0x864]
call edx
sub esp, 0x14
mov dword [ebp - 0x860], eax
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x52f
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x860]
mov dword [esp], ecx
call fcn.00401ac0
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x531
mov dword [esp], ebx
mov dword [esp + 8], 0x30
mov dword [esp + 4], 0x4186e0
call sub.msvcrt.dll_memcmp
mov dword [esp + 4], str.Wrong_SHA_384_hash__n
test eax, eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401ac0
mov eax, dword [ebp - 0x858]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_CryptDestroyHash]
sub esp, 4
mov ebx, eax
mov eax, 0x534
call fcn.00401310
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp], ebx
mov dword [esp + 8], eax
call fcn.00401ac0
jmp 0x40c4d4
mov eax, 0x50c
call fcn.00401310
mov dword [esp], str.SHA_256_384_512_hashes_are_not_supported_before_Windows_XP_SP3_n
call fcn.00404020
jmp 0x40c53d