Function at 0x467580
Capabilities:
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
mov ebx, dword [ebp + 0x10]
mov eax, ebx
push esi
push edi
mov dword [ebp - 0x38], edx
mov esi, str.rsa_sha2_256
mov dword [ebp - 8], ecx
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [esi]
jne 0x4675c0
test dl, dl
je 0x4675bc
mov cl, byte [eax + 1]
cmp cl, byte [esi + 1]
jne 0x4675c0
add eax, 2
add esi, 2
test cl, cl
jne 0x4675a0
xor esi, esi
jmp 0x4675c5
sbb esi, esi
or esi, 1
mov ecx, str.rsa_sha2_512
mov eax, ebx
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4675f0
test dl, dl
je 0x4675ec
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4675f0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4675d0
xor eax, eax
jmp 0x4675f5
sbb eax, eax
or eax, 1
xor ebx, ebx
mov edi, str.SHA1
test esi, esi
mov ecx, str.SHA256
sete bl
test esi, esi
cmove edi, ecx
mov dword [ebp - 0x14], edi
lea ebx, [ebx*8 + 0x8004]
test eax, eax
jne 0x467625
mov ebx, 0x800e
mov dword [ebp - 0x14], str.SHA512
mov ecx, dword [ebp - 8]
lea eax, [ebp - 0x2c]
push eax
lea edx, [ebp - 0x30]
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], 0
mov ecx, dword [ecx + 4]
call fcn.00467340
mov eax, dword [ebp - 0x2c]
add esp, 4
mov dword [ebp - 0x48], eax
test eax, eax
je 0x467a65
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x44], eax
test eax, eax
je 0x467a65
mov esi, dword [sym.imp.CRYPT32.dll_CertGetCertificateContextProperty]
lea ecx, [ebp - 0x1c]
push ecx
push 0
push 2
push eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x1c], 0
call esi
test eax, eax
je 0x467a47
mov ecx, dword [ebp - 0x1c]
mov edx, 1
push 0
call fcn.0048ffe0
add esp, 4
mov edi, eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x40], edi
push eax
push edi
push 2
push dword [ebp - 0x44]
call esi
test eax, eax
je 0x467a47
mov eax, dword [edi + 0xc]
and eax, 0x20
mov dword [ebp - 4], 0
push eax
push dword [edi + 8]
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push dword [edi + 4]
mov dword [ebp - 0x10], 0
push dword [edi]
mov dword [ebp - 0x24], 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x46783b
xor esi, esi
lea ecx, [esi + 8]
call fcn.00463480
test eax, eax
je 0x467731
mov eax, dword [ebp - 8]
xor edx, edx
push esi
mov ecx, dword [eax + 4]
call fcn.00463010
mov esi, eax
add esp, 4
test esi, esi
je 0x467731
xor eax, eax
cmp dword [edi + 0x18], 2
push 0
sete al
push esi
add eax, 0x20
push eax
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptSetProvParam]
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0
push eax
push 0
push 0
push ebx
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x4677f1
push 0
push dword [ebp + 8]
push dword [ebp - 0x38]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x4677f1
lea eax, [ebp - 4]
push eax
push 0
push 0
push 0
push dword [edi + 0x18]
mov edi, dword [sym.imp.ADVAPI32.dll_CryptSignHashA]
push dword [ebp - 0xc]
call edi
test eax, eax
je 0x4677f1
mov ecx, dword [ebp - 4]
mov edx, 1
push 0
call fcn.0048ffe0
add esp, 4
mov ebx, eax
lea eax, [ebp - 4]
mov dword [ebp - 0x14], ebx
push eax
mov eax, dword [ebp - 0x40]
push ebx
push 0
push 0
push dword [eax + 0x18]
push dword [ebp - 0xc]
call edi
test eax, eax
je 0x4677ec
mov edx, dword [ebp - 4]
mov ecx, ebx
call fcn.00461910
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 4]
mov dword [ebp - 0x28], ebx
xor ebx, ebx
mov dword [edx], eax
lea ecx, [ebx + 8]
call fcn.00463480
test eax, eax
je 0x4677f3
mov eax, dword [ebp - 8]
xor edx, edx
push esi
mov ecx, dword [eax + 4]
call fcn.00463010
add esp, 4
jmp 0x4677f3
mov ebx, dword [ebp - 0x14]
jmp 0x4677f3
xor ebx, ebx
test esi, esi
je 0x467824
mov ecx, esi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x467800
mov eax, esi
sub ecx, edx
je 0x46781b
nop dword [eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x467810
push esi
call fcn.0049ddeb
add esp, 4
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x467a0a
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
jmp 0x467a0a
push 0
push dword [edi + 4]
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.ncrypt.dll_NCryptOpenStorageProvider]
test eax, eax
jne 0x467a08
push eax
push dword [edi + 0x18]
lea eax, [ebp - 0x10]
push dword [edi]
push eax
push dword [ebp - 0x24]
call dword [sym.imp.ncrypt.dll_NCryptOpenKey]
test eax, eax
jne 0x467a08
lea ecx, [eax + 8]
xor edi, edi
call fcn.00463480
test eax, eax
je 0x4678c8
mov eax, dword [ebp - 8]
lea edx, [edi + 1]
push edi
mov ecx, dword [eax + 4]
call fcn.00463010
mov edi, eax
add esp, 4
test edi, edi
je 0x4678c8
mov ecx, edi
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4678a0
sub ecx, edx
sar ecx, 1
push 0
lea eax, [ecx*2 + 2]
push eax
push edi
push str.SmartCardPin
push dword [ebp - 0x10]
call dword [sym.imp.ncrypt.dll_NCryptSetProperty]
mov eax, dword [ebp - 8]
xor ebx, ebx
mov dword [ebp - 0x34], ebx
mov ecx, str.ssh_rsa
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0xc], ebx
mov eax, dword [eax]
mov eax, dword [eax]
mov eax, dword [eax + 0x60]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x467902
test dl, dl
je 0x4678fe
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x467902
add eax, 2
add ecx, 2
test dl, dl
jne 0x4678e2
xor eax, eax
jmp 0x467907
sbb eax, eax
or eax, 1
test eax, eax
jne 0x46791f
mov eax, dword [ebp - 0x14]
mov ebx, 2
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x34]
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0x38]
lea eax, [ebp - 0x20]
mov ecx, dword [ebp + 0x10]
push 0
push eax
push dword [ebp + 8]
mov dword [ebp - 0x20], 0
call fcn.00462ce0
mov esi, eax
add esp, 0xc
test esi, esi
je 0x4679bf
push ebx
mov ebx, dword [sym.imp.ncrypt.dll_NCryptSignHash]
lea eax, [ebp - 4]
push eax
push 0
push 0
push dword [ebp - 0x20]
push esi
push dword [ebp - 0xc]
push dword [ebp - 0x10]
call ebx
test eax, eax
jne 0x4679bf
mov ecx, dword [ebp - 4]
lea edx, [eax + 1]
push eax
call fcn.0048ffe0
add esp, 4
mov dword [ebp - 0x14], eax
lea ecx, [ebp - 4]
push dword [ebp - 0x3c]
push ecx
push dword [ebp - 4]
push eax
push dword [ebp - 0x20]
push esi
push dword [ebp - 0xc]
push dword [ebp - 0x10]
call ebx
mov ebx, dword [ebp - 0x14]
test eax, eax
jne 0x4679c1
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp - 4]
mov dword [ebp - 0x28], ebx
xor ebx, ebx
mov dword [ecx], eax
lea ecx, [ebx + 8]
call fcn.00463480
test eax, eax
je 0x4679c1
mov eax, dword [ebp - 8]
lea edx, [ebx + 1]
push edi
mov ecx, dword [eax + 4]
call fcn.00463010
add esp, 4
jmp 0x4679c1
xor ebx, ebx
test edi, edi
je 0x4679f9
mov ecx, edi
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4679d0
sub ecx, edx
mov eax, edi
sar ecx, 1
add ecx, ecx
je 0x4679f0
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x4679e5
push edi
call fcn.0049ddeb
add esp, 4
test esi, esi
je 0x467a0a
push esi
call fcn.0049ddeb
add esp, 4
jmp 0x467a0a
xor ebx, ebx
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x467a1a
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [ebp - 0x24]
mov esi, dword [sym.imp.ncrypt.dll_NCryptFreeObject]
test eax, eax
je 0x467a2a
push eax
call esi
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x467a34
push eax
call esi
test ebx, ebx
je 0x467a3f
mov ecx, ebx
call fcn.00490070
mov ecx, dword [ebp - 0x40]
call fcn.00490070
push dword [ebp - 0x44]
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
push 0
push dword [ebp - 0x48]
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
mov eax, dword [ebp - 0x28]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret