Function at 0x101814f0
Capabilities:
Initialize hashing via wincrypt

Disassembly:
push 0xffffffffffffffff
push 0x101aacad
mov eax, dword fs:[0]
push eax
sub esp, 0x594
mov eax, dword [0x1026d48c]
xor eax, esp
mov dword [esp + 0x590], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x1026d48c]
xor eax, esp
push eax
lea eax, [esp + 0x5a8]
mov dword fs:[0], eax
mov esi, dword [esp + 0x5d0]
mov ebx, dword [esp + 0x5cc]
mov ebp, dword [esp + 0x5b8]
mov edi, dword [esp + 0x5c0]
push str.msPadAndSignHash
push esi
lea ecx, [esp + 0x24]
mov dword [esp + 0x34], ebx
call fcn.10061630
test edi, edi
mov dword [esp + 0x5b0], 0
je 0x10181600
mov eax, dword [esp + 0x5c4]
test eax, eax
je 0x10181600
cmp eax, 0x80
ja 0x10181600
push eax
lea eax, [esp + 0x328]
push edi
push eax
call fcn.10016e70
add esp, 0xc
lea ecx, [esp + 0x3c]
call fcn.10010fb0
mov edx, dword [esp + 0x5bc]
lea ecx, [esp + 0x3c]
push ecx
push edx
mov byte [esp + 0x5b8], 1
call fcn.1007cdc0
add esp, 8
lea eax, [esp + 0x3c]
push eax
push str.hashAlg
mov ecx, esi
call fcn.10060fd0
mov ecx, ebx
call fcn.10017ff0
push esi
mov ecx, ebp
call fcn.100b6720
mov edi, eax
test edi, edi
jne 0x1018161b
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Failed_to_get_MsCertificate.
mov ecx, esi
call eax
lea ecx, [esp + 0x3c]
mov byte [esp + 0x5b0], 0
call fcn.10011070
lea ecx, [esp + 0x1c]
mov dword [esp + 0x5b0], 0xffffffff
call fcn.100616a0
xor al, al
jmp 0x10181a91
lea ecx, [esp + 0xb0]
call fcn.10010fb0
lea ecx, [esp + 0x124]
mov byte [esp + 0x5b0], 2
call fcn.10010fb0
push esi
lea ecx, [esp + 0xb4]
push ecx
mov ecx, edi
mov byte [esp + 0x5b8], 3
call fcn.10159800
lea edx, [esp + 0xb0]
push edx
push str.cert_key_container
mov ecx, esi
call fcn.10060fd0
push esi
lea eax, [esp + 0x128]
push eax
mov ecx, edi
call fcn.10159840
lea ecx, [esp + 0x124]
push ecx
push str.cert_def_provider
mov ecx, esi
call fcn.10060fd0
push esi
push 0
mov ecx, edi
call fcn.101598b0
test eax, eax
je 0x10181892
mov ecx, eax
call fcn.100f6330
lea ecx, [esp + 0x198]
mov dword [esp + 0x28], eax
call fcn.1000a870
push esi
lea edx, [esp + 0x19c]
push edx
mov ecx, ebp
mov byte [esp + 0x5b8], 4
call fcn.100b4e40
test al, al
je 0x1018175b
lea ecx, [esp + 0x198]
call fcn.1000b6e0
mov ebx, eax
lea eax, [edi + 0x18]
push eax
lea ecx, [esp + 0x19c]
call fcn.1000c6c0
test al, al
jne 0x1018175b
mov eax, dword [esp + 0x28]
push esi
push 0
push ebx
push 0x21
push eax
call fcn.100d5510
add esp, 0x14
test eax, eax
jne 0x1018174b
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.10061460
mov edx, dword [esi]
mov eax, dword [edx + 0x18]
push str.Incorrect_Smartcard_PIN
mov ecx, esi
call eax
cmp byte [ebp + 0x150], 0
jne 0x1018187e
lea ecx, [esp + 0x198]
push ecx
lea ecx, [edi + 0x18]
call fcn.1000b020
mov eax, dword [esp + 0x5bc]
cmp eax, 0x10
jne 0x1018176e
mov ebx, 0x8008
jmp 0x10181779
push eax
call fcn.101814a0
add esp, 4
mov ebx, eax
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x14]
push edx
push 0
push 0
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x10181915
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x5bc]
push ecx
push str.hashAlg
mov ecx, esi
mov ebp, eax
call fcn.100612a0
push ebx
push str.algId
mov ecx, esi
call fcn.100612a0
mov ecx, esi
call fcn.10061460
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Failed_to_create_HCRYPTHASH
mov ecx, esi
call eax
cmp ebp, 0x80090008
jne 0x1018187e
mov eax, dword [esp + 0x5bc]
cmp eax, 7
je 0x101817fa
cmp eax, 2
je 0x101817fa
cmp eax, 3
jne 0x1018187e
push str.retryWithEnhancedRsaAesCsp
push esi
lea ecx, [esp + 0x38]
call fcn.10061630
lea ecx, [esp + 0x2b0]
mov byte [esp + 0x5b0], 5
call fcn.10010fb0
lea ebp, [edi + 0x134]
push ebp
lea ecx, [esp + 0x2b4]
mov byte [esp + 0x5b4], 6
call fcn.10012ae0
push str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
mov ecx, ebp
call fcn.10012ba0
mov ecx, edi
call fcn.10157a30
push esi
push 0
mov ecx, edi
call fcn.101598b0
test eax, eax
jne 0x101818bf
lea ecx, [esp + 0x2b0]
mov byte [esp + 0x5b0], 5
call fcn.10011070
lea ecx, [esp + 0x30]
mov byte [esp + 0x5b0], 4
call fcn.100616a0
lea ecx, [esp + 0x198]
mov byte [esp + 0x5b0], 3
call fcn.1000a910
lea ecx, [esp + 0x124]
mov byte [esp + 0x5b0], 2
call fcn.10011070
lea ecx, [esp + 0xb0]
mov byte [esp + 0x5b0], 1
call fcn.10011070
jmp 0x101815ef
mov ecx, eax
call fcn.100f6330
lea ecx, [esp + 0x14]
push ecx
push 0
push 0
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x101818f0
mov ecx, esi
call fcn.10061460
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Failed_to_create_HCRYPTHASH
mov ecx, esi
call eax
lea ecx, [esp + 0x2b0]
mov byte [esp + 0x5b0], 5
call fcn.10011070
lea ecx, [esp + 0x30]
mov byte [esp + 0x5b0], 4
call fcn.100616a0
mov edx, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x328]
push ecx
push 2
push edx
call dword [sym.imp.ADVAPI32.dll_CryptSetHashParam]
test eax, eax
jne 0x10181955
mov ecx, esi
call fcn.10061460
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
jmp 0x1018187e
cmp byte [esp + 0x5c8], 0
mov eax, 1
mov edi, 2
mov ebp, str.AT_SIGNATURE
je 0x1018197a
mov eax, edi
mov edi, 1
mov ebp, str.AT_KEYEXCHANGE
mov ebx, dword [sym.imp.ADVAPI32.dll_CryptSignHashA]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x3a8]
push edx
push 0
push 0
push eax
mov eax, dword [esp + 0x28]
push eax
mov dword [esp + 0x30], 0x200
call ebx
test eax, eax
jne 0x101819e6
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x3a8]
push edx
push eax
push eax
mov eax, dword [esp + 0x24]
push edi
push eax
call ebx
test eax, eax
jne 0x101819e6
mov ecx, esi
call fcn.10061460
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 0x1018187e
cmp byte [esi + 0x125], 0
je 0x10181a00
mov ecx, dword [esp + 0x18]
push ecx
push str.cryptSigSize
mov ecx, esi
call fcn.100612a0
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x2c]
push edx
lea eax, [esp + 0x3a8]
push eax
mov ecx, esi
call fcn.10019380
mov ecx, esi
call fcn.100185a0
mov eax, dword [esp + 0x14]
test eax, eax
je 0x10181a2e
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
lea ecx, [esp + 0x198]
mov byte [esp + 0x5b0], 3
call fcn.1000a910
lea ecx, [esp + 0x124]
mov byte [esp + 0x5b0], 2
call fcn.10011070
lea ecx, [esp + 0xb0]
mov byte [esp + 0x5b0], 1
call fcn.10011070
lea ecx, [esp + 0x3c]
mov byte [esp + 0x5b0], 0
call fcn.10011070
lea ecx, [esp + 0x1c]
mov dword [esp + 0x5b0], 0xffffffff
call fcn.100616a0
mov al, 1
mov ecx, dword [esp + 0x5a8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x590]
xor ecx, esp
call fcn.1018f87e
add esp, 0x5a0
ret