Function at 0x584c90
Capabilities:
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5cba12
mov eax, dword fs:[0]
push eax
sub esp, 0x5a0
mov eax, dword [0x68cc00]
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 eax, dword [ebp + 8]
lea ecx, [ebp - 0x2b0]
mov edi, dword [ebp + 0x20]
xorps xmm0, xmm0
mov esi, dword [ebp + 0x10]
push str.msPadAndSignHash
mov dword [ebp - 0x59c], eax
mov eax, dword [ebp + 0x1c]
push edi
mov dword [ebp - 0x5a8], eax
movq qword [ebp - 0x2b0], xmm0
mov dword [ebp - 0x2a8], 0
call fcn.00447ef0
mov dword [ebp - 4], 0
test esi, esi
je 0x58520f
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x58520f
cmp eax, 0x80
ja 0x58520f
push eax
lea eax, [ebp - 0x90]
push esi
push eax
call fcn.0040de00
push 0x74
lea eax, [ebp - 0x480]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x18
lea ecx, [ebp - 0x480]
call fcn.0042a8a0
mov ebx, dword [ebp + 0xc]
lea eax, [ebp - 0x480]
push eax
push ebx
mov byte [ebp - 4], 1
call fcn.0046fd20
add esp, 8
lea eax, [ebp - 0x480]
mov ecx, edi
push eax
push str.hashAlg
call fcn.00448a80
mov ecx, dword [ebp - 0x5a8]
call fcn.00436ad0
mov ecx, dword [ebp - 0x59c]
push edi
call fcn.004abb00
mov esi, eax
mov dword [ebp - 0x5a0], esi
test esi, esi
jne 0x584db8
mov eax, dword [edi]
mov ecx, edi
push str.Failed_to_get_MsCertificate.
call dword [eax + 0x14]
lea ecx, [ebp - 0x480]
xor bl, bl
call fcn.0042a8f0
jmp 0x585211
push 0x74
lea eax, [ebp - 0x40c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x40c]
call fcn.0042a8a0
push 0x74
lea eax, [ebp - 0x398]
mov byte [ebp - 4], 2
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x398]
call fcn.0042a8a0
push edi
lea eax, [ebp - 0x40c]
mov byte [ebp - 4], 3
push eax
mov ecx, esi
call fcn.0053be40
lea eax, [ebp - 0x40c]
mov ecx, edi
push eax
push str.cert_key_container
call fcn.00448a80
push edi
lea eax, [ebp - 0x398]
mov ecx, esi
push eax
call fcn.0053bb60
lea eax, [ebp - 0x398]
mov ecx, edi
push eax
push str.cert_def_provider
call fcn.00448a80
push edi
push 0
mov ecx, esi
call fcn.0053ba60
test eax, eax
jne 0x584e55
xor bl, bl
jmp 0x5851ec
mov ecx, eax
call fcn.00402f10
push 0x118
mov dword [ebp - 0x5a4], eax
lea eax, [ebp - 0x598]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x598]
call fcn.00403870
mov ecx, dword [ebp - 0x59c]
lea eax, [ebp - 0x598]
push edi
push eax
mov byte [ebp - 4], 4
call fcn.004ac6a0
test al, al
je 0x584f2f
lea ecx, [ebp - 0x598]
call fcn.00405370
add esi, 0x18
mov dword [ebp - 0x5ac], eax
push esi
lea ecx, [ebp - 0x598]
call fcn.00405170
test al, al
jne 0x584f2f
push edi
push 0
push dword [ebp - 0x5ac]
push 0x21
push dword [ebp - 0x5a4]
call fcn.00584530
add esp, 0x14
test eax, eax
jne 0x584f21
mov eax, dword [edi]
mov ecx, edi
push str.CryptSetProvParam_failed.
call dword [eax + 0x14]
mov eax, dword [edi]
mov ecx, edi
push str.Failed_to_set_the_smartcard_PIN.__2_
call dword [eax + 0x14]
mov ecx, edi
call fcn.00448fd0
mov eax, dword [edi]
mov ecx, edi
push str.Incorrect_Smartcard_PIN
call dword [eax + 0x18]
mov eax, dword [ebp - 0x59c]
cmp byte [eax + 0x150], 0
jne 0x58518c
lea eax, [ebp - 0x598]
mov ecx, esi
push eax
call fcn.00404b80
cmp ebx, 0x10
jne 0x584f3b
mov eax, 0x8008
jmp 0x584f44
push ebx
call fcn.00584720
add esp, 4
lea ecx, [ebp - 0x294]
mov dword [ebp - 0x59c], eax
push ecx
push 0
push 0
push eax
push dword [ebp - 0x5a4]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x5850b5
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push ebx
push str.hashAlg
mov ecx, edi
mov esi, eax
call fcn.00448710
push dword [ebp - 0x59c]
mov ecx, edi
push str.algId
call fcn.00448710
mov ecx, edi
call fcn.00448fd0
mov eax, dword [edi]
mov ecx, edi
push str.Failed_to_create_HCRYPTHASH
call dword [eax + 0x14]
cmp esi, 0x80090008
jne 0x58518c
cmp ebx, 7
je 0x584fc3
cmp ebx, 2
je 0x584fc3
cmp ebx, 3
jne 0x58518c
push str.retryWithEnhancedRsaAesCsp
xorps xmm0, xmm0
mov dword [ebp - 0x29c], 0
push edi
lea ecx, [ebp - 0x2a4]
movq qword [ebp - 0x2a4], xmm0
call fcn.00447ef0
push 0x74
lea eax, [ebp - 0x324]
mov byte [ebp - 4], 5
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x324]
call fcn.0042a8a0
mov ebx, dword [ebp - 0x5a0]
lea ecx, [ebp - 0x324]
mov byte [ebp - 4], 6
lea esi, [ebx + 0x134]
push esi
call fcn.0042ab70
push str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
mov ecx, esi
call fcn.00431720
mov ecx, ebx
call fcn.0053b9f0
push edi
push 0
mov ecx, ebx
call fcn.0053ba60
test eax, eax
jne 0x585065
lea ecx, [ebp - 0x324]
call fcn.0042a8f0
lea ecx, [ebp - 0x2a4]
call fcn.00447ff0
xor bl, bl
jmp 0x5851e1
mov ecx, eax
call fcn.00402f10
lea ecx, [ebp - 0x294]
push ecx
push 0
push 0
push dword [ebp - 0x59c]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x58509b
mov ecx, edi
call fcn.00448fd0
mov eax, dword [edi]
mov ecx, edi
push str.Failed_to_create_HCRYPTHASH
call dword [eax + 0x14]
lea ecx, [ebp - 0x324]
call fcn.0042a8f0
lea ecx, [ebp - 0x2a4]
mov byte [ebp - 4], 4
call fcn.00447ff0
push 0
lea eax, [ebp - 0x90]
push eax
push 2
push dword [ebp - 0x294]
call dword [sym.imp.ADVAPI32.dll_CryptSetHashParam]
test eax, eax
jne 0x5850f6
mov ecx, edi
call fcn.00448fd0
push dword [ebp - 0x294]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [edi]
mov ecx, edi
push str.Failed_to_CryptSetHashParam
call dword [eax + 0x14]
xor bl, bl
jmp 0x5851e1
mov cl, byte [ebp + 0x18]
mov eax, str.AT_KEYEXCHANGE
mov ebx, dword [sym.imp.ADVAPI32.dll_CryptSignHashA]
test cl, cl
mov esi, str.AT_SIGNATURE
mov dword [ebp - 0x298], 0x200
cmovne esi, eax
movzx eax, cl
xor eax, 1
inc eax
mov dword [ebp - 0x5a0], eax
lea eax, [ebp - 0x298]
push eax
lea eax, [ebp - 0x290]
push eax
push 0
movzx eax, cl
push 0
inc eax
push eax
push dword [ebp - 0x294]
call ebx
test eax, eax
jne 0x585190
lea eax, [ebp - 0x298]
push eax
lea eax, [ebp - 0x290]
push eax
push 0
push 0
push dword [ebp - 0x5a0]
push dword [ebp - 0x294]
call ebx
test eax, eax
jne 0x585190
mov ecx, edi
call fcn.00448fd0
push dword [ebp - 0x294]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [edi]
mov ecx, edi
push esi
push str.failedToSignWith
call dword [eax + 0x2c]
xor bl, bl
jmp 0x5851e1
cmp byte [edi + 0x129], 0
je 0x5851ab
push dword [ebp - 0x298]
mov ecx, edi
push str.cryptSigSize
call fcn.00448710
push dword [ebp - 0x298]
mov ecx, dword [ebp - 0x5a8]
lea eax, [ebp - 0x290]
push eax
call fcn.004351f0
mov ecx, dword [ebp - 0x5a8]
call fcn.0043a800
mov eax, dword [ebp - 0x294]
test eax, eax
je 0x5851df
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov bl, 1
lea ecx, [ebp - 0x598]
call fcn.00403900
lea ecx, [ebp - 0x398]
call fcn.0042a8f0
lea ecx, [ebp - 0x40c]
call fcn.0042a8f0
lea ecx, [ebp - 0x480]
call fcn.0042a8f0
jmp 0x585211
xor bl, bl
lea ecx, [ebp - 0x2b0]
call fcn.00447ff0
mov al, bl
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.005af5a8
mov esp, ebp
pop ebp
ret