Function at 0x5b7740
Capabilities:
Initialize hashing via wincrypt

Disassembly:
push 0xffffffffffffffff
push 0x697067
mov eax, dword fs:[0]
push eax
sub esp, 0x518
mov eax, dword [0x78f694]
xor eax, esp
mov dword [esp + 0x514], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x78f694]
xor eax, esp
push eax
lea eax, [esp + 0x52c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x550]
mov esi, dword [esp + 0x554]
mov ebp, dword [esp + 0x53c]
mov edi, dword [esp + 0x544]
push str.msPadAndSignHash
push esi
lea ecx, [esp + 0x24]
mov dword [esp + 0x34], eax
call fcn.004b1850
xor ebx, ebx
cmp edi, ebx
mov dword [esp + 0x534], ebx
je 0x5b784f
mov eax, dword [esp + 0x548]
cmp eax, ebx
je 0x5b784f
cmp eax, 0x80
ja 0x5b784f
push eax
lea ecx, [esp + 0x2ac]
push edi
push ecx
call fcn.0047e290
add esp, 0xc
lea ecx, [esp + 0x34]
call fcn.00485650
mov eax, dword [esp + 0x540]
lea edx, [esp + 0x34]
push edx
push eax
mov byte [esp + 0x53c], 1
call fcn.0048d830
add esp, 8
lea ecx, [esp + 0x34]
push ecx
push str.hashAlg
mov ecx, esi
call fcn.004b1210
mov ecx, dword [esp + 0x2c]
call fcn.00467d60
push esi
mov ecx, ebp
call fcn.00554a00
mov edi, eax
cmp edi, ebx
jne 0x5b786a
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Failed_to_get_MsCertificate.
mov ecx, esi
call eax
lea ecx, [esp + 0x34]
mov byte [esp + 0x534], bl
call fcn.00485710
lea ecx, [esp + 0x1c]
mov dword [esp + 0x534], 0xffffffff
call fcn.004b18c0
xor al, al
jmp 0x5b7c51
lea ecx, [esp + 0x11c]
call fcn.00485650
lea ecx, [esp + 0xa8]
mov byte [esp + 0x534], 2
call fcn.00485650
push esi
lea ecx, [esp + 0x120]
push ecx
mov ecx, edi
mov byte [esp + 0x53c], 3
call fcn.005ae160
lea edx, [esp + 0x11c]
push edx
push str.cert_key_container
mov ecx, esi
call fcn.004b1210
push esi
lea eax, [esp + 0xac]
push eax
mov ecx, edi
call fcn.005ae1a0
lea ecx, [esp + 0xa8]
push ecx
push str.cert_def_provider
mov ecx, esi
call fcn.004b1210
push esi
push ebx
mov ecx, edi
call fcn.005ae210
cmp eax, ebx
je 0x5b7a24
mov ecx, eax
call fcn.00544a30
lea ecx, [esp + 0x190]
mov dword [esp + 0x28], eax
call fcn.0047f3a0
push esi
lea edx, [esp + 0x194]
push edx
mov ecx, ebp
mov byte [esp + 0x53c], 4
call fcn.005538f0
test al, al
je 0x5b79a8
lea ecx, [esp + 0x190]
call fcn.00480160
add edi, 0x18
push edi
lea ecx, [esp + 0x194]
mov dword [esp + 0x34], eax
call fcn.00481140
test al, al
jne 0x5b79a8
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x28]
push esi
push ebx
push eax
push 0x21
push ecx
call fcn.005d5bd0
add esp, 0x14
cmp eax, ebx
jne 0x5b7999
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.004b1680
mov edx, dword [esi]
mov eax, dword [edx + 0x18]
push str.Incorrect_Smartcard_PIN
mov ecx, esi
call eax
cmp byte [ebp + 0x150], bl
jne 0x5b7a10
lea ecx, [esp + 0x190]
push ecx
mov ecx, edi
call fcn.0047fac0
mov ebp, dword [esp + 0x540]
cmp ebp, 0x10
jne 0x5b79bb
mov edi, 0x8008
jmp 0x5b79c6
push ebp
call fcn.005b76f0
add esp, 4
mov edi, eax
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x14]
push edx
push ebx
push ebx
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x5b7a77
push ebp
push str.hashAlg
mov ecx, esi
call fcn.004b14c0
push edi
push str.algId
mov ecx, esi
call fcn.004b14c0
mov ecx, esi
call fcn.004b1680
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Failed_to_create_HCRYPTHASH
mov ecx, esi
call eax
lea ecx, [esp + 0x190]
mov byte [esp + 0x534], 3
call fcn.0047f440
lea ecx, [esp + 0xa8]
mov byte [esp + 0x534], 2
call fcn.00485710
lea ecx, [esp + 0x11c]
mov byte [esp + 0x534], 1
call fcn.00485710
lea ecx, [esp + 0x34]
mov byte [esp + 0x534], bl
call fcn.00485710
lea ecx, [esp + 0x1c]
mov dword [esp + 0x534], 0xffffffff
call fcn.004b18c0
xor al, al
jmp 0x5b7c51
mov edx, dword [esp + 0x14]
push ebx
lea ecx, [esp + 0x2ac]
push ecx
push 2
push edx
call dword [sym.imp.ADVAPI32.dll_CryptSetHashParam]
test eax, eax
jne 0x5b7b1c
mov ecx, esi
call fcn.004b1680
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Failed_to_CryptSetHashParam
mov ecx, esi
call eax
lea ecx, [esp + 0x190]
mov byte [esp + 0x534], 3
call fcn.0047f440
lea ecx, [esp + 0xa8]
mov byte [esp + 0x534], 2
call fcn.00485710
lea ecx, [esp + 0x11c]
mov byte [esp + 0x534], 1
call fcn.00485710
lea ecx, [esp + 0x34]
mov byte [esp + 0x534], bl
call fcn.00485710
lea ecx, [esp + 0x1c]
mov dword [esp + 0x534], 0xffffffff
call fcn.004b18c0
xor al, al
jmp 0x5b7c51
cmp byte [esp + 0x54c], bl
mov eax, 1
lea edi, [eax + 1]
mov ebp, str.AT_SIGNATURE
je 0x5b7b3c
mov eax, edi
lea edi, [eax - 1]
mov ebp, str.AT_KEYEXCHANGE
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x32c]
push edx
push ebx
push ebx
push eax
mov eax, dword [esp + 0x28]
push eax
mov dword [esp + 0x30], 0x200
call dword [sym.imp.ADVAPI32.dll_CryptSignHashA]
cmp eax, ebx
jne 0x5b7ba8
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x32c]
push edx
push ebx
push ebx
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_CryptSignHashA]
cmp eax, ebx
jne 0x5b7ba8
mov ecx, esi
call fcn.004b1680
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov edx, dword [esi]
mov eax, dword [edx + 0x2c]
push ebp
push str.failedToSignWith
mov ecx, esi
call eax
jmp 0x5b7a10
cmp byte [esi + 0x121], bl
je 0x5b7bc1
mov ecx, dword [esp + 0x18]
push ecx
push str.cryptSigSize
mov ecx, esi
call fcn.004b14c0
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x2c]
push edx
lea eax, [esp + 0x32c]
push eax
mov ecx, esi
call fcn.00469150
mov ecx, esi
call fcn.00468330
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x5b7bef
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
lea ecx, [esp + 0x190]
mov byte [esp + 0x534], 3
call fcn.0047f440
lea ecx, [esp + 0xa8]
mov byte [esp + 0x534], 2
call fcn.00485710
lea ecx, [esp + 0x11c]
mov byte [esp + 0x534], 1
call fcn.00485710
lea ecx, [esp + 0x34]
mov byte [esp + 0x534], bl
call fcn.00485710
lea ecx, [esp + 0x1c]
mov dword [esp + 0x534], 0xffffffff
call fcn.004b18c0
mov al, 1
mov ecx, dword [esp + 0x52c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x514]
xor ecx, esp
call fcn.0062cbd3
add esp, 0x524
ret