Function at 0x5a3eb0
Capabilities:
Initialize hashing via wincrypt

Disassembly:
push 0xffffffffffffffff
push 0x6532e7
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x50c
push ebx
push ebp
push esi
mov esi, dword [esp + 0x540]
push edi
push str.msPadAndSignHash
push esi
lea ecx, [esp + 0x20]
call fcn.004f0370
mov ecx, dword [esp + 0x534]
mov dword [esp + 0x524], 0
test ecx, ecx
je 0x5a4255
mov eax, dword [esp + 0x538]
test eax, eax
je 0x5a4255
cmp eax, 0x80
ja 0x5a4255
push eax
lea eax, [esp + 0x2a0]
push ecx
push eax
call fcn.004f1950
add esp, 0xc
lea ecx, [esp + 0x28]
call fcn.004e57f0
mov ebx, dword [esp + 0x530]
lea ecx, [esp + 0x28]
push ecx
push ebx
mov byte [esp + 0x52c], 1
call fcn.0055ceb0
add esp, 8
lea edx, [esp + 0x28]
mov ecx, esi
push edx
push str.hashAlg
call fcn.004efcb0
mov ecx, dword [esp + 0x540]
call fcn.004dd9e0
mov ebp, dword [esp + 0x52c]
push esi
mov ecx, ebp
call fcn.0059f450
mov edi, eax
test edi, edi
jne 0x5a3f94
mov eax, dword [esi]
push str.Failed_to_get_MsCertificate.
mov ecx, esi
call dword [eax + 0x14]
jmp 0x5a4244
lea ecx, [esp + 0x9c]
call fcn.004e57f0
lea ecx, [esp + 0x110]
mov byte [esp + 0x524], 2
call fcn.004e57f0
lea ecx, [esp + 0x9c]
push esi
push ecx
mov ecx, edi
mov byte [esp + 0x52c], 3
call fcn.005a9910
lea edx, [esp + 0x9c]
mov ecx, esi
push edx
push str.cert_key_container
call fcn.004efcb0
lea eax, [esp + 0x110]
push esi
push eax
mov ecx, edi
call fcn.005a9950
lea ecx, [esp + 0x110]
push ecx
push str.cert_def_provider
mov ecx, esi
call fcn.004efcb0
push esi
push 0
mov ecx, edi
call fcn.005a99c0
test eax, eax
je 0x5a421c
mov ecx, eax
call fcn.005a8750
lea ecx, [esp + 0x184]
mov dword [esp + 0x24], eax
call fcn.004d91b0
lea edx, [esp + 0x184]
push esi
push edx
mov ecx, ebp
mov byte [esp + 0x52c], 4
call fcn.005a13c0
test al, al
je 0x5a40d5
lea ecx, [esp + 0x184]
call fcn.004da900
add edi, 0x18
lea ecx, [esp + 0x184]
push edi
mov ebx, eax
call fcn.004dbf20
test al, al
jne 0x5a40ce
mov eax, dword [esp + 0x24]
push esi
push 0
push ebx
push 0x21
push eax
call fcn.0062bf60
add esp, 0x14
test eax, eax
jne 0x5a40bf
mov edx, dword [esi]
push str.CryptSetProvParam_failed.
mov ecx, esi
call dword [edx + 0x14]
mov eax, dword [esi]
push str.Failed_to_set_the_smartcard_PIN.__2_
mov ecx, esi
call dword [eax + 0x14]
mov ecx, esi
call fcn.004f01e0
mov edx, dword [esi]
push str.Incorrect_Smartcard_PIN
mov ecx, esi
call dword [edx + 0x18]
mov al, byte [ebp + 0x150]
test al, al
jne 0x5a4208
lea eax, [esp + 0x184]
mov ecx, edi
push eax
call fcn.004d99c0
mov ebx, dword [esp + 0x530]
cmp ebx, 0x10
jne 0x5a40e1
mov edi, 0x8008
jmp 0x5a40ec
push ebx
call fcn.005a3e80
add esp, 4
mov edi, eax
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x10]
push ecx
push 0
push 0
push edi
push edx
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x5a4137
push ebx
push str.hashAlg
mov ecx, esi
call fcn.004effe0
push edi
push str.algId
mov ecx, esi
call fcn.004effe0
mov ecx, esi
call fcn.004f01e0
mov eax, dword [esi]
push str.Failed_to_create_HCRYPTHASH
mov ecx, esi
call dword [eax + 0x14]
jmp 0x5a4208
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x29c]
push 0
push ecx
push 2
push edx
call dword [sym.imp.ADVAPI32.dll_CryptSetHashParam]
test eax, eax
jne 0x5a4175
mov ecx, esi
call fcn.004f01e0
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov edx, dword [esi]
push str.Failed_to_CryptSetHashParam
mov ecx, esi
call dword [edx + 0x14]
jmp 0x5a4208
mov cl, byte [esp + 0x53c]
mov eax, 1
test cl, cl
mov edi, 2
mov ebp, str.AT_SIGNATURE
je 0x5a419b
mov eax, edi
mov edi, 1
mov ebp, str.AT_KEYEXCHANGE
lea ecx, [esp + 0x14]
lea edx, [esp + 0x31c]
mov ebx, dword [sym.imp.ADVAPI32.dll_CryptSignHashA]
push ecx
push edx
push 0
push 0
push eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x28], 0x200
push eax
call ebx
test eax, eax
jne 0x5a4270
lea ecx, [esp + 0x14]
lea edx, [esp + 0x31c]
push ecx
push edx
push eax
push eax
mov eax, dword [esp + 0x20]
push edi
push eax
call ebx
test eax, eax
jne 0x5a4270
mov ecx, esi
call fcn.004f01e0
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov edx, dword [esi]
push ebp
push str.failedToSignWith
mov ecx, esi
call dword [edx + 0x2c]
lea ecx, [esp + 0x184]
mov byte [esp + 0x524], 3
call fcn.004d9240
lea ecx, [esp + 0x110]
mov byte [esp + 0x524], 2
call fcn.004e58d0
lea ecx, [esp + 0x9c]
mov byte [esp + 0x524], 1
call fcn.004e58d0
lea ecx, [esp + 0x28]
mov byte [esp + 0x524], 0
call fcn.004e58d0
lea ecx, [esp + 0x18]
mov dword [esp + 0x524], 0xffffffff
call fcn.004f03e0
xor al, al
jmp 0x5a431f
mov al, byte [esi + 0x121]
test al, al
je 0x5a428b
mov eax, dword [esp + 0x14]
mov ecx, esi
push eax
push str.cryptSigSize
call fcn.004effe0
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x540]
lea edx, [esp + 0x31c]
push ecx
push edx
mov ecx, esi
call fcn.004e1260
mov ecx, esi
call fcn.004e0070
mov eax, dword [esp + 0x10]
test eax, eax
je 0x5a42bc
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
lea ecx, [esp + 0x184]
mov byte [esp + 0x524], 3
call fcn.004d9240
lea ecx, [esp + 0x110]
mov byte [esp + 0x524], 2
call fcn.004e58d0
lea ecx, [esp + 0x9c]
mov byte [esp + 0x524], 1
call fcn.004e58d0
lea ecx, [esp + 0x28]
mov byte [esp + 0x524], 0
call fcn.004e58d0
lea ecx, [esp + 0x18]
mov dword [esp + 0x524], 0xffffffff
call fcn.004f03e0
mov al, 1
mov ecx, dword [esp + 0x51c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x518
ret