Function at 0x1801d3240
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 - 0x438]
sub rsp, 0x538
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov rax, qword [0x18036d060]
xor rax, rsp
mov qword [rbp + 0x420], rax
mov r13d, r9d
mov r12, r8
mov esi, edx
mov r14, rcx
mov r15, qword [rbp + 0x4a0]
mov rbx, qword [rbp + 0x4a8]
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp + 0x10], xmm0
mov qword [rbp + 0x20], rax
lea r8, str.msPadAndSignHashV2
mov rdx, rbx
lea rcx, [rbp + 0x10]
call fcn.180105b50
nop
test r12, r12
je 0x1801d335f
lea eax, [r13 - 1]
cmp eax, 0x7f
ja 0x1801d335f
cmp byte [rbx + 0x161], 0
je 0x1801d3328
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.1800d27d0
nop
lea rdx, [rbp - 0x80]
mov ecx, esi
call fcn.1800eecf0
lea r8, [rbp - 0x80]
lea rdx, str.hashAlg
mov rcx, rbx
call fcn.180106500
nop
lea rcx, [rbp - 0x80]
call fcn.1800d28c0
mov rcx, rbx
call fcn.1801f35f0
test al, al
je 0x1801d33b2
mov rcx, r15
call fcn.1800bc850
mov rdx, rbx
mov rcx, r14
call fcn.18017edd0
mov rdi, rax
test rax, rax
jne 0x1801d3390
mov rax, qword [rbx]
lea rdx, str.Failed_to_get_MsCertificate.
mov rcx, rbx
call qword [rax + 0x28]
xor bl, bl
lea rcx, [rbp + 0x10]
call fcn.180105c80
movzx eax, bl
mov rcx, qword [rbp + 0x420]
xor rcx, rsp
call fcn.18007b140
add rsp, 0x538
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov dword [rsp + 0x54], 0
mov r8, rbx
lea rdx, [rsp + 0x54]
mov rcx, rdi
call fcn.1801c1c70
mov qword [rsp + 0x40], rax
test rax, rax
jne 0x1801d33d6
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], r15
mov byte [rsp + 0x20], 1
mov r9d, r13d
mov r8, r12
mov edx, esi
mov rcx, r14
call fcn.1801d2d40
movzx ebx, al
jmp 0x1801d3361
xor edx, edx
mov r8d, 0x170
lea rcx, [rbp + 0x30]
call fcn.180211600
lea rcx, [rbp + 0x30]
call fcn.1800bfb10
nop
mov r8, rbx
lea rdx, [rbp + 0x30]
mov rcx, r14
call fcn.18017f2b0
test al, al
je 0x1801d34e2
lea rdx, [rdi + 0x28]
lea rcx, [rbp + 0x30]
call fcn.1800c1ab0
test al, al
jne 0x1801d34e2
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x70], rax
lea r8, str.setSmartCardPin
mov rdx, rbx
lea rcx, [rsp + 0x60]
call fcn.180105b50
nop
mov rax, qword [rbx]
lea rdx, str.setting_smart_card_pin..
mov rcx, rbx
call qword [rax + 0x30]
lea rcx, [rbp + 0x30]
call fcn.1800c1b40
mov qword [rsp + 0x20], rbx
xor r9d, r9d
mov r8, rax
lea edx, [r9 + 0x21]
mov rcx, qword [rsp + 0x40]
call fcn.1801f33a0
test eax, eax
jne 0x1801d34ca
mov rax, qword [rbx]
lea rdx, str.CryptSetProvParam_failed.
mov rcx, rbx
call qword [rax + 0x28]
mov rax, qword [rbx]
lea rdx, str.Failed_to_set_the_smartcard_PIN.__3_
mov rcx, rbx
call qword [rax + 0x28]
mov rcx, rbx
call fcn.180106a70
mov rax, qword [rbx]
lea rdx, str.Incorrect_Smartcard_PIN
mov rcx, rbx
call qword [rax + 0x30]
cmp byte [r14 + 0x1d0], 0
je 0x1801d34ca
lea rcx, [rsp + 0x60]
call fcn.180105c80
xor bl, bl
jmp 0x1801d36df
lea rdx, [rbp + 0x30]
lea rcx, [rdi + 0x28]
call fcn.1800c1250
nop
lea rcx, [rsp + 0x60]
call fcn.180105c80
mov ecx, esi
call fcn.1801d27e0
mov edi, eax
test eax, eax
jne 0x1801d3580
mov rdx, rbx
mov rcx, r14
call fcn.18017edd0
mov r14, rax
test rax, rax
jne 0x1801d351d
mov rax, qword [rbx]
lea rdx, str.Failed_to_get_MS_Certificate.
mov rcx, rbx
call qword [rax + 0x28]
xor bl, bl
jmp 0x1801d36df
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.1800d27d0
nop
mov r8, rbx
lea rdx, [rbp - 0x80]
mov rcx, r14
call fcn.1801c0790
lea rdx, str.VinRCSP
lea rcx, [rbp - 0x80]
call fcn.1800d6740
mov ecx, 0x800c
test al, al
cmovne edi, ecx
lea rcx, [rbp - 0x80]
call fcn.1800d28c0
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, edi
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x1801d35e4
mov r8d, esi
lea rdx, str.hashAlg
mov rcx, rbx
call fcn.180106220
mov r8d, edi
lea rdx, str.algId
mov rcx, rbx
call fcn.180106220
mov rcx, rbx
call fcn.180106a70
mov rax, qword [rbx]
lea rdx, str.Failed_to_create_HCRYPTHASH
mov rcx, rbx
call qword [rax + 0x28]
xor bl, bl
jmp 0x1801d36df
mov r8d, r13d
mov rdx, r12
lea rcx, [rbp + 0x1a0]
call fcn.1800da940
xor r9d, r9d
lea r8, [rbp + 0x1a0]
lea edx, [r9 + 2]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_CryptSetHashParam]
test eax, eax
jne 0x1801d363d
mov rcx, rbx
call fcn.180106a70
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov rax, qword [rbx]
lea rdx, str.Failed_to_CryptSetHashParam
mov rcx, rbx
call qword [rax + 0x28]
xor bl, bl
jmp 0x1801d36df
mov dword [rsp + 0x50], 0x200
test esi, esi
mov r9d, 0
sete r9b
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x220]
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov edx, dword [rsp + 0x54]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_CryptSignHashA]
test eax, eax
jne 0x1801d3694
mov rcx, rbx
call fcn.180106a70
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
xor bl, bl
jmp 0x1801d36df
cmp byte [rbx + 0x161], 0
je 0x1801d36b1
mov r8d, dword [rsp + 0x50]
lea rdx, str.cryptSigSize
mov rcx, rbx
call fcn.180106220
mov r8d, dword [rsp + 0x50]
lea rdx, [rbp + 0x220]
mov rcx, r15
call fcn.1800baf90
mov rcx, r15
call fcn.1800bf1d0
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x1801d36dd
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov bl, 1
lea rcx, [rbp + 0x30]
call fcn.1800bfb80
jmp 0x1801d3361