Function at 0x47d2e0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x274
mov eax, dword [0x4fc040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ecx, 0x5001d8
push esi
push edi
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x47d300
sub ecx, edx
jne 0x47d323
push 0x105
push 0x5001d8
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x47d604
xor eax, eax
push 0x103
push eax
mov word [ebp - 0x110], ax
lea eax, [ebp - 0x10e]
push eax
call fcn.00497aa0
add esp, 0xc
lea eax, [ebp - 0x270]
push 0x58
push 0
push eax
call fcn.00497aa0
add esp, 0xc
mov dword [ebp - 0x270], 0x58
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov dword [ebp - 0x26c], eax
lea eax, [ebp - 0x110]
mov dword [ebp - 0x254], eax
lea eax, [ebp - 0x270]
push eax
mov dword [ebp - 0x264], str.PKCS_Library_Files__pkcs.dll_pks.dll_p11.dll_ykcs.dll_gclib.dll_
mov dword [ebp - 0x240], str.Please_Select_PKCS_11_Library_File
mov dword [ebp - 0x244], 0x5001d8
mov dword [ebp - 0x23c], 0x10001000
mov dword [ebp - 0x250], 0x105
mov dword [ebp - 0x258], 1
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameA]
test eax, eax
je 0x47d604
mov ecx, dword [ebp - 0x254]
call fcn.0047d1d0
mov ebx, eax
test ebx, ebx
je 0x47d604
lea eax, [ebp - 0x214]
mov dword [ebp - 0x214], 0
push eax
mov eax, dword [ebx + 0x12]
push 0
push 1
call eax
add esp, 0xc
mov dword [ebp - 0x208], 0x20
lea eax, [ebp - 0x208]
push eax
lea eax, [ebp - 0x1f8]
push eax
mov eax, dword [ebx + 0x12]
push 1
call eax
add esp, 0xc
test eax, eax
jne 0x47d604
push eax
push 0x2000
push eax
push 0x10001
push 2
call dword [sym.imp.CRYPT32.dll_CertOpenStore]
xor edi, edi
mov esi, eax
mov dword [ebp - 0x210], esi
mov dword [ebp - 0x20c], edi
cmp dword [ebp - 0x208], edi
jbe 0x47d5f1
lea eax, [ebp - 0x200]
push eax
mov eax, dword [ebx + 0x32]
push 0
push 0
push 4
push dword [ebp + edi*4 - 0x1f8]
call eax
add esp, 0x14
test eax, eax
je 0x47d497
lea eax, [ebp - 0x200]
push eax
mov eax, dword [ebx + 0x32]
push 0
push 0
push 6
push dword [ebp + edi*4 - 0x1f8]
call eax
add esp, 0x14
test eax, eax
jne 0x47d5d8
lea eax, [ebp - 0x218]
mov byte [ebp - 0x1fa], 0
mov dword [ebp - 0x130], eax
lea eax, [ebp - 0x1f9]
mov dword [ebp - 0x124], eax
lea eax, [ebp - 0x1fa]
mov dword [ebp - 0x118], eax
lea eax, [ebp - 0x134]
push 3
push eax
push dword [ebp - 0x200]
mov eax, dword [ebx + 0x6a]
mov byte [ebp - 0x1f9], 1
mov dword [ebp - 0x218], 1
mov dword [ebp - 0x134], 0
mov dword [ebp - 0x12c], 4
mov dword [ebp - 0x128], 1
mov dword [ebp - 0x120], 1
mov dword [ebp - 0x11c], 2
mov dword [ebp - 0x114], 1
mov dword [ebp - 0x204], 0
call eax
add esp, 0xc
test eax, eax
jne 0x47d5ca
lea eax, [ebp - 0x204]
push eax
push 0x10
lea eax, [ebp - 0x178]
push eax
push dword [ebp - 0x200]
mov eax, dword [ebx + 0x6e]
call eax
add esp, 0x10
test eax, eax
jne 0x47d5ca
push dword [ebp - 0x200]
mov eax, dword [ebx + 0x72]
call eax
add esp, 4
test eax, eax
jne 0x47d5ca
xor esi, esi
cmp dword [ebp - 0x204], esi
jbe 0x47d5ca
nop word [eax + eax]
push dword [ebp - 0x254]
mov edx, dword [ebp - 0x200]
mov ecx, ebx
push dword [ebp + esi*4 - 0x178]
call fcn.0047d6a0
mov edi, eax
add esp, 8
test edi, edi
je 0x47d5bb
push 0
push 4
push edi
push dword [ebp - 0x210]
call dword [sym.imp.CRYPT32.dll_CertAddCertificateContextToStore]
push edi
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
inc esi
cmp esi, dword [ebp - 0x204]
jb 0x47d580
mov edi, dword [ebp - 0x20c]
push dword [ebp - 0x200]
mov eax, dword [ebx + 0x36]
call eax
add esp, 4
inc edi
mov dword [ebp - 0x20c], edi
cmp edi, dword [ebp - 0x208]
jb 0x47d453
mov esi, dword [ebp - 0x210]
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00495b16
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00495b16
mov esp, ebp
pop ebp
ret