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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x418
mov eax, dword [0x1007b00c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push edi
cmp dword [esi + 8], 0
jne 0x1004d774
push 0x20a
lea eax, [ebp - 0x210]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
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 0x1004d553
sub ecx, edx
sar ecx, 1
test ecx, ecx
jle 0x1004d5a1
mov eax, 0x5c
cmp ax, word [ebp + ecx*2 - 0x212]
je 0x1004d5a1
cmp ecx, 0x104
jge 0x1004d5a1
mov word [ebp + ecx*2 - 0x210], ax
lea eax, [ecx*2 + 2]
cmp eax, 0x20a
jae 0x1004d7d7
xor ecx, ecx
mov word [ebp + eax - 0x210], cx
push 0x208
lea eax, [ebp - 0x418]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0xffffffffffffffff
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x418]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
push 0xffffffffffffffff
push str.Wintrust.dll
lea eax, [ebp - 0x418]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat_s]
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 0x1004d788
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.WinVerifyTrust
push eax
call edi
mov dword [esi + 0x14], eax
test eax, eax
je 0x1004d788
push 0xffffffffffffffff
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x418]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
push 0xffffffffffffffff
push str.Crypt32.dll
lea eax, [ebp - 0x418]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat_s]
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 0x1004d788
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 0x1004d788
cmp dword [esi + 0x1c], 0
je 0x1004d788
cmp dword [esi + 0x20], 0
je 0x1004d788
cmp dword [esi + 0x24], 0
je 0x1004d788
cmp dword [esi + 0x28], 0
je 0x1004d788
cmp dword [esi + 0x2c], 0
je 0x1004d788
cmp dword [esi + 0x30], 0
je 0x1004d788
mov ecx, dword [esi + 0x34]
test ecx, ecx
je 0x1004d788
cmp dword [esi + 0x38], 0
je 0x1004d788
cmp dword [esi + 0x3c], 0
je 0x1004d788
cmp dword [esi + 0x40], 0
je 0x1004d788
cmp dword [esi + 0x44], 0
je 0x1004d788
test eax, eax
je 0x1004d788
push 0
push 0
lea eax, [esi + 0x4c]
push eax
call ecx
test eax, eax
je 0x1004d788
mov dword [esi + 8], 1
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005b6db
mov esp, ebp
pop ebp
ret 8
mov eax, dword [esi + 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
test eax, eax
je 0x1004d79f
push eax
call edi
mov dword [esi + 0x10], 0
mov eax, dword [esi + 0xc]
test eax, eax
je 0x1004d7b0
push eax
call edi
mov dword [esi + 0xc], 0
push 0x38
push 0
add esi, 0x14
push esi
call sub.VCRUNTIME140.dll_memset
mov ecx, dword [ebp - 4]
add esp, 0xc
xor ecx, ebp
mov eax, 0x80004005
pop edi
pop esi
call fcn.1005b6db
mov esp, ebp
pop ebp
ret 8
call fcn.1005bfc9
int3