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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x418
mov eax, dword [0x59a0a0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push edi
cmp dword [esi + 8], 0
jne 0x4c68b0
push 0x20a
lea eax, [ebp - 0x210]
push 0
push eax
call fcn.0049e130
add esp, 0xc
lea eax, [ebp - 0x210]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea ecx, [ebp - 0x210]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4c6693
sub ecx, edx
sar ecx, 1
test ecx, ecx
jle 0x4c66e1
mov eax, 0x5c
cmp ax, word [ebp + ecx*2 - 0x212]
je 0x4c66e1
cmp ecx, 0x104
jge 0x4c66e1
mov word [ebp + ecx*2 - 0x210], ax
lea eax, [ecx*2 + 2]
cmp eax, 0x20a
jae 0x4c6913
xor ecx, ecx
mov word [ebp + eax - 0x210], cx
push 0x208
lea eax, [ebp - 0x418]
push 0
push eax
call fcn.0049e130
push 0xffffffffffffffff
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x418]
push 0x104
push eax
call fcn.004a0ef4
push 0xffffffffffffffff
push str.Wintrust.dll
lea eax, [ebp - 0x418]
push 0x104
push eax
call fcn.004a0fe8
add esp, 0x2c
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esi + 0xc], eax
test eax, eax
je 0x4c68c4
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.WinVerifyTrust
push eax
call edi
mov dword [esi + 0x14], eax
test eax, eax
je 0x4c68c4
push 0xffffffffffffffff
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x418]
push 0x104
push eax
call fcn.004a0ef4
push 0xffffffffffffffff
push str.Crypt32.dll
lea eax, [ebp - 0x418]
push 0x104
push eax
call fcn.004a0fe8
add esp, 0x20
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esi + 0x10], eax
test eax, eax
je 0x4c68c4
push str.CryptQueryObject
push eax
call edi
push str.CryptMsgGetParam
push dword [esi + 0x10]
mov dword [esi + 0x18], eax
call edi
push str.CryptMsgClose
push dword [esi + 0x10]
mov dword [esi + 0x1c], eax
call edi
push str.CertFindCertificateInStore
push dword [esi + 0x10]
mov dword [esi + 0x20], eax
call edi
push str.CertFreeCertificateContext
push dword [esi + 0x10]
mov dword [esi + 0x24], eax
call edi
push str.CertCloseStore
push dword [esi + 0x10]
mov dword [esi + 0x28], eax
call edi
push str.CertGetNameStringW
push dword [esi + 0x10]
mov dword [esi + 0x2c], eax
call edi
push str.CryptCATAdminAcquireContext
push dword [esi + 0xc]
mov dword [esi + 0x30], eax
call edi
push str.CryptCATAdminReleaseContext
push dword [esi + 0xc]
mov dword [esi + 0x34], eax
call edi
push str.CryptCATAdminCalcHashFromFileHandle
push dword [esi + 0xc]
mov dword [esi + 0x38], eax
call edi
push str.CryptCATAdminEnumCatalogFromHash
push dword [esi + 0xc]
mov dword [esi + 0x3c], eax
call edi
push str.CryptCATAdminReleaseCatalogContext
push dword [esi + 0xc]
mov dword [esi + 0x40], eax
call edi
push str.CryptCATCatalogInfoFromContext
push dword [esi + 0xc]
mov dword [esi + 0x44], eax
call edi
cmp dword [esi + 0x18], 0
mov dword [esi + 0x48], eax
je 0x4c68c4
cmp dword [esi + 0x1c], 0
je 0x4c68c4
cmp dword [esi + 0x20], 0
je 0x4c68c4
cmp dword [esi + 0x24], 0
je 0x4c68c4
cmp dword [esi + 0x28], 0
je 0x4c68c4
cmp dword [esi + 0x2c], 0
je 0x4c68c4
cmp dword [esi + 0x30], 0
je 0x4c68c4
mov ecx, dword [esi + 0x34]
test ecx, ecx
je 0x4c68c4
cmp dword [esi + 0x38], 0
je 0x4c68c4
cmp dword [esi + 0x3c], 0
je 0x4c68c4
cmp dword [esi + 0x40], 0
je 0x4c68c4
cmp dword [esi + 0x44], 0
je 0x4c68c4
test eax, eax
je 0x4c68c4
push 0
push 0
lea eax, [esi + 0x4c]
push eax
call ecx
test eax, eax
je 0x4c68c4
mov dword [esi + 8], 1
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049aa22
mov esp, ebp
pop ebp
ret 8
mov eax, dword [esi + 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
test eax, eax
je 0x4c68db
push eax
call edi
mov dword [esi + 0x10], 0
mov eax, dword [esi + 0xc]
test eax, eax
je 0x4c68ec
push eax
call edi
mov dword [esi + 0xc], 0
push 0x38
push 0
add esi, 0x14
push esi
call fcn.0049e130
mov ecx, dword [ebp - 4]
add esp, 0xc
xor ecx, ebp
mov eax, 0x80004005
pop edi
pop esi
call fcn.0049aa22
mov esp, ebp
pop ebp
ret 8
call fcn.0049abd1
int3