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

Disassembly:
sub esp, 0x418
mov eax, dword [0x42202c]
xor eax, esp
mov dword [esp + 0x414], eax
push ebx
push ebp
push esi
push edi
mov esi, ecx
xor edi, edi
cmp dword [esi + 8], edi
jne 0x40ccd9
push 0x208
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]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x40cac4
sub eax, edx
sar eax, 1
cmp eax, edi
jle 0x40caf2
cmp word [esp + eax*2 + 0xe], 0x5c
je 0x40caf2
cmp eax, 0x104
jge 0x40caf2
mov word [esp + eax*2 + 0x10], 0x5c
mov word [esp + eax*2 + 0x12], di
push 0x206
lea edx, [esp + 0x222]
push edi
push edx
mov word [esp + 0x228], 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 + 0x230]
push 0x104
push ecx
call ebx
mov ebp, dword [sym.imp.MSVCR80.dll_wcsncat_s]
push 0xffffffffffffffff
push str.Wintrust.dll
lea edx, [esp + 0x240]
push 0x104
push edx
call ebp
add esp, 0x2c
lea eax, [esp + 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp eax, edi
mov dword [esi + 0xc], eax
je 0x40ccdf
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.WinVerifyTrust
push eax
call edi
test eax, eax
mov dword [esi + 0x14], eax
je 0x40ccdd
push 0xffffffffffffffff
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x224]
push 0x104
push edx
call ebx
push 0xffffffffffffffff
push str.Crypt32.dll
lea eax, [esp + 0x234]
push 0x104
push eax
call ebp
add esp, 0x20
lea ecx, [esp + 0x21c]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
mov dword [esi + 0x10], eax
je 0x40ccdd
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 0x40ccdd
cmp dword [esi + 0x1c], 0
je 0x40ccdd
cmp dword [esi + 0x20], 0
je 0x40ccdd
cmp dword [esi + 0x24], 0
je 0x40ccdd
cmp dword [esi + 0x28], 0
je 0x40ccdd
cmp dword [esi + 0x2c], 0
je 0x40ccdd
cmp dword [esi + 0x30], 0
je 0x40ccdd
mov ecx, dword [esi + 0x34]
test ecx, ecx
je 0x40ccdd
cmp dword [esi + 0x38], 0
je 0x40ccdd
cmp dword [esi + 0x3c], 0
je 0x40ccdd
cmp dword [esi + 0x40], 0
je 0x40ccdd
cmp dword [esi + 0x44], 0
je 0x40ccdd
test eax, eax
je 0x40ccdd
push 0
push 0
lea edx, [esi + 0x4c]
push edx
call ecx
test eax, eax
je 0x40ccdd
mov dword [esi + 8], 1
xor edi, edi
xor eax, eax
jmp 0x40cd13
xor edi, edi
mov eax, dword [esi + 0x10]
cmp eax, edi
mov ebx, dword [sym.imp.KERNEL32.dll_FreeLibrary]
je 0x40ccf2
push eax
call ebx
mov dword [esi + 0x10], edi
mov eax, dword [esi + 0xc]
cmp eax, edi
je 0x40ccff
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
mov eax, 0x80004005
mov ecx, dword [esp + 0x424]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004158da
add esp, 0x418
ret