Function at 0x1801d2d40
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 - 0x518]
sub rsp, 0x618
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov rax, qword [0x18036d060]
xor rax, rsp
mov qword [rbp + 0x500], rax
mov edi, r9d
mov r15, r8
mov esi, edx
mov r12, rcx
mov r14, qword [rbp + 0x588]
mov rbx, qword [rbp + 0x590]
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x48], xmm0
mov qword [rsp + 0x58], rax
lea r8, str.msPadAndSignHash
mov rdx, rbx
lea rcx, [rsp + 0x48]
call fcn.180105b50
nop
test r15, r15
je 0x1801d3205
lea eax, [rdi - 1]
cmp eax, 0x7f
ja 0x1801d3205
mov r8d, edi
mov rdx, r15
lea rcx, [rbp + 0x280]
call fcn.1800da940
xorps xmm0, xmm0
movups xmmword [rbp + 0x80], xmm0
movups xmmword [rbp + 0x90], 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
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
mov rcx, r14
call fcn.1800bc850
mov rdx, rbx
mov rcx, r12
call fcn.18017edd0
mov rdi, rax
test rax, rax
jne 0x1801d2e7f
mov rax, qword [rbx]
lea rdx, str.Failed_to_get_MsCertificate.
mov rcx, rbx
call qword [rax + 0x28]
xor bl, bl
jmp 0x1801d31f7
xorps xmm0, xmm0
movups xmmword [rbp - 0x10], xmm0
movups xmmword [rbp], 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
lea rcx, [rbp - 0x10]
call fcn.1800d27d0
nop
xorps xmm0, xmm0
movups xmmword [rsp + 0x60], xmm0
movups xmmword [rsp + 0x70], 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
lea rcx, [rsp + 0x60]
call fcn.1800d27d0
nop
mov r8, rbx
lea rdx, [rbp - 0x10]
mov rcx, rdi
call fcn.1801c0b60
lea r8, [rbp - 0x10]
lea rdx, str.cert_key_container
mov rcx, rbx
call fcn.180106500
mov r8, rbx
lea rdx, [rsp + 0x60]
mov rcx, rdi
call fcn.1801c0790
lea r8, [rsp + 0x60]
lea rdx, str.cert_def_provider
mov rcx, rbx
call fcn.180106500
mov r8, rbx
xor edx, edx
mov rcx, rdi
call fcn.1801c05c0
test rax, rax
jne 0x1801d2f43
xor bl, bl
jmp 0x1801d31e2
mov rcx, rax
call fcn.1800b5fd0
mov r15, rax
xor edx, edx
mov r8d, 0x170
lea rcx, [rbp + 0x110]
call fcn.180211600
lea rcx, [rbp + 0x110]
call fcn.1800bfb10
nop
mov r8, rbx
lea rdx, [rbp + 0x110]
mov rcx, r12
call fcn.18017f2b0
test al, al
je 0x1801d301e
lea rcx, [rbp + 0x110]
call fcn.1800c1b40
mov r13, rax
lea rdx, [rdi + 0x28]
lea rcx, [rbp + 0x110]
call fcn.1800c1ab0
test al, al
jne 0x1801d301e
mov qword [rsp + 0x20], rbx
xor r9d, r9d
mov r8, r13
lea edx, [r9 + 0x21]
mov rcx, r15
call fcn.1801f33a0
test eax, eax
jne 0x1801d300e
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.__2_
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 [r12 + 0x1d0], 0
jne 0x1801d3186
lea rdx, [rbp + 0x110]
lea rcx, [rdi + 0x28]
call fcn.1800c1250
cmp esi, 0x10
jne 0x1801d302a
mov edi, 0x8008
jmp 0x1801d3033
mov ecx, esi
call fcn.1801d27e0
mov edi, eax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, edi
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x1801d3095
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 0x1801d31d5
xor r9d, r9d
lea r8, [rbp + 0x280]
lea edx, [r9 + 2]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptSetHashParam]
test eax, eax
jne 0x1801d30dc
mov rcx, rbx
call fcn.180106a70
mov rcx, qword [rsp + 0x40]
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 0x1801d31d5
movzx ecx, byte [rbp + 0x580]
lea rax, str.AT_SIGNATURE
lea rdi, str.AT_KEYEXCHANGE
test cl, cl
cmove rdi, 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 + 0x300]
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 0x1801d318a
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x300]
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 0x1801d318a
mov rcx, rbx
call fcn.180106a70
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov rax, qword [rbx]
mov r8, rdi
lea rdx, str.failedToSignWith
mov rcx, rbx
call qword [rax + 0x58]
xor bl, bl
jmp 0x1801d31d5
cmp byte [rbx + 0x161], 0
je 0x1801d31a7
mov r8d, dword [rsp + 0x38]
lea rdx, str.cryptSigSize
mov rcx, rbx
call fcn.180106220
mov r8d, dword [rsp + 0x38]
lea rdx, [rbp + 0x300]
mov rcx, r14
call fcn.1800baf90
mov rcx, r14
call fcn.1800bf1d0
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x1801d31d3
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov bl, 1
lea rcx, [rbp + 0x110]
call fcn.1800bfb80
nop
lea rcx, [rsp + 0x60]
call fcn.1800d28c0
nop
lea rcx, [rbp - 0x10]
call fcn.1800d28c0
nop
lea rcx, [rbp + 0x80]
call fcn.1800d28c0
jmp 0x1801d3207
xor bl, bl
lea rcx, [rsp + 0x48]
call fcn.180105c80
movzx eax, bl
mov rcx, qword [rbp + 0x500]
xor rcx, rsp
call fcn.18007b140
add rsp, 0x618
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret