Function at 0x52fa00
Capabilities:
Initialize hashing via wincrypt

Disassembly:
push 0xffffffffffffffff
push 0x582967
mov eax, dword fs:[0]
push eax
sub esp, 0x518
mov eax, dword [0x641030]
xor eax, esp
mov dword [esp + 0x514], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x641030]
xor eax, esp
push eax
lea eax, [esp + 0x52c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x550]
mov esi, dword [esp + 0x554]
mov ebp, dword [esp + 0x53c]
mov edi, dword [esp + 0x544]
push str.msPadAndSignHash
push esi
lea ecx, [esp + 0x24]
mov dword [esp + 0x34], eax
call fcn.00437740
xor ebx, ebx
mov dword [esp + 0x534], ebx
cmp edi, ebx
je 0x52fb0f
mov eax, dword [esp + 0x548]
cmp eax, ebx
je 0x52fb0f
cmp eax, 0x80
ja 0x52fb0f
push eax
lea ecx, [esp + 0x2ac]
push edi
push ecx
call fcn.00414180
add esp, 0xc
lea ecx, [esp + 0x34]
call fcn.0042d110
mov eax, dword [esp + 0x540]
lea edx, [esp + 0x34]
push edx
push eax
mov byte [esp + 0x53c], 1
call fcn.00467dc0
add esp, 8
lea ecx, [esp + 0x34]
push ecx
push str.hashAlg
mov ecx, esi
call fcn.004370f0
mov ecx, dword [esp + 0x2c]
call fcn.00446f40
push esi
mov ecx, ebp
call fcn.0050d8c0
mov edi, eax
cmp edi, ebx
jne 0x52fb2a
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Failed_to_get_MsCertificate.
mov ecx, esi
call eax
lea ecx, [esp + 0x34]
mov byte [esp + 0x534], bl
call fcn.0042d1d0
lea ecx, [esp + 0x1c]
mov dword [esp + 0x534], 0xffffffff
call fcn.004377b0
xor al, al
jmp 0x52ff11
lea ecx, [esp + 0x11c]
call fcn.0042d110
lea ecx, [esp + 0xa8]
mov byte [esp + 0x534], 2
call fcn.0042d110
push esi
lea ecx, [esp + 0x120]
push ecx
mov ecx, edi
mov byte [esp + 0x53c], 3
call fcn.00512f40
lea edx, [esp + 0x11c]
push edx
push str.cert_key_container
mov ecx, esi
call fcn.004370f0
push esi
lea eax, [esp + 0xac]
push eax
mov ecx, edi
call fcn.00512f80
lea ecx, [esp + 0xa8]
push ecx
push str.cert_def_provider
mov ecx, esi
call fcn.004370f0
push esi
push ebx
mov ecx, edi
call fcn.00512ff0
cmp eax, ebx
je 0x52fce4
mov ecx, eax
call fcn.0051d090
lea ecx, [esp + 0x190]
mov dword [esp + 0x28], eax
call fcn.0040e280
push esi
lea edx, [esp + 0x194]
push edx
mov ecx, ebp
mov byte [esp + 0x53c], 4
call fcn.0050c980
test al, al
je 0x52fc68
lea ecx, [esp + 0x190]
call fcn.0040ef50
add edi, 0x18
push edi
lea ecx, [esp + 0x194]
mov dword [esp + 0x34], eax
call fcn.0040fba0
test al, al
jne 0x52fc68
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x28]
push esi
push ebx
push eax
push 0x21
push ecx
call fcn.0054fd80
add esp, 0x14
cmp eax, ebx
jne 0x52fc59
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.00437570
mov edx, dword [esi]
mov eax, dword [edx + 0x18]
push str.Incorrect_Smartcard_PIN
mov ecx, esi
call eax
cmp byte [ebp + 0x150], bl
jne 0x52fcd0
lea ecx, [esp + 0x190]
push ecx
mov ecx, edi
call fcn.0040e890
mov ebp, dword [esp + 0x540]
cmp ebp, 0x10
jne 0x52fc7b
mov edi, 0x8008
jmp 0x52fc86
push ebp
call fcn.0052f9b0
add esp, 4
mov edi, eax
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x14]
push edx
push ebx
push ebx
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x52fd37
push ebp
push str.hashAlg
mov ecx, esi
call fcn.004373b0
push edi
push str.algId
mov ecx, esi
call fcn.004373b0
mov ecx, esi
call fcn.00437570
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Failed_to_create_HCRYPTHASH
mov ecx, esi
call eax
lea ecx, [esp + 0x190]
mov byte [esp + 0x534], 3
call fcn.0040e320
lea ecx, [esp + 0xa8]
mov byte [esp + 0x534], 2
call fcn.0042d1d0
lea ecx, [esp + 0x11c]
mov byte [esp + 0x534], 1
call fcn.0042d1d0
lea ecx, [esp + 0x34]
mov byte [esp + 0x534], bl
call fcn.0042d1d0
lea ecx, [esp + 0x1c]
mov dword [esp + 0x534], 0xffffffff
call fcn.004377b0
xor al, al
jmp 0x52ff11
mov edx, dword [esp + 0x14]
push ebx
lea ecx, [esp + 0x2ac]
push ecx
push 2
push edx
call dword [sym.imp.ADVAPI32.dll_CryptSetHashParam]
test eax, eax
jne 0x52fddc
mov ecx, esi
call fcn.00437570
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
lea ecx, [esp + 0x190]
mov byte [esp + 0x534], 3
call fcn.0040e320
lea ecx, [esp + 0xa8]
mov byte [esp + 0x534], 2
call fcn.0042d1d0
lea ecx, [esp + 0x11c]
mov byte [esp + 0x534], 1
call fcn.0042d1d0
lea ecx, [esp + 0x34]
mov byte [esp + 0x534], bl
call fcn.0042d1d0
lea ecx, [esp + 0x1c]
mov dword [esp + 0x534], 0xffffffff
call fcn.004377b0
xor al, al
jmp 0x52ff11
mov eax, 1
lea edi, [eax + 1]
mov ebp, str.AT_SIGNATURE
cmp byte [esp + 0x54c], bl
je 0x52fdfc
mov eax, edi
lea edi, [eax - 1]
mov ebp, str.AT_KEYEXCHANGE
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x32c]
push edx
push ebx
push ebx
push eax
mov eax, dword [esp + 0x28]
push eax
mov dword [esp + 0x30], 0x200
call dword [sym.imp.ADVAPI32.dll_CryptSignHashA]
cmp eax, ebx
jne 0x52fe68
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x32c]
push edx
push ebx
push ebx
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_CryptSignHashA]
cmp eax, ebx
jne 0x52fe68
mov ecx, esi
call fcn.00437570
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 0x52fcd0
cmp byte [esi + 0x121], bl
je 0x52fe81
mov ecx, dword [esp + 0x18]
push ecx
push str.cryptSigSize
mov ecx, esi
call fcn.004373b0
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x2c]
push edx
lea eax, [esp + 0x32c]
push eax
mov ecx, esi
call fcn.00448260
mov ecx, esi
call fcn.004474c0
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x52feaf
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
lea ecx, [esp + 0x190]
mov byte [esp + 0x534], 3
call fcn.0040e320
lea ecx, [esp + 0xa8]
mov byte [esp + 0x534], 2
call fcn.0042d1d0
lea ecx, [esp + 0x11c]
mov byte [esp + 0x534], 1
call fcn.0042d1d0
lea ecx, [esp + 0x34]
mov byte [esp + 0x534], bl
call fcn.0042d1d0
lea ecx, [esp + 0x1c]
mov dword [esp + 0x534], 0xffffffff
call fcn.004377b0
mov al, 1
mov ecx, dword [esp + 0x52c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x514]
xor ecx, esp
call fcn.005550b0
add esp, 0x524
ret