Function at 0x52ff40
Capabilities:
Initialize hashing via wincrypt

Disassembly:
push 0xffffffffffffffff
push 0x5829d7
mov eax, dword fs:[0]
push eax
sub esp, 0x440
mov eax, dword [0x641030]
xor eax, esp
mov dword [esp + 0x43c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x641030]
xor eax, esp
push eax
lea eax, [esp + 0x454]
mov dword fs:[0], eax
mov eax, dword [esp + 0x474]
mov esi, dword [esp + 0x478]
mov ebp, dword [esp + 0x46c]
mov edi, dword [esp + 0x464]
push str.msPadAndSignHashV2
push esi
lea ecx, [esp + 0x24]
mov dword [esp + 0x38], ebp
mov dword [esp + 0x20], eax
call fcn.00437740
mov dword [esp + 0x45c], 0
test ebp, ebp
je 0x530096
mov eax, dword [esp + 0x470]
test eax, eax
je 0x530096
cmp eax, 0x80
ja 0x530096
cmp byte [esi + 0x121], 0
mov ebx, dword [esp + 0x468]
je 0x53002c
lea ecx, [esp + 0x44]
call fcn.0042d110
lea ecx, [esp + 0x44]
push ecx
push ebx
mov byte [esp + 0x464], 1
call fcn.00467dc0
add esp, 8
lea edx, [esp + 0x44]
push edx
push str.hashAlg
mov ecx, esi
call fcn.004370f0
lea ecx, [esp + 0x44]
mov byte [esp + 0x45c], 0
call fcn.0042d1d0
push esi
call fcn.0054fe90
add esp, 4
test al, al
jne 0x530071
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x470]
push esi
push eax
push 1
push ecx
push ebp
push ebx
push edi
call fcn.0052fa00
add esp, 0x1c
lea ecx, [esp + 0x1c]
mov bl, al
mov dword [esp + 0x45c], 0xffffffff
call fcn.004377b0
mov al, bl
jmp 0x530448
mov ecx, dword [esp + 0x18]
call fcn.00446f40
push esi
mov ecx, edi
call fcn.0050d8c0
mov ebp, eax
test ebp, ebp
jne 0x5300b1
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Failed_to_get_MsCertificate.
mov ecx, esi
call eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x45c], 0xffffffff
call fcn.004377b0
xor al, al
jmp 0x530448
push esi
lea ecx, [esp + 0x30]
push ecx
mov ecx, ebp
mov dword [esp + 0x34], 0
call fcn.00513320
mov dword [esp + 0x34], eax
test eax, eax
jne 0x53010a
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x470]
mov ecx, dword [esp + 0x30]
push esi
push edx
push 1
push eax
push ecx
push ebx
push edi
call fcn.0052fa00
add esp, 0x1c
lea ecx, [esp + 0x1c]
mov bl, al
mov dword [esp + 0x45c], 0xffffffff
call fcn.004377b0
mov al, bl
jmp 0x530448
lea ecx, [esp + 0xb8]
call fcn.0040e280
push esi
lea edx, [esp + 0xbc]
push edx
mov ecx, edi
mov byte [esp + 0x464], 2
call fcn.0050c980
test al, al
je 0x53021a
add ebp, 0x18
push ebp
lea ecx, [esp + 0xbc]
call fcn.0040fba0
test al, al
jne 0x53021a
push str.setSmartCardPin
push esi
lea ecx, [esp + 0x40]
call fcn.00437740
mov eax, dword [esi]
mov edx, dword [eax + 0x18]
push str.setting_smart_card_pin..
mov ecx, esi
mov byte [esp + 0x460], 3
call edx
lea ecx, [esp + 0xb8]
call fcn.0040ef50
push esi
push 0
push eax
mov eax, dword [esp + 0x40]
push 0x21
push eax
call fcn.0054fd80
add esp, 0x14
test eax, eax
jne 0x5301fa
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.__3_
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 [edi + 0x150], 0
je 0x5301fa
lea ecx, [esp + 0x38]
mov byte [esp + 0x45c], 2
call fcn.004377b0
lea ecx, [esp + 0xb8]
mov byte [esp + 0x45c], 0
call fcn.0040e320
jmp 0x530096
lea ecx, [esp + 0xb8]
push ecx
mov ecx, ebp
call fcn.0040e890
lea ecx, [esp + 0x38]
mov byte [esp + 0x45c], 2
call fcn.004377b0
push ebx
call fcn.0052f9b0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x5302a4
push esi
mov ecx, edi
call fcn.0050d8c0
mov edi, eax
test edi, edi
jne 0x53025e
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Failed_to_get_MS_Certificate.
mov ecx, esi
call eax
lea ecx, [esp + 0xb8]
mov byte [esp + 0x45c], 0
call fcn.0040e320
jmp 0x530096
lea ecx, [esp + 0x44]
call fcn.0042d110
push esi
lea ecx, [esp + 0x48]
push ecx
mov ecx, edi
mov byte [esp + 0x464], 4
call fcn.00512f80
push str.VinRCSP
lea ecx, [esp + 0x48]
call fcn.0042f160
test al, al
je 0x530293
mov ebp, 0x800c
lea ecx, [esp + 0x44]
mov byte [esp + 0x45c], 2
call fcn.0042d1d0
mov eax, dword [esp + 0x34]
lea edx, [esp + 0x14]
push edx
push 0
push 0
push ebp
push eax
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x530305
push ebx
push str.hashAlg
mov ecx, esi
call fcn.004373b0
push ebp
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 + 0xb8]
mov byte [esp + 0x45c], 0
call fcn.0040e320
jmp 0x530096
mov ecx, dword [esp + 0x470]
mov edx, dword [esp + 0x30]
push ecx
push edx
lea eax, [esp + 0x1d8]
push eax
call fcn.00414180
mov edx, dword [esp + 0x20]
add esp, 0xc
push 0
lea ecx, [esp + 0x1d4]
push ecx
push 2
push edx
call dword [sym.imp.ADVAPI32.dll_CryptSetHashParam]
test eax, eax
jne 0x530376
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 + 0xb8]
mov byte [esp + 0x45c], 0
call fcn.0040e320
jmp 0x530096
xor eax, eax
mov dword [esp + 0x28], 0x200
test ebx, ebx
jne 0x530387
lea eax, [ebx + 1]
lea ecx, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x254]
push edx
push eax
mov eax, dword [esp + 0x38]
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptSignHashA]
test eax, eax
jne 0x5303d6
mov ecx, esi
call fcn.00437570
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
lea ecx, [esp + 0xb8]
mov byte [esp + 0x45c], 0
call fcn.0040e320
jmp 0x530096
cmp byte [esi + 0x121], 0
je 0x5303f0
mov eax, dword [esp + 0x28]
push eax
push str.cryptSigSize
mov ecx, esi
call fcn.004373b0
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0x18]
push ecx
lea edx, [esp + 0x254]
push edx
mov ecx, esi
call fcn.00448260
mov ecx, esi
call fcn.004474c0
mov eax, dword [esp + 0x14]
test eax, eax
je 0x53041e
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
lea ecx, [esp + 0xb8]
mov byte [esp + 0x45c], 0
call fcn.0040e320
lea ecx, [esp + 0x1c]
mov dword [esp + 0x45c], 0xffffffff
call fcn.004377b0
mov al, 1
mov ecx, dword [esp + 0x454]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x43c]
xor ecx, esp
call fcn.005550b0
add esp, 0x44c
ret