Function at 0x418a10
Capabilities:
Get common file path
Link many functions at runtime

Disassembly:
sub esp, 0x410
push ebx
push ebp
push esi
mov esi, dword [esp + 0x420]
push edi
xor edi, edi
cmp dword [esi + 8], edi
jne 0x418c76
push 0x206
lea eax, [esp + 0x16]
push edi
push eax
mov word [esp + 0x1c], di
call sub.MSVCR80.dll_memset
add esp, 0xc
push 0x104
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea eax, [esp + 0x10]
lea edx, [eax + 2]
jmp 0x418a60
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x418a60
sub eax, edx
sar eax, 1
cmp eax, edi
jle 0x418a87
cmp word [esp + eax*2 + 0xe], 0x5c
je 0x418a87
mov word [esp + eax*2 + 0x10], 0x5c
mov word [esp + eax*2 + 0x12], di
push 0x206
lea edx, [esp + 0x21e]
push edi
push edx
mov word [esp + 0x224], di
call sub.MSVCR80.dll_memset
mov ebx, dword [sym.imp.MSVCR80.dll_wcsncpy_s]
push 0xffffffffffffffff
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x22c]
push 0x104
push ecx
call ebx
mov ebp, dword [sym.imp.MSVCR80.dll_wcsncat_s]
push 0xffffffffffffffff
push 0x43a618
lea edx, [esp + 0x23c]
push 0x104
push edx
call ebp
add esp, 0x2c
lea eax, [esp + 0x218]
push eax
mov ecx, 1
call fcn.00419780
cmp eax, edi
mov dword [esi + 0xc], eax
je 0x418c87
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.WinVerifyTrust
push eax
call edi
test eax, eax
mov dword [esi + 0x14], eax
je 0x418c85
push 0xffffffffffffffff
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x220]
push 0x104
push edx
call ebx
push 0xffffffffffffffff
push str.Crypt32.dll
lea eax, [esp + 0x230]
push 0x104
push eax
call ebp
add esp, 0x20
lea ecx, [esp + 0x218]
push ecx
mov ecx, 1
call fcn.00419780
test eax, eax
mov dword [esi + 0x10], eax
je 0x418c85
push str.CryptQueryObject
push eax
call edi
mov edx, dword [esi + 0x10]
push str.CryptMsgGetParam
push edx
mov dword [esi + 0x18], eax
call edi
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 0x10]
push str.CryptMsgClose
push eax
call edi
mov ecx, dword [esi + 0x10]
push str.CertFindCertificateInStore
push ecx
mov dword [esi + 0x20], eax
call edi
mov edx, dword [esi + 0x10]
push str.CertFreeCertificateContext
push edx
mov dword [esi + 0x24], eax
call edi
mov dword [esi + 0x28], eax
mov eax, dword [esi + 0x10]
push str.CertCloseStore
push eax
call edi
mov ecx, dword [esi + 0x10]
push str.CertGetNameStringW
push ecx
mov dword [esi + 0x2c], eax
call edi
mov edx, dword [esi + 0xc]
push str.CryptCATAdminAcquireContext
push edx
mov dword [esi + 0x30], eax
call edi
mov dword [esi + 0x34], eax
mov eax, dword [esi + 0xc]
push str.CryptCATAdminReleaseContext
push eax
call edi
mov ecx, dword [esi + 0xc]
push str.CryptCATAdminCalcHashFromFileHandle
push ecx
mov dword [esi + 0x38], eax
call edi
mov edx, dword [esi + 0xc]
push str.CryptCATAdminEnumCatalogFromHash
push edx
mov dword [esi + 0x3c], eax
call edi
mov dword [esi + 0x40], eax
mov eax, dword [esi + 0xc]
push str.CryptCATAdminReleaseCatalogContext
push eax
call edi
mov ecx, dword [esi + 0xc]
push str.CryptCATCatalogInfoFromContext
push ecx
mov dword [esi + 0x44], eax
call edi
cmp dword [esi + 0x18], 0
mov dword [esi + 0x48], eax
je 0x418c85
cmp dword [esi + 0x1c], 0
je 0x418c85
cmp dword [esi + 0x20], 0
je 0x418c85
cmp dword [esi + 0x24], 0
je 0x418c85
cmp dword [esi + 0x28], 0
je 0x418c85
cmp dword [esi + 0x2c], 0
je 0x418c85
cmp dword [esi + 0x30], 0
je 0x418c85
mov ecx, dword [esi + 0x34]
test ecx, ecx
je 0x418c85
cmp dword [esi + 0x38], 0
je 0x418c85
cmp dword [esi + 0x3c], 0
je 0x418c85
cmp dword [esi + 0x40], 0
je 0x418c85
cmp dword [esi + 0x44], 0
je 0x418c85
test eax, eax
je 0x418c85
push 0
push 0
lea edx, [esi + 0x4c]
push edx
call ecx
test eax, eax
je 0x418c85
mov dword [esi + 8], 1
xor edi, edi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x410
ret 8
xor edi, edi
mov eax, dword [esi + 0x10]
cmp eax, edi
mov ebx, dword [sym.imp.KERNEL32.dll_FreeLibrary]
je 0x418c9a
push eax
call ebx
mov dword [esi + 0x10], edi
mov eax, dword [esi + 0xc]
cmp eax, edi
je 0x418ca7
push eax
call ebx
mov dword [esi + 0xc], edi
push 0x38
push edi
add esi, 0x14
push esi
call sub.MSVCR80.dll_memset
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 0x80004005
pop ebx
add esp, 0x410
ret 8