Function at 0x5fb990
Capabilities:
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x64027c
mov eax, dword fs:[0]
push eax
sub esp, 0x44c
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 - 0x2b4]
mov esi, dword [ebp + 0x1c]
xorps xmm0, xmm0
mov ebx, dword [ebp + 0x10]
push str.msPadAndSignHashV2
mov dword [ebp - 0x444], eax
mov eax, dword [ebp + 0x18]
push esi
mov dword [ebp - 0x450], ebx
mov dword [ebp - 0x448], eax
movq qword [ebp - 0x2b4], xmm0
mov dword [ebp - 0x2ac], 0
call fcn.004b2490
mov dword [ebp - 4], 0
test ebx, ebx
je 0x5fbaf1
mov edi, dword [ebp + 0x14]
test edi, edi
je 0x5fbaf1
cmp edi, 0x100
ja 0x5fbaf1
cmp byte [esi + 0x129], 0
mov ebx, dword [ebp + 0xc]
je 0x5fba88
push 0x74
lea eax, [ebp - 0x328]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x328]
call fcn.00494a40
lea eax, [ebp - 0x328]
mov byte [ebp - 4], 1
push eax
push ebx
call fcn.004c4800
add esp, 8
lea eax, [ebp - 0x328]
mov ecx, esi
push eax
push str.hashAlg
call fcn.004b3100
lea ecx, [ebp - 0x328]
mov byte [ebp - 4], 0
call fcn.00494a90
push esi
call fcn.005fae00
add esp, 4
test al, al
jne 0x5fbac4
mov eax, dword [esi]
mov ecx, esi
push str.Unable_to_acquire_private_key_function.
call dword [eax + 0x18]
push esi
push dword [ebp - 0x448]
push 1
push edi
push dword [ebp - 0x450]
push ebx
push dword [ebp - 0x444]
call fcn.005fb3e0
add esp, 0x1c
mov bl, al
jmp 0x5fbaf3
mov ecx, dword [ebp - 0x448]
call fcn.004a0bb0
mov ecx, dword [ebp - 0x444]
push esi
call fcn.0051c5f0
mov dword [ebp - 0x44c], eax
test eax, eax
jne 0x5fbb1c
mov eax, dword [esi]
mov ecx, esi
push str.Failed_to_get_MsCertificate.
call dword [eax + 0x14]
xor bl, bl
lea ecx, [ebp - 0x2b4]
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
push esi
lea ecx, [ebp - 0x29c]
mov dword [ebp - 0x29c], 0
push ecx
mov ecx, eax
call fcn.005b9890
mov dword [ebp - 0x454], eax
test eax, eax
je 0x5fbaa1
push 0x118
lea eax, [ebp - 0x440]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x440]
call fcn.00468d60
mov ecx, dword [ebp - 0x444]
lea eax, [ebp - 0x440]
push esi
push eax
mov byte [ebp - 4], 2
call fcn.0051d190
test al, al
je 0x5fbc7a
mov eax, dword [ebp - 0x44c]
lea ecx, [ebp - 0x440]
add eax, 0x18
push eax
mov dword [ebp - 0x44c], eax
call fcn.0046a660
test al, al
jne 0x5fbc7a
push str.setSmartCardPin5
xorps xmm0, xmm0
mov dword [ebp - 0x2a0], 0
push esi
lea ecx, [ebp - 0x2a8]
movq qword [ebp - 0x2a8], xmm0
call fcn.004b2490
mov eax, dword [esi]
mov ecx, esi
push str.setting_smart_card_pin..
mov byte [ebp - 4], 3
call dword [eax + 0x18]
lea ecx, [ebp - 0x440]
call fcn.0046a860
push esi
push 0
push eax
push 0x21
push dword [ebp - 0x454]
call fcn.005fac80
add esp, 0x14
test eax, eax
jne 0x5fbc59
mov eax, dword [esi]
mov ecx, esi
push str.CryptSetProvParam_failed.
call dword [eax + 0x14]
push 2
push dword [0x715bbc]
mov ecx, esi
call fcn.004b37e0
mov ecx, esi
call fcn.004b3640
mov eax, dword [esi]
mov ecx, esi
push str.Incorrect_Smartcard_PIN
call dword [eax + 0x18]
mov eax, dword [ebp - 0x444]
cmp byte [eax + 0x150], 0
je 0x5fbc59
lea ecx, [ebp - 0x2a8]
call fcn.004b2630
lea ecx, [ebp - 0x440]
xor bl, bl
call fcn.00468df0
jmp 0x5fbaf3
mov ecx, dword [ebp - 0x44c]
lea eax, [ebp - 0x440]
push eax
call fcn.0046a070
lea ecx, [ebp - 0x2a8]
mov byte [ebp - 4], 2
call fcn.004b2630
push ebx
call fcn.005fae70
add esp, 4
mov dword [ebp - 0x44c], eax
test eax, eax
jne 0x5fbd42
mov ecx, dword [ebp - 0x444]
push esi
call fcn.0051c5f0
mov dword [ebp - 0x458], eax
test eax, eax
jne 0x5fbcc5
mov eax, dword [esi]
mov ecx, esi
push str.Failed_to_get_MS_Certificate.
call dword [eax + 0x14]
lea ecx, [ebp - 0x440]
xor bl, bl
call fcn.00468df0
jmp 0x5fbaf3
push 0x74
lea eax, [ebp - 0x328]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x328]
call fcn.00494a40
mov ecx, dword [ebp - 0x458]
lea eax, [ebp - 0x328]
push esi
push eax
mov byte [ebp - 4], 4
call fcn.005b84a0
push str.VinRCSP
lea ecx, [ebp - 0x328]
call fcn.00498940
test al, al
jne 0x5fbd22
push str.EVOLIUM_REDTRUST_CSP
lea ecx, [ebp - 0x328]
call fcn.00498940
test al, al
je 0x5fbd2d
mov eax, 0x800c
mov dword [ebp - 0x44c], eax
lea ecx, [ebp - 0x328]
mov byte [ebp - 4], 2
call fcn.00494a90
mov eax, dword [ebp - 0x44c]
lea ecx, [ebp - 0x294]
push ecx
push 0
push 0
push eax
push dword [ebp - 0x454]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x5fbd96
push ebx
push str.hashAlg
mov ecx, esi
call fcn.004b2d90
mov eax, dword [ebp - 0x44c]
mov ecx, esi
push eax
push str.algId
call fcn.004b2d90
mov ecx, esi
call fcn.004b3640
mov eax, dword [esi]
mov ecx, esi
push str.Failed_to_create_HCRYPTHASH
call dword [eax + 0x14]
jmp 0x5fbe3f
push edi
push dword [ebp - 0x450]
lea eax, [ebp - 0x90]
push eax
call fcn.004777e0
add esp, 0xc
lea eax, [ebp - 0x90]
push 0
push eax
push 2
push dword [ebp - 0x294]
call dword [sym.imp.ADVAPI32.dll_CryptSetHashParam]
test eax, eax
jne 0x5fbde8
mov ecx, esi
call fcn.004b3640
push dword [ebp - 0x294]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [esi]
mov ecx, esi
push str.Failed_to_CryptSetHashParam
call dword [eax + 0x14]
jmp 0x5fbe3f
lea eax, [ebp - 0x298]
mov dword [ebp - 0x298], 0x200
push eax
lea eax, [ebp - 0x290]
push eax
xor eax, eax
test ebx, ebx
sete al
push eax
push 0
push dword [ebp - 0x29c]
push dword [ebp - 0x294]
call dword [sym.imp.ADVAPI32.dll_CryptSignHashA]
test eax, eax
jne 0x5fbe70
mov eax, dword [esi]
mov ecx, esi
push str.CryptSignHash_failed.
call dword [eax + 0x14]
mov ecx, esi
call fcn.004b3640
push dword [ebp - 0x294]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push esi
push dword [ebp - 0x448]
push 1
push edi
push dword [ebp - 0x450]
push ebx
push dword [ebp - 0x444]
call fcn.005fb3e0
add esp, 0x1c
lea ecx, [ebp - 0x440]
mov bl, al
call fcn.00468df0
jmp 0x5fbaf3
cmp byte [esi + 0x129], 0
je 0x5fbe8b
push dword [ebp - 0x298]
mov ecx, esi
push str.cryptSigSize
call fcn.004b2d90
push dword [ebp - 0x298]
mov ecx, dword [ebp - 0x448]
lea eax, [ebp - 0x290]
push eax
call fcn.0049f210
mov ecx, dword [ebp - 0x448]
call fcn.004a4a60
mov eax, dword [ebp - 0x294]
test eax, eax
je 0x5fbebf
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
lea ecx, [ebp - 0x440]
mov bl, 1
call fcn.00468df0
jmp 0x5fbaf3