Function at 0x5a4340
Capabilities:
Initialize hashing via wincrypt

Disassembly:
push 0xffffffffffffffff
push 0x653337
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x434
push ebx
push ebp
push esi
mov esi, dword [esp + 0x464]
push edi
push str.msPadAndSignHashV2
push esi
lea ecx, [esp + 0x1c]
call fcn.004f0370
mov ebp, dword [esp + 0x45c]
mov dword [esp + 0x44c], 0
test ebp, ebp
je 0x5a4707
mov edi, dword [esp + 0x460]
test edi, edi
je 0x5a4707
cmp edi, 0x80
ja 0x5a4707
mov al, byte [esi + 0x121]
mov ebx, dword [esp + 0x458]
test al, al
je 0x5a43fc
lea ecx, [esp + 0x38]
call fcn.004e57f0
lea eax, [esp + 0x38]
mov byte [esp + 0x44c], 1
push eax
push ebx
call fcn.0055ceb0
add esp, 8
lea ecx, [esp + 0x38]
push ecx
push str.hashAlg
mov ecx, esi
call fcn.004efcb0
lea ecx, [esp + 0x38]
mov byte [esp + 0x44c], 0
call fcn.004e58d0
push esi
call fcn.0062c020
add esp, 4
test al, al
jne 0x5a4421
mov edx, dword [esp + 0x464]
mov eax, dword [esp + 0x454]
push esi
push edx
push 1
push edi
push ebp
push ebx
push eax
jmp 0x5a448d
mov ecx, dword [esp + 0x464]
call fcn.004dd9e0
mov edi, dword [esp + 0x454]
push esi
mov ecx, edi
call fcn.0059f450
mov ebp, eax
test ebp, ebp
jne 0x5a4453
mov edx, dword [esi]
push str.Failed_to_get_MsCertificate.
mov ecx, esi
call dword [edx + 0x14]
jmp 0x5a4707
lea eax, [esp + 0x24]
push esi
push eax
mov ecx, ebp
mov dword [esp + 0x2c], 0
call fcn.005a9c90
test eax, eax
mov dword [esp + 0x28], eax
jne 0x5a44b2
mov ecx, dword [esp + 0x464]
mov edx, dword [esp + 0x460]
mov eax, dword [esp + 0x45c]
push esi
push ecx
push 1
push edx
push eax
push ebx
push edi
call fcn.005a3eb0
add esp, 0x1c
lea ecx, [esp + 0x14]
mov bl, al
mov dword [esp + 0x44c], 0xffffffff
call fcn.004f03e0
mov al, bl
jmp 0x5a4795
lea ecx, [esp + 0xac]
call fcn.004d91b0
lea ecx, [esp + 0xac]
push esi
push ecx
mov ecx, edi
mov byte [esp + 0x454], 2
call fcn.005a13c0
test al, al
je 0x5a45a7
add ebp, 0x18
lea ecx, [esp + 0xac]
push ebp
call fcn.004dbf20
test al, al
jne 0x5a45a7
push str.setSmartCardPin
push esi
lea ecx, [esp + 0x34]
call fcn.004f0370
mov edx, dword [esi]
push str.setting_smart_card_pin..
mov ecx, esi
mov byte [esp + 0x450], 3
call dword [edx + 0x18]
lea ecx, [esp + 0xac]
call fcn.004da900
push esi
push 0
push eax
mov eax, dword [esp + 0x34]
push 0x21
push eax
call fcn.0062bf60
add esp, 0x14
test eax, eax
jne 0x5a4587
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.__3_
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 [edi + 0x150]
test al, al
je 0x5a4587
lea ecx, [esp + 0x2c]
mov byte [esp + 0x44c], 2
call fcn.004f03e0
jmp 0x5a46f3
lea eax, [esp + 0xac]
mov ecx, ebp
push eax
call fcn.004d99c0
lea ecx, [esp + 0x2c]
mov byte [esp + 0x44c], 2
call fcn.004f03e0
push ebx
call fcn.005a3e80
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x5a4604
push esi
mov ecx, edi
call fcn.0059f450
mov edi, eax
test edi, edi
jne 0x5a45d5
mov edx, dword [esi]
push str.Failed_to_get_MS_Certificate.
mov ecx, esi
call dword [edx + 0x14]
jmp 0x5a46f3
lea ecx, [esp + 0x38]
call fcn.004e57f0
lea eax, [esp + 0x38]
push esi
push eax
mov ecx, edi
mov byte [esp + 0x454], 4
call fcn.005a9950
lea ecx, [esp + 0x38]
mov byte [esp + 0x44c], 2
call fcn.004e58d0
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x10]
push ecx
push 0
push 0
push ebp
push edx
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x5a464f
push ebx
push str.hashAlg
mov ecx, esi
call fcn.004effe0
push ebp
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 0x5a46f3
mov ecx, dword [esp + 0x460]
mov edx, dword [esp + 0x45c]
push ecx
lea eax, [esp + 0x1c8]
push edx
push eax
call fcn.004f1950
mov edx, dword [esp + 0x1c]
add esp, 0xc
lea ecx, [esp + 0x1c4]
push 0
push ecx
push 2
push edx
call dword [sym.imp.ADVAPI32.dll_CryptSetHashParam]
test eax, eax
jne 0x5a46aa
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 0x5a46f3
xor eax, eax
mov dword [esp + 0x20], 0x200
test ebx, ebx
jne 0x5a46bd
mov eax, 1
lea ecx, [esp + 0x20]
lea edx, [esp + 0x244]
push ecx
mov ecx, dword [esp + 0x14]
push edx
push eax
mov eax, dword [esp + 0x30]
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptSignHashA]
test eax, eax
jne 0x5a471f
mov ecx, esi
call fcn.004f01e0
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
lea ecx, [esp + 0xac]
mov byte [esp + 0x44c], 0
call fcn.004d9240
lea ecx, [esp + 0x14]
mov dword [esp + 0x44c], 0xffffffff
call fcn.004f03e0
xor al, al
jmp 0x5a4795
mov al, byte [esi + 0x121]
test al, al
je 0x5a473a
mov eax, dword [esp + 0x20]
mov ecx, esi
push eax
push str.cryptSigSize
call fcn.004effe0
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x464]
lea edx, [esp + 0x244]
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 0x5a476b
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
lea ecx, [esp + 0xac]
mov byte [esp + 0x44c], 0
call fcn.004d9240
lea ecx, [esp + 0x14]
mov dword [esp + 0x44c], 0xffffffff
call fcn.004f03e0
mov al, 1
mov ecx, dword [esp + 0x444]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x440
ret