Function at 0x555890
Capabilities:
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x74bfe7
mov eax, dword fs:[0]
push eax
sub esp, 0x514
mov eax, dword [0x899944]
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 - 0x518]
mov dword [ebp - 0x51c], eax
call fcn.00474ef0
mov dword [ebp - 4], 0
test edi, edi
je 0x55597e
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x55597e
cmp eax, 0x80
ja 0x55597e
push eax
lea ecx, [ebp - 0x90]
push edi
push ecx
call fcn.00408d60
add esp, 0xc
lea ecx, [ebp - 0x304]
call fcn.0040ac30
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0x304]
push edx
push eax
mov byte [ebp - 4], 1
call fcn.00488ca0
add esp, 8
lea ecx, [ebp - 0x304]
push ecx
push str.hashAlg
mov ecx, esi
call fcn.00474890
mov ecx, dword [ebp - 0x51c]
call fcn.0040fb90
push esi
mov ecx, ebx
call fcn.0052a270
mov edi, eax
test edi, edi
jne 0x555997
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.0040acf0
lea ecx, [ebp - 0x518]
mov dword [ebp - 4], 0xffffffff
call fcn.00474f80
xor al, al
jmp 0x555ca7
lea ecx, [ebp - 0x3ec]
call fcn.0040ac30
lea ecx, [ebp - 0x378]
mov byte [ebp - 4], 2
call fcn.0040ac30
push esi
lea ecx, [ebp - 0x3ec]
push ecx
mov ecx, edi
mov byte [ebp - 4], 3
call fcn.0052f250
lea edx, [ebp - 0x3ec]
push edx
push str.cert_key_container
mov ecx, esi
call fcn.00474890
push esi
lea eax, [ebp - 0x378]
push eax
mov ecx, edi
call fcn.0052f290
lea ecx, [ebp - 0x378]
push ecx
push str.cert_def_provider
mov ecx, esi
call fcn.00474890
push esi
push 0
mov ecx, edi
call fcn.0052f2d0
test eax, eax
je 0x555b19
mov ecx, eax
call fcn.004033b0
lea ecx, [ebp - 0x504]
mov dword [ebp - 0x520], eax
call fcn.00403e00
push esi
lea edx, [ebp - 0x504]
push edx
mov ecx, ebx
mov byte [ebp - 4], 4
call fcn.00529580
test al, al
je 0x555aa4
lea ecx, [ebp - 0x504]
call fcn.00404b50
add edi, 0x18
push edi
lea ecx, [ebp - 0x504]
mov ebx, eax
call fcn.004059e0
test al, al
jne 0x555aa4
mov eax, dword [ebp - 0x520]
push esi
push 0
push ebx
push 0x21
push eax
call fcn.0056a320
add esp, 0x14
test eax, eax
jne 0x555a96
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.
mov ecx, esi
call eax
mov ecx, esi
call fcn.00474d10
lea ecx, [ebp - 0x504]
push ecx
mov ecx, edi
call fcn.00404500
mov ebx, dword [ebp + 0xc]
cmp ebx, 0x10
jne 0x555ab3
mov edi, 0x8008
jmp 0x555abe
push ebx
call fcn.00555840
add esp, 4
mov edi, eax
mov eax, dword [ebp - 0x520]
lea edx, [ebp - 0x508]
push edx
push 0
push 0
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x555b3c
push ebx
push str.hashAlg
mov ecx, esi
call fcn.00474a80
push edi
push str.algId
mov ecx, esi
call fcn.00474a80
mov ecx, esi
call fcn.00474d10
push str.Failed_to_create_HCRYPTHASH
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
mov ecx, esi
call eax
lea ecx, [ebp - 0x504]
mov byte [ebp - 4], 3
call fcn.00403e90
lea ecx, [ebp - 0x378]
mov byte [ebp - 4], 2
call fcn.0040acf0
lea ecx, [ebp - 0x3ec]
mov byte [ebp - 4], 1
call fcn.0040acf0
jmp 0x55596f
mov edx, dword [ebp - 0x508]
push 0
lea ecx, [ebp - 0x90]
push ecx
push 2
push edx
call dword [sym.imp.ADVAPI32.dll_CryptSetHashParam]
test eax, eax
jne 0x555b73
mov ecx, esi
call fcn.00474d10
mov eax, dword [ebp - 0x508]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push str.Failed_to_CryptSetHashParam
jmp 0x555b01
cmp byte [ebp + 0x18], 0
mov eax, 1
lea edi, [eax + 1]
mov ebx, str.AT_SIGNATURE
je 0x555b90
mov eax, edi
lea edi, [eax - 1]
mov ebx, str.AT_KEYEXCHANGE
lea ecx, [ebp - 0x50c]
push ecx
lea edx, [ebp - 0x290]
push edx
push 0
push 0
push eax
mov eax, dword [ebp - 0x508]
push eax
mov dword [ebp - 0x50c], 0x200
call dword [sym.imp.ADVAPI32.dll_CryptSignHashA]
test eax, eax
jne 0x555c08
lea ecx, [ebp - 0x50c]
push ecx
lea edx, [ebp - 0x290]
push edx
push eax
push eax
mov eax, dword [ebp - 0x508]
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_CryptSignHashA]
test eax, eax
jne 0x555c08
mov ecx, esi
call fcn.00474d10
mov ecx, dword [ebp - 0x508]
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 0x555b0a
cmp byte [esi + 0xad], 0
je 0x555c24
mov ecx, dword [ebp - 0x50c]
push ecx
push str.cryptSigSize
mov ecx, esi
call fcn.00474a80
mov edx, dword [ebp - 0x50c]
mov esi, dword [ebp - 0x51c]
push edx
lea eax, [ebp - 0x290]
push eax
mov ecx, esi
call fcn.00411260
mov ecx, esi
call fcn.00410070
mov eax, dword [ebp - 0x508]
test eax, eax
je 0x555c57
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
lea ecx, [ebp - 0x504]
mov byte [ebp - 4], 3
call fcn.00403e90
lea ecx, [ebp - 0x378]
mov byte [ebp - 4], 2
call fcn.0040acf0
lea ecx, [ebp - 0x3ec]
mov byte [ebp - 4], 1
call fcn.0040acf0
lea ecx, [ebp - 0x304]
mov byte [ebp - 4], 0
call fcn.0040acf0
lea ecx, [ebp - 0x518]
mov dword [ebp - 4], 0xffffffff
call fcn.00474f80
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.0070bb4c
mov esp, ebp
pop ebp
ret