Function at 0x584d00
Capabilities:
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5cba62
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.00447f50
mov dword [ebp - 4], 0
test esi, esi
je 0x58527f
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x58527f
cmp eax, 0x80
ja 0x58527f
push eax
lea eax, [ebp - 0x90]
push esi
push eax
call fcn.0040de60
push 0x74
lea eax, [ebp - 0x480]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x18
lea ecx, [ebp - 0x480]
call fcn.0042a910
mov ebx, dword [ebp + 0xc]
lea eax, [ebp - 0x480]
push eax
push ebx
mov byte [ebp - 4], 1
call fcn.0046fd70
add esp, 8
lea eax, [ebp - 0x480]
mov ecx, edi
push eax
push str.hashAlg
call fcn.00448ae0
mov ecx, dword [ebp - 0x5a8]
call fcn.00436b40
mov ecx, dword [ebp - 0x59c]
push edi
call fcn.004abb30
mov esi, eax
mov dword [ebp - 0x5a0], esi
test esi, esi
jne 0x584e28
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.0042a960
jmp 0x585281
push 0x74
lea eax, [ebp - 0x40c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x40c]
call fcn.0042a910
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.0042a910
push edi
lea eax, [ebp - 0x40c]
mov byte [ebp - 4], 3
push eax
mov ecx, esi
call fcn.0053bea0
lea eax, [ebp - 0x40c]
mov ecx, edi
push eax
push str.cert_key_container
call fcn.00448ae0
push edi
lea eax, [ebp - 0x398]
mov ecx, esi
push eax
call fcn.0053bbc0
lea eax, [ebp - 0x398]
mov ecx, edi
push eax
push str.cert_def_provider
call fcn.00448ae0
push edi
push 0
mov ecx, esi
call fcn.0053bac0
test eax, eax
jne 0x584ec5
xor bl, bl
jmp 0x58525c
mov ecx, eax
call fcn.00402f80
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.004038e0
mov ecx, dword [ebp - 0x59c]
lea eax, [ebp - 0x598]
push edi
push eax
mov byte [ebp - 4], 4
call fcn.004ac6d0
test al, al
je 0x584f9f
lea ecx, [ebp - 0x598]
call fcn.004053e0
add esi, 0x18
mov dword [ebp - 0x5ac], eax
push esi
lea ecx, [ebp - 0x598]
call fcn.004051e0
test al, al
jne 0x584f9f
push edi
push 0
push dword [ebp - 0x5ac]
push 0x21
push dword [ebp - 0x5a4]
call fcn.005845a0
add esp, 0x14
test eax, eax
jne 0x584f91
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.00449020
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 0x5851fc
lea eax, [ebp - 0x598]
mov ecx, esi
push eax
call fcn.00404bf0
cmp ebx, 0x10
jne 0x584fab
mov eax, 0x8008
jmp 0x584fb4
push ebx
call fcn.00584790
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 0x585125
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push ebx
push str.hashAlg
mov ecx, edi
mov esi, eax
call fcn.00448770
push dword [ebp - 0x59c]
mov ecx, edi
push str.algId
call fcn.00448770
mov ecx, edi
call fcn.00449020
mov eax, dword [edi]
mov ecx, edi
push str.Failed_to_create_HCRYPTHASH
call dword [eax + 0x14]
cmp esi, 0x80090008
jne 0x5851fc
cmp ebx, 7
je 0x585033
cmp ebx, 2
je 0x585033
cmp ebx, 3
jne 0x5851fc
push str.retryWithEnhancedRsaAesCsp
xorps xmm0, xmm0
mov dword [ebp - 0x29c], 0
push edi
lea ecx, [ebp - 0x2a4]
movq qword [ebp - 0x2a4], xmm0
call fcn.00447f50
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.0042a910
mov ebx, dword [ebp - 0x5a0]
lea ecx, [ebp - 0x324]
mov byte [ebp - 4], 6
lea esi, [ebx + 0x134]
push esi
call fcn.0042abe0
push str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
mov ecx, esi
call fcn.00431790
mov ecx, ebx
call fcn.0053ba50
push edi
push 0
mov ecx, ebx
call fcn.0053bac0
test eax, eax
jne 0x5850d5
lea ecx, [ebp - 0x324]
call fcn.0042a960
lea ecx, [ebp - 0x2a4]
call fcn.00448050
xor bl, bl
jmp 0x585251
mov ecx, eax
call fcn.00402f80
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 0x58510b
mov ecx, edi
call fcn.00449020
mov eax, dword [edi]
mov ecx, edi
push str.Failed_to_create_HCRYPTHASH
call dword [eax + 0x14]
lea ecx, [ebp - 0x324]
call fcn.0042a960
lea ecx, [ebp - 0x2a4]
mov byte [ebp - 4], 4
call fcn.00448050
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 0x585166
mov ecx, edi
call fcn.00449020
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 0x585251
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 0x585200
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 0x585200
mov ecx, edi
call fcn.00449020
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 0x585251
cmp byte [edi + 0x129], 0
je 0x58521b
push dword [ebp - 0x298]
mov ecx, edi
push str.cryptSigSize
call fcn.00448770
push dword [ebp - 0x298]
mov ecx, dword [ebp - 0x5a8]
lea eax, [ebp - 0x290]
push eax
call fcn.00435260
mov ecx, dword [ebp - 0x5a8]
call fcn.0043a870
mov eax, dword [ebp - 0x294]
test eax, eax
je 0x58524f
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov bl, 1
lea ecx, [ebp - 0x598]
call fcn.00403970
lea ecx, [ebp - 0x398]
call fcn.0042a960
lea ecx, [ebp - 0x40c]
call fcn.0042a960
lea ecx, [ebp - 0x480]
call fcn.0042a960
jmp 0x585281
xor bl, bl
lea ecx, [ebp - 0x2b0]
call fcn.00448050
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.005af618
mov esp, ebp
pop ebp
ret