Function at 0x588a50
Capabilities:
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5cfb52
mov eax, dword fs:[0]
push eax
sub esp, 0x5a0
mov eax, dword [0x692c00]
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.004481f0
mov dword [ebp - 4], 0
test esi, esi
je 0x588fcf
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x588fcf
cmp eax, 0x80
ja 0x588fcf
push eax
lea eax, [ebp - 0x90]
push esi
push eax
call fcn.0040df90
push 0x74
lea eax, [ebp - 0x480]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x18
lea ecx, [ebp - 0x480]
call fcn.0042aaf0
mov ebx, dword [ebp + 0xc]
lea eax, [ebp - 0x480]
push eax
push ebx
mov byte [ebp - 4], 1
call fcn.0045a100
add esp, 8
lea eax, [ebp - 0x480]
mov ecx, edi
push eax
push str.hashAlg
call fcn.00448d80
mov ecx, dword [ebp - 0x5a8]
call fcn.00436dd0
mov ecx, dword [ebp - 0x59c]
push edi
call fcn.004ac720
mov esi, eax
mov dword [ebp - 0x5a0], esi
test esi, esi
jne 0x588b78
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.0042ab40
jmp 0x588fd1
push 0x74
lea eax, [ebp - 0x40c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x40c]
call fcn.0042aaf0
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.0042aaf0
push edi
lea eax, [ebp - 0x40c]
mov byte [ebp - 4], 3
push eax
mov ecx, esi
call fcn.0053f010
lea eax, [ebp - 0x40c]
mov ecx, edi
push eax
push str.cert_key_container
call fcn.00448d80
push edi
lea eax, [ebp - 0x398]
mov ecx, esi
push eax
call fcn.0053ed30
lea eax, [ebp - 0x398]
mov ecx, edi
push eax
push str.cert_def_provider
call fcn.00448d80
push edi
push 0
mov ecx, esi
call fcn.0053ec30
test eax, eax
jne 0x588c15
xor bl, bl
jmp 0x588fac
mov ecx, eax
call fcn.00402fb0
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.00403910
mov ecx, dword [ebp - 0x59c]
lea eax, [ebp - 0x598]
push edi
push eax
mov byte [ebp - 4], 4
call fcn.004ad2c0
test al, al
je 0x588cef
lea ecx, [ebp - 0x598]
call fcn.00405410
add esi, 0x18
mov dword [ebp - 0x5ac], eax
push esi
lea ecx, [ebp - 0x598]
call fcn.00405210
test al, al
jne 0x588cef
push edi
push 0
push dword [ebp - 0x5ac]
push 0x21
push dword [ebp - 0x5a4]
call fcn.005882f0
add esp, 0x14
test eax, eax
jne 0x588ce1
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.004492c0
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 0x588f4c
lea eax, [ebp - 0x598]
mov ecx, esi
push eax
call fcn.00404c20
cmp ebx, 0x10
jne 0x588cfb
mov eax, 0x8008
jmp 0x588d04
push ebx
call fcn.005884e0
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 0x588e75
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push ebx
push str.hashAlg
mov ecx, edi
mov esi, eax
call fcn.00448a10
push dword [ebp - 0x59c]
mov ecx, edi
push str.algId
call fcn.00448a10
mov ecx, edi
call fcn.004492c0
mov eax, dword [edi]
mov ecx, edi
push str.Failed_to_create_HCRYPTHASH
call dword [eax + 0x14]
cmp esi, 0x80090008
jne 0x588f4c
cmp ebx, 7
je 0x588d83
cmp ebx, 2
je 0x588d83
cmp ebx, 3
jne 0x588f4c
push str.retryWithEnhancedRsaAesCsp
xorps xmm0, xmm0
mov dword [ebp - 0x29c], 0
push edi
lea ecx, [ebp - 0x2a4]
movq qword [ebp - 0x2a4], xmm0
call fcn.004481f0
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.0042aaf0
mov ebx, dword [ebp - 0x5a0]
lea ecx, [ebp - 0x324]
mov byte [ebp - 4], 6
lea esi, [ebx + 0x134]
push esi
call fcn.0042adc0
push str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
mov ecx, esi
call fcn.00431a20
mov ecx, ebx
call fcn.0053ebc0
push edi
push 0
mov ecx, ebx
call fcn.0053ec30
test eax, eax
jne 0x588e25
lea ecx, [ebp - 0x324]
call fcn.0042ab40
lea ecx, [ebp - 0x2a4]
call fcn.004482f0
xor bl, bl
jmp 0x588fa1
mov ecx, eax
call fcn.00402fb0
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 0x588e5b
mov ecx, edi
call fcn.004492c0
mov eax, dword [edi]
mov ecx, edi
push str.Failed_to_create_HCRYPTHASH
call dword [eax + 0x14]
lea ecx, [ebp - 0x324]
call fcn.0042ab40
lea ecx, [ebp - 0x2a4]
mov byte [ebp - 4], 4
call fcn.004482f0
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 0x588eb6
mov ecx, edi
call fcn.004492c0
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 0x588fa1
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 0x588f50
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 0x588f50
mov ecx, edi
call fcn.004492c0
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 0x588fa1
cmp byte [edi + 0x129], 0
je 0x588f6b
push dword [ebp - 0x298]
mov ecx, edi
push str.cryptSigSize
call fcn.00448a10
push dword [ebp - 0x298]
mov ecx, dword [ebp - 0x5a8]
lea eax, [ebp - 0x290]
push eax
call fcn.004354f0
mov ecx, dword [ebp - 0x5a8]
call fcn.0043ab10
mov eax, dword [ebp - 0x294]
test eax, eax
je 0x588f9f
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov bl, 1
lea ecx, [ebp - 0x598]
call fcn.004039a0
lea ecx, [ebp - 0x398]
call fcn.0042ab40
lea ecx, [ebp - 0x40c]
call fcn.0042ab40
lea ecx, [ebp - 0x480]
call fcn.0042ab40
jmp 0x588fd1
xor bl, bl
lea ecx, [ebp - 0x2b0]
call fcn.004482f0
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.005b34c8
mov esp, ebp
pop ebp
ret