Function at 0x5493d0
Capabilities:
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5bd68d
mov eax, dword fs:[0]
push eax
sub esp, 0x598
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 + 0x1c]
mov esi, dword [ebp + 0x20]
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
push str.msPadAndSignHash
push esi
lea ecx, [ebp - 0x590]
mov dword [ebp - 0x594], eax
call fcn.0045a1b0
mov dword [ebp - 4], 0
test edi, edi
je 0x5494be
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x5494be
cmp eax, 0x80
ja 0x5494be
push eax
lea ecx, [ebp - 0x90]
push edi
push ecx
call fcn.00421f50
add esp, 0xc
lea ecx, [ebp - 0x304]
call fcn.0044f8c0
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0x304]
push edx
push eax
mov byte [ebp - 4], 1
call fcn.0047bd90
add esp, 8
lea ecx, [ebp - 0x304]
push ecx
push str.hashAlg
mov ecx, esi
call fcn.00459a60
mov ecx, dword [ebp - 0x594]
call fcn.0041b6b0
push esi
mov ecx, ebx
call fcn.004f2b30
mov edi, eax
test edi, edi
jne 0x5494d7
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Failed_to_get_MsCertificate.
mov ecx, esi
call eax
lea ecx, [ebp - 0x304]
mov byte [ebp - 4], 0
call fcn.0044f980
lea ecx, [ebp - 0x590]
mov dword [ebp - 4], 0xffffffff
call fcn.0045a240
xor al, al
jmp 0x54992b
lea ecx, [ebp - 0x3ec]
call fcn.0044f8c0
lea ecx, [ebp - 0x378]
mov byte [ebp - 4], 2
call fcn.0044f8c0
push esi
lea ecx, [ebp - 0x3ec]
push ecx
mov ecx, edi
mov byte [ebp - 4], 3
call fcn.0054c3c0
lea edx, [ebp - 0x3ec]
push edx
push str.cert_key_container
mov ecx, esi
call fcn.00459a60
push esi
lea eax, [ebp - 0x378]
push eax
mov ecx, edi
call fcn.0054c400
lea ecx, [ebp - 0x378]
push ecx
push str.cert_def_provider
mov ecx, esi
call fcn.00459a60
push esi
push 0
mov ecx, edi
call fcn.0054c470
test eax, eax
je 0x54973a
mov ecx, eax
call fcn.004078c0
lea ecx, [ebp - 0x504]
mov dword [ebp - 0x598], eax
call fcn.00412fd0
push esi
lea edx, [ebp - 0x504]
push edx
mov ecx, ebx
mov byte [ebp - 4], 4
call fcn.004f12c0
test al, al
je 0x54960e
lea ecx, [ebp - 0x504]
call fcn.00413d50
mov dword [ebp - 0x580], eax
lea eax, [edi + 0x18]
push eax
lea ecx, [ebp - 0x504]
call fcn.00414bf0
test al, al
jne 0x54960e
mov eax, dword [ebp - 0x580]
mov ecx, dword [ebp - 0x598]
push esi
push 0
push eax
push 0x21
push ecx
call fcn.0058d9d0
add esp, 0x14
test eax, eax
jne 0x5495ff
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.__2_
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
jne 0x54972b
lea ecx, [ebp - 0x504]
push ecx
lea ecx, [edi + 0x18]
call fcn.004136e0
mov eax, dword [ebp + 0xc]
cmp eax, 0x10
jne 0x549622
mov dword [ebp - 0x580], 0x8008
jmp 0x549631
push eax
call fcn.00549380
add esp, 4
mov dword [ebp - 0x580], eax
mov eax, dword [ebp - 0x580]
mov ecx, dword [ebp - 0x598]
lea edx, [ebp - 0x57c]
push edx
push 0
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x5497b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp + 0xc]
push edx
push str.hashAlg
mov ecx, esi
mov ebx, eax
call fcn.00459e10
mov eax, dword [ebp - 0x580]
push eax
push str.algId
mov ecx, esi
call fcn.00459e10
mov ecx, esi
call fcn.00459fd0
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Failed_to_create_HCRYPTHASH
mov ecx, esi
call eax
cmp ebx, 0x80090008
jne 0x54972b
mov eax, dword [ebp + 0xc]
cmp eax, 7
je 0x5496b6
cmp eax, 2
je 0x5496b6
cmp eax, 3
jne 0x54972b
push str.retryWithEnhancedRsaAesCsp
push esi
lea ecx, [ebp - 0x5a4]
call fcn.0045a1b0
lea ecx, [ebp - 0x578]
mov byte [ebp - 4], 5
call fcn.0044f8c0
lea ebx, [edi + 0x134]
push ebx
lea ecx, [ebp - 0x578]
mov byte [ebp - 4], 6
call fcn.00451450
push str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
mov ecx, ebx
call fcn.00451510
mov ecx, edi
call fcn.0054a4e0
push esi
push 0
mov ecx, edi
call fcn.0054c470
test eax, eax
jne 0x54975d
lea ecx, [ebp - 0x578]
mov byte [ebp - 4], 5
call fcn.0044f980
lea ecx, [ebp - 0x5a4]
mov byte [ebp - 4], 4
call fcn.0045a240
lea ecx, [ebp - 0x504]
mov byte [ebp - 4], 3
call fcn.00413060
lea ecx, [ebp - 0x378]
mov byte [ebp - 4], 2
call fcn.0044f980
lea ecx, [ebp - 0x3ec]
mov byte [ebp - 4], 1
call fcn.0044f980
jmp 0x5494af
mov ecx, eax
call fcn.004078c0
mov edx, dword [ebp - 0x580]
lea ecx, [ebp - 0x57c]
push ecx
push 0
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x549796
mov ecx, esi
call fcn.00459fd0
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.Failed_to_create_HCRYPTHASH
mov ecx, esi
call edx
lea ecx, [ebp - 0x578]
mov byte [ebp - 4], 5
call fcn.0044f980
lea ecx, [ebp - 0x5a4]
mov byte [ebp - 4], 4
call fcn.0045a240
mov ecx, dword [ebp - 0x57c]
push 0
lea eax, [ebp - 0x90]
push eax
push 2
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptSetHashParam]
test eax, eax
jne 0x5497f7
mov ecx, esi
call fcn.00459fd0
mov edx, dword [ebp - 0x57c]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.Failed_to_CryptSetHashParam
mov ecx, esi
call edx
jmp 0x54972b
cmp byte [ebp + 0x18], 0
mov eax, 1
lea edi, [eax + 1]
mov ebx, str.AT_SIGNATURE
je 0x549814
mov eax, edi
lea edi, [eax - 1]
mov ebx, str.AT_KEYEXCHANGE
lea ecx, [ebp - 0x584]
push ecx
lea edx, [ebp - 0x290]
push edx
push 0
push 0
push eax
mov eax, dword [ebp - 0x57c]
push eax
mov dword [ebp - 0x584], 0x200
call dword [sym.imp.ADVAPI32.dll_CryptSignHashA]
test eax, eax
jne 0x54988c
lea ecx, [ebp - 0x584]
push ecx
lea edx, [ebp - 0x290]
push edx
push eax
push eax
mov eax, dword [ebp - 0x57c]
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_CryptSignHashA]
test eax, eax
jne 0x54988c
mov ecx, esi
call fcn.00459fd0
mov ecx, dword [ebp - 0x57c]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov edx, dword [esi]
mov eax, dword [edx + 0x2c]
push ebx
push str.failedToSignWith
mov ecx, esi
call eax
jmp 0x54972b
cmp byte [esi + 0x125], 0
je 0x5498a8
mov ecx, dword [ebp - 0x584]
push ecx
push str.cryptSigSize
mov ecx, esi
call fcn.00459e10
mov edx, dword [ebp - 0x584]
mov esi, dword [ebp - 0x594]
push edx
lea eax, [ebp - 0x290]
push eax
mov ecx, esi
call fcn.0041ca10
mov ecx, esi
call fcn.0041bc60
mov eax, dword [ebp - 0x57c]
test eax, eax
je 0x5498db
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
lea ecx, [ebp - 0x504]
mov byte [ebp - 4], 3
call fcn.00413060
lea ecx, [ebp - 0x378]
mov byte [ebp - 4], 2
call fcn.0044f980
lea ecx, [ebp - 0x3ec]
mov byte [ebp - 4], 1
call fcn.0044f980
lea ecx, [ebp - 0x304]
mov byte [ebp - 4], 0
call fcn.0044f980
lea ecx, [ebp - 0x590]
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