Function at 0x5fb3e0
Capabilities:
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x640212
mov eax, dword fs:[0]
push eax
sub esp, 0x5a0
mov eax, dword [0x717f80]
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.004b2490
mov dword [ebp - 4], 0
test esi, esi
je 0x5fb962
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x5fb962
cmp eax, 0x80
ja 0x5fb962
push eax
lea eax, [ebp - 0x90]
push esi
push eax
call fcn.004777e0
push 0x74
lea eax, [ebp - 0x480]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x18
lea ecx, [ebp - 0x480]
call fcn.00494a40
mov ebx, dword [ebp + 0xc]
lea eax, [ebp - 0x480]
push eax
push ebx
mov byte [ebp - 4], 1
call fcn.004c4800
add esp, 8
lea eax, [ebp - 0x480]
mov ecx, edi
push eax
push str.hashAlg
call fcn.004b3100
mov ecx, dword [ebp - 0x5a8]
call fcn.004a0bb0
mov ecx, dword [ebp - 0x59c]
push edi
call fcn.0051c5f0
mov esi, eax
mov dword [ebp - 0x5a0], esi
test esi, esi
jne 0x5fb508
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.00494a90
jmp 0x5fb964
push 0x74
lea eax, [ebp - 0x40c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x40c]
call fcn.00494a40
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.00494a40
push edi
lea eax, [ebp - 0x40c]
mov byte [ebp - 4], 3
push eax
mov ecx, esi
call fcn.005b8780
lea eax, [ebp - 0x40c]
mov ecx, edi
push eax
push str.cert_key_container
call fcn.004b3100
push edi
lea eax, [ebp - 0x398]
mov ecx, esi
push eax
call fcn.005b84a0
lea eax, [ebp - 0x398]
mov ecx, edi
push eax
push str.cert_def_provider
call fcn.004b3100
push edi
push 0
mov ecx, esi
call fcn.005b83a0
test eax, eax
jne 0x5fb5a5
xor bl, bl
jmp 0x5fb93f
mov ecx, eax
call fcn.0046e290
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.00468d60
mov ecx, dword [ebp - 0x59c]
lea eax, [ebp - 0x598]
push edi
push eax
mov byte [ebp - 4], 4
call fcn.0051d190
test al, al
je 0x5fb682
lea ecx, [ebp - 0x598]
call fcn.0046a860
add esi, 0x18
mov dword [ebp - 0x5ac], eax
push esi
lea ecx, [ebp - 0x598]
call fcn.0046a660
test al, al
jne 0x5fb682
push edi
push 0
push dword [ebp - 0x5ac]
push 0x21
push dword [ebp - 0x5a4]
call fcn.005fac80
add esp, 0x14
test eax, eax
jne 0x5fb674
mov eax, dword [edi]
mov ecx, edi
push str.CryptSetProvParam_failed.
call dword [eax + 0x14]
push 1
push dword [0x715bbc]
mov ecx, edi
call fcn.004b37e0
mov ecx, edi
call fcn.004b3640
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 0x5fb8df
lea eax, [ebp - 0x598]
mov ecx, esi
push eax
call fcn.0046a070
cmp ebx, 0x10
jne 0x5fb68e
mov eax, 0x8008
jmp 0x5fb697
push ebx
call fcn.005fae70
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 0x5fb808
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push str.hashAlg
mov ecx, edi
mov esi, eax
call fcn.004b2d90
push dword [ebp - 0x59c]
mov ecx, edi
push str.algId
call fcn.004b2d90
mov ecx, edi
call fcn.004b3640
mov eax, dword [edi]
mov ecx, edi
push str.Failed_to_create_HCRYPTHASH
call dword [eax + 0x14]
cmp esi, 0x80090008
jne 0x5fb8df
cmp ebx, 7
je 0x5fb716
cmp ebx, 2
je 0x5fb716
cmp ebx, 3
jne 0x5fb8df
push str.retryWithEnhancedRsaAesCsp
xorps xmm0, xmm0
mov dword [ebp - 0x29c], 0
push edi
lea ecx, [ebp - 0x2a4]
movq qword [ebp - 0x2a4], xmm0
call fcn.004b2490
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.00494a40
mov ebx, dword [ebp - 0x5a0]
lea ecx, [ebp - 0x324]
mov byte [ebp - 4], 6
lea esi, [ebx + 0x134]
push esi
call fcn.00494d10
push str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
mov ecx, esi
call fcn.0049b7e0
mov ecx, ebx
call fcn.005b8330
push edi
push 0
mov ecx, ebx
call fcn.005b83a0
test eax, eax
jne 0x5fb7b8
lea ecx, [ebp - 0x324]
call fcn.00494a90
lea ecx, [ebp - 0x2a4]
call fcn.004b2630
xor bl, bl
jmp 0x5fb934
mov ecx, eax
call fcn.0046e290
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 0x5fb7ee
mov ecx, edi
call fcn.004b3640
mov eax, dword [edi]
mov ecx, edi
push str.Failed_to_create_HCRYPTHASH
call dword [eax + 0x14]
lea ecx, [ebp - 0x324]
call fcn.00494a90
lea ecx, [ebp - 0x2a4]
mov byte [ebp - 4], 4
call fcn.004b2630
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 0x5fb849
mov ecx, edi
call fcn.004b3640
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 0x5fb934
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 0x5fb8e3
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 0x5fb8e3
mov ecx, edi
call fcn.004b3640
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 0x5fb934
cmp byte [edi + 0x129], 0
je 0x5fb8fe
push dword [ebp - 0x298]
mov ecx, edi
push str.cryptSigSize
call fcn.004b2d90
push dword [ebp - 0x298]
mov ecx, dword [ebp - 0x5a8]
lea eax, [ebp - 0x290]
push eax
call fcn.0049f210
mov ecx, dword [ebp - 0x5a8]
call fcn.004a4a60
mov eax, dword [ebp - 0x294]
test eax, eax
je 0x5fb932
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov bl, 1
lea ecx, [ebp - 0x598]
call fcn.00468df0
lea ecx, [ebp - 0x398]
call fcn.00494a90
lea ecx, [ebp - 0x40c]
call fcn.00494a90
lea ecx, [ebp - 0x480]
call fcn.00494a90
jmp 0x5fb964
xor bl, bl
lea ecx, [ebp - 0x2b0]
call fcn.004b2630
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.00622073
mov esp, ebp
pop ebp
ret