Function at 0x549950
Capabilities:
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5bd6f7
mov eax, dword fs:[0]
push eax
sub esp, 0x448
mov eax, dword [0x68683c]
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 + 0x18]
mov esi, dword [ebp + 0x1c]
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
push str.msPadAndSignHashV2
push esi
lea ecx, [ebp - 0x438]
mov dword [ebp - 0x428], edi
mov dword [ebp - 0x420], eax
call fcn.0045a1b0
mov dword [ebp - 4], 0
test edi, edi
je 0x549a99
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x549a99
cmp eax, 0x100
ja 0x549a99
cmp byte [esi + 0x125], 0
mov edi, dword [ebp + 0xc]
je 0x549a19
lea ecx, [ebp - 0x304]
call fcn.0044f8c0
lea ecx, [ebp - 0x304]
push ecx
push edi
mov byte [ebp - 4], 1
call fcn.0047bd90
add esp, 8
lea edx, [ebp - 0x304]
push edx
push str.hashAlg
mov ecx, esi
call fcn.00459a60
lea ecx, [ebp - 0x304]
mov byte [ebp - 4], 0
call fcn.0044f980
push esi
call fcn.0058da40
add esp, 4
test al, al
jne 0x549a6e
mov eax, dword [esi]
mov edx, dword [eax + 0x18]
push str.Unable_to_acquire_private_key_function.
mov ecx, esi
call edx
mov eax, dword [ebp - 0x420]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0x428]
push esi
push eax
push 1
push ecx
push edx
push edi
push ebx
call fcn.005493d0
add esp, 0x1c
mov bl, al
lea ecx, [ebp - 0x438]
mov dword [ebp - 4], 0xffffffff
call fcn.0045a240
mov al, bl
jmp 0x549e76
mov ecx, dword [ebp - 0x420]
call fcn.0041b6b0
push esi
mov ecx, ebx
call fcn.004f2b30
mov dword [ebp - 0x424], eax
test eax, eax
jne 0x549ab2
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.Failed_to_get_MsCertificate.
mov ecx, esi
call edx
lea ecx, [ebp - 0x438]
mov dword [ebp - 4], 0xffffffff
call fcn.0045a240
xor al, al
jmp 0x549e76
push esi
lea ecx, [ebp - 0x440]
push ecx
mov ecx, eax
mov dword [ebp - 0x440], 0
call fcn.0054c710
mov dword [ebp - 0x444], eax
test eax, eax
jne 0x549aef
mov edx, dword [ebp - 0x420]
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x428]
push esi
push edx
push 1
push eax
push ecx
jmp 0x549a49
lea ecx, [ebp - 0x41c]
call fcn.00412fd0
push esi
lea edx, [ebp - 0x41c]
push edx
mov ecx, ebx
mov byte [ebp - 4], 2
call fcn.004f12c0
test al, al
je 0x549bfd
mov eax, dword [ebp - 0x424]
add eax, 0x18
push eax
lea ecx, [ebp - 0x41c]
mov dword [ebp - 0x424], eax
call fcn.00414bf0
test al, al
jne 0x549bfd
push str.setSmartCardPin5
push esi
lea ecx, [ebp - 0x454]
call fcn.0045a1b0
mov eax, dword [esi]
mov edx, dword [eax + 0x18]
push str.setting_smart_card_pin..
mov ecx, esi
mov byte [ebp - 4], 3
call edx
lea ecx, [ebp - 0x41c]
call fcn.00413d50
push esi
push 0
push eax
mov eax, dword [ebp - 0x444]
push 0x21
push eax
call fcn.0058d9d0
add esp, 0x14
test eax, eax
jne 0x549bdc
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.CryptSetProvParam_failed.
mov ecx, esi
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Failed_to_set_the_smartcard_PIN.__3_
mov ecx, esi
call eax
mov ecx, esi
call fcn.00459fd0
mov edx, dword [esi]
mov eax, dword [edx + 0x18]
push str.Incorrect_Smartcard_PIN
mov ecx, esi
call eax
cmp byte [ebx + 0x150], 0
je 0x549bdc
lea ecx, [ebp - 0x454]
mov byte [ebp - 4], 2
call fcn.0045a240
lea ecx, [ebp - 0x41c]
mov byte [ebp - 4], 0
call fcn.00413060
jmp 0x549a99
lea ecx, [ebp - 0x41c]
push ecx
mov ecx, dword [ebp - 0x424]
call fcn.004136e0
lea ecx, [ebp - 0x454]
mov byte [ebp - 4], 2
call fcn.0045a240
push edi
call fcn.00549380
add esp, 4
mov dword [ebp - 0x424], eax
test eax, eax
jne 0x549cb1
push esi
mov ecx, ebx
call fcn.004f2b30
mov dword [ebp - 0x448], eax
test eax, eax
jne 0x549c48
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Failed_to_get_MS_Certificate.
mov ecx, esi
call eax
lea ecx, [ebp - 0x41c]
mov byte [ebp - 4], 0
call fcn.00413060
jmp 0x549a99
lea ecx, [ebp - 0x304]
call fcn.0044f8c0
push esi
lea ecx, [ebp - 0x304]
push ecx
mov ecx, dword [ebp - 0x448]
mov byte [ebp - 4], 4
call fcn.0054c400
push str.VinRCSP
lea ecx, [ebp - 0x304]
call fcn.00451b00
test al, al
jne 0x549c92
push str.EVOLIUM_REDTRUST_CSP
lea ecx, [ebp - 0x304]
call fcn.00451b00
test al, al
je 0x549c9c
mov dword [ebp - 0x424], 0x800c
lea ecx, [ebp - 0x304]
mov byte [ebp - 4], 2
call fcn.0044f980
mov eax, dword [ebp - 0x424]
lea edx, [ebp - 0x42c]
push edx
push 0
push 0
push eax
mov eax, dword [ebp - 0x444]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x549d38
push edi
push str.hashAlg
mov ecx, esi
call fcn.00459e10
mov ecx, dword [ebp - 0x424]
push ecx
push str.algId
mov ecx, esi
call fcn.00459e10
mov ecx, esi
call fcn.00459fd0
push str.Failed_to_create_HCRYPTHASH
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
mov ecx, esi
call eax
mov ecx, dword [ebp - 0x420]
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x428]
push esi
push ecx
push 1
push edx
push eax
push edi
push ebx
call fcn.005493d0
add esp, 0x1c
lea ecx, [ebp - 0x41c]
mov bl, al
mov byte [ebp - 4], 0
call fcn.00413060
jmp 0x549a55
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0x428]
push ecx
push edx
lea eax, [ebp - 0x90]
push eax
call fcn.00421f50
mov edx, dword [ebp - 0x42c]
add esp, 0xc
push 0
lea ecx, [ebp - 0x90]
push ecx
push 2
push edx
call dword [sym.imp.ADVAPI32.dll_CryptSetHashParam]
test eax, eax
jne 0x549d8c
mov ecx, esi
call fcn.00459fd0
mov eax, dword [ebp - 0x42c]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push str.Failed_to_CryptSetHashParam
jmp 0x549cfa
xor eax, eax
mov dword [ebp - 0x43c], 0x200
test edi, edi
jne 0x549d9f
lea eax, [edi + 1]
lea ecx, [ebp - 0x43c]
push ecx
mov ecx, dword [ebp - 0x42c]
lea edx, [ebp - 0x290]
push edx
push eax
mov eax, dword [ebp - 0x440]
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptSignHashA]
test eax, eax
jne 0x549e04
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.CryptSignHash_failed.
mov ecx, esi
call eax
mov ecx, esi
call fcn.00459fd0
mov ecx, dword [ebp - 0x42c]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov edx, dword [ebp - 0x420]
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x428]
push esi
push edx
push 1
push eax
push ecx
jmp 0x549d18
cmp byte [esi + 0x125], 0
je 0x549e20
mov edx, dword [ebp - 0x43c]
push edx
push str.cryptSigSize
mov ecx, esi
call fcn.00459e10
mov eax, dword [ebp - 0x43c]
mov esi, dword [ebp - 0x420]
push eax
lea ecx, [ebp - 0x290]
push ecx
mov ecx, esi
call fcn.0041ca10
mov ecx, esi
call fcn.0041bc60
mov eax, dword [ebp - 0x42c]
test eax, eax
je 0x549e53
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
lea ecx, [ebp - 0x41c]
mov byte [ebp - 4], 0
call fcn.00413060
lea ecx, [ebp - 0x438]
mov dword [ebp - 4], 0xffffffff
call fcn.0045a240
mov al, 1
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.005a6cf8
mov esp, ebp
pop ebp
ret