Function at 0x14022b300
Capabilities:
Initialize hashing via wincrypt

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x5c8]
sub rsp, 0x6c8
mov rax, qword [0x14037d7c0]
xor rax, rsp
mov qword [rbp + 0x5b0], rax
mov ebx, r9d
mov r15, r8
mov esi, edx
mov r14, rcx
mov r12, qword [rbp + 0x638]
mov rdi, qword [rbp + 0x640]
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x70], rax
lea r8, str.msPadAndSignHash
mov rdx, rdi
lea rcx, [rsp + 0x60]
call fcn.1400d0c20
nop
test r15, r15
je 0x14022b914
lea eax, [rbx - 1]
cmp eax, 0x7f
ja 0x14022b914
mov r8d, ebx
mov rdx, r15
lea rcx, [rbp + 0x330]
call fcn.14008ed60
xorps xmm0, xmm0
movups xmmword [rbp + 0x130], xmm0
movups xmmword [rbp + 0x140], xmm0
movups xmmword [rbp + 0x150], xmm0
movups xmmword [rbp + 0x160], xmm0
movups xmmword [rbp + 0x170], xmm0
movups xmmword [rbp + 0x180], xmm0
movups xmmword [rbp + 0x190], xmm0
movups xmmword [rbp + 0x1a0], xmm0
movups xmmword [rbp + 0x1b0], xmm0
lea rcx, [rbp + 0x130]
call fcn.1400ae5e0
nop
lea rdx, [rbp + 0x130]
mov ecx, esi
call fcn.1400e42a0
lea r8, [rbp + 0x130]
lea rdx, str.hashAlg
mov rcx, rdi
call fcn.1400d17e0
mov rcx, r12
call fcn.1400be850
mov rdx, rdi
mov rcx, r14
call fcn.1401489f0
mov r15, rax
test rax, rax
jne 0x14022b436
mov rax, qword [rdi]
lea rdx, str.Failed_to_get_MsCertificate.
mov rcx, rdi
call qword [rax + 0x28]
xor bl, bl
jmp 0x14022b906
xorps xmm0, xmm0
movups xmmword [rbp + 0xa0], xmm0
movups xmmword [rbp + 0xb0], xmm0
movups xmmword [rbp + 0xc0], xmm0
movups xmmword [rbp + 0xd0], xmm0
movups xmmword [rbp + 0xe0], xmm0
movups xmmword [rbp + 0xf0], xmm0
movups xmmword [rbp + 0x100], xmm0
movups xmmword [rbp + 0x110], xmm0
movups xmmword [rbp + 0x120], xmm0
lea rcx, [rbp + 0xa0]
call fcn.1400ae5e0
nop
xorps xmm0, xmm0
movups xmmword [rbp + 0x10], xmm0
movups xmmword [rbp + 0x20], xmm0
movups xmmword [rbp + 0x30], xmm0
movups xmmword [rbp + 0x40], xmm0
movups xmmword [rbp + 0x50], xmm0
movups xmmword [rbp + 0x60], xmm0
movups xmmword [rbp + 0x70], xmm0
movups xmmword [rbp + 0x80], xmm0
movups xmmword [rbp + 0x90], xmm0
lea rcx, [rbp + 0x10]
call fcn.1400ae5e0
nop
mov r8, rdi
lea rdx, [rbp + 0xa0]
mov rcx, r15
call fcn.1401d81b0
lea r8, [rbp + 0xa0]
lea rdx, str.cert_key_container
mov rcx, rdi
call fcn.1400d17e0
mov r8, rdi
lea rdx, [rbp + 0x10]
mov rcx, r15
call fcn.1401d7df0
lea r8, [rbp + 0x10]
lea rdx, str.cert_def_provider
mov rcx, rdi
call fcn.1400d17e0
mov r8, rdi
xor edx, edx
mov rcx, r15
call fcn.1401d7ce0
test rax, rax
jne 0x14022b51f
xor bl, bl
jmp 0x14022b8ef
mov rcx, rax
call fcn.1400868e0
mov r13, rax
xor edx, edx
mov r8d, 0x170
lea rcx, [rbp + 0x1c0]
call sub.VCRUNTIME140.dll_memset
lea rcx, [rbp + 0x1c0]
call fcn.14007fbb0
nop
mov r8, rdi
lea rdx, [rbp + 0x1c0]
mov rcx, r14
call fcn.1401495f0
test al, al
je 0x14022b5fd
lea rcx, [rbp + 0x1c0]
call fcn.140081b70
mov qword [rsp + 0x30], rax
lea rdx, [r15 + 0x28]
lea rcx, [rbp + 0x1c0]
call fcn.140081960
test al, al
jne 0x14022b5fd
mov qword [rsp + 0x20], rdi
xor r9d, r9d
mov r8, qword [rsp + 0x30]
lea edx, [r9 + 0x21]
mov rcx, r13
call fcn.14022abc0
test eax, eax
jne 0x14022b5ed
mov rax, qword [rdi]
lea rdx, str.CryptSetProvParam_failed.
mov rcx, rdi
call qword [rax + 0x28]
mov rax, qword [rdi]
lea rdx, str.Failed_to_set_the_smartcard_PIN.__2_
mov rcx, rdi
call qword [rax + 0x28]
mov rcx, rdi
call fcn.1400d1db0
mov rax, qword [rdi]
lea rdx, str.Incorrect_Smartcard_PIN
mov rcx, rdi
call qword [rax + 0x30]
cmp byte [r14 + 0x1d0], 0
jne 0x14022b893
lea rdx, [rbp + 0x1c0]
lea rcx, [r15 + 0x28]
call fcn.1400812c0
cmp esi, 0x10
jne 0x14022b60a
mov r14d, 0x8008
jmp 0x14022b614
mov ecx, esi
call fcn.14022adc0
mov r14d, eax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, r14d
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x14022b7a2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov r8d, esi
lea rdx, str.hashAlg
mov rcx, rdi
call fcn.1400d1420
mov r8d, r14d
lea rdx, str.algId
mov rcx, rdi
call fcn.1400d1420
mov rcx, rdi
call fcn.1400d1db0
mov r8, qword [rdi]
lea rdx, str.Failed_to_create_HCRYPTHASH
mov rcx, rdi
call qword [r8 + 0x28]
cmp ebx, 0x80090008
jne 0x14022b893
lea eax, [rsi - 2]
test eax, 0xfffffffa
jne 0x14022b893
cmp esi, 6
je 0x14022b893
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x48], xmm0
mov qword [rsp + 0x58], rax
lea r8, str.retryWithEnhancedRsaAesCsp
mov rdx, rdi
lea rcx, [rsp + 0x48]
call fcn.1400d0c20
nop
xorps xmm0, xmm0
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x70], xmm0
movups xmmword [rbp - 0x60], xmm0
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x40], xmm0
movups xmmword [rbp - 0x30], xmm0
movups xmmword [rbp - 0x20], xmm0
movups xmmword [rbp - 0x10], xmm0
movups xmmword [rbp], xmm0
lea rcx, [rbp - 0x80]
call fcn.1400ae5e0
nop
lea rdx, [r15 + 0x1a0]
lea rcx, [rbp - 0x80]
call fcn.1400ae970
lea rdx, str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
lea rcx, [r15 + 0x1a0]
call fcn.1400b7ff0
mov rcx, r15
call fcn.1401d7c60
mov r8, rdi
xor edx, edx
mov rcx, r15
call fcn.1401d7ce0
test rax, rax
jne 0x14022b74d
lea rcx, [rbp - 0x80]
call fcn.1400ae630
nop
lea rcx, [rsp + 0x48]
call fcn.1400d0d40
xor bl, bl
jmp 0x14022b8e2
mov rcx, rax
call fcn.1400868e0
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x20], rcx
xor r9d, r9d
xor r8d, r8d
mov edx, r14d
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x14022b78e
mov rcx, rdi
call fcn.1400d1db0
mov rax, qword [rdi]
lea rdx, str.Failed_to_create_HCRYPTHASH
mov rcx, rdi
call qword [rax + 0x28]
nop
lea rcx, [rbp - 0x80]
call fcn.1400ae630
nop
lea rcx, [rsp + 0x48]
call fcn.1400d0d40
xor r9d, r9d
lea r8, [rbp + 0x330]
lea edx, [r9 + 2]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptSetHashParam]
test eax, eax
jne 0x14022b7e9
mov rcx, rdi
call fcn.1400d1db0
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov rax, qword [rdi]
lea rdx, str.Failed_to_CryptSetHashParam
mov rcx, rdi
call qword [rax + 0x28]
xor bl, bl
jmp 0x14022b8e2
movzx ecx, byte [rbp + 0x630]
lea rax, str.AT_SIGNATURE
lea rbx, str.AT_KEYEXCHANGE
test cl, cl
cmove rbx, rax
mov esi, ecx
xor esi, 1
mov dword [rsp + 0x38], 0x200
lea edx, [rcx + 1]
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x3b0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptSignHashA]
test eax, eax
jne 0x14022b897
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x3b0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [rsi + 1]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptSignHashA]
test eax, eax
jne 0x14022b897
mov rcx, rdi
call fcn.1400d1db0
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov rax, qword [rdi]
mov r8, rbx
lea rdx, str.failedToSignWith
mov rcx, rdi
call qword [rax + 0x58]
xor bl, bl
jmp 0x14022b8e2
cmp byte [rdi + 0x169], 0
je 0x14022b8b4
mov r8d, dword [rsp + 0x38]
lea rdx, str.cryptSigSize
mov rcx, rdi
call fcn.1400d1420
mov r8d, dword [rsp + 0x38]
lea rdx, [rbp + 0x3b0]
mov rcx, r12
call fcn.1400bca00
mov rcx, r12
call fcn.1400c2a60
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x14022b8e0
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov bl, 1
lea rcx, [rbp + 0x1c0]
call fcn.14007fc10
nop
lea rcx, [rbp + 0x10]
call fcn.1400ae630
nop
lea rcx, [rbp + 0xa0]
call fcn.1400ae630
nop
lea rcx, [rbp + 0x130]
call fcn.1400ae630
jmp 0x14022b916
xor bl, bl
lea rcx, [rsp + 0x60]
call fcn.1400d0d40
movzx eax, bl
mov rcx, qword [rbp + 0x5b0]
xor rcx, rsp
call fcn.1402577a0
add rsp, 0x6c8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret