Function at 0x40d260
Capabilities:
Check if file exists
Get common file path
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x738
mov eax, dword [0x43d180]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x6fc]
xor esi, esi
mov dword [ebp - 0x700], edi
xorps xmm0, xmm0
mov dword [ebp - 0x488], 0xaac56b
push 0x30
movdqu xmmword [ebp - 0x714], xmm0
push esi
push eax
mov dword [ebp - 0x484], 0x11d0cd44
mov dword [ebp - 0x480], 0xc000c28c
mov dword [ebp - 0x47c], 0xee95c24f
mov dword [ebp - 0x498], 0xf750e6c3
mov dword [ebp - 0x494], 0x11d138ee
mov dword [ebp - 0x490], 0xc000e585
mov dword [ebp - 0x48c], 0xee95c24f
mov dword [ebp - 0x738], 0
movdqu xmmword [ebp - 0x734], xmm0
mov dword [ebp - 0x6b0], 0
movdqu xmmword [ebp - 0x724], xmm0
mov dword [ebp - 0x6b8], 0
mov dword [ebp - 0x6c8], 0
mov dword [ebp - 0x6c4], 0
mov dword [ebp - 0x6c0], 0
mov dword [ebp - 0x6b4], 0
mov dword [ebp - 0x6ac], esi
mov dword [ebp - 0x714], 0x10
mov dword [ebp - 0x710], edi
mov dword [ebp - 0x70c], esi
mov dword [ebp - 0x708], esi
call fcn.00417930
add esp, 0xc
mov dword [ebp - 0x6fc], 0x30
lea eax, [ebp - 0x714]
mov dword [ebp - 0x6e8], 1
mov dword [ebp - 0x6e4], eax
mov dword [ebp - 0x6f0], 2
push str.wintrust.dll
mov dword [ebp - 0x6ec], esi
mov dword [ebp - 0x6e0], esi
mov dword [ebp - 0x6d4], 0x100
mov dword [ebp - 0x6dc], esi
mov dword [ebp - 0x6d8], esi
mov dword [ebp - 0x6f8], esi
mov dword [ebp - 0x6f4], esi
mov dword [ebp - 0x6d0], esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
mov dword [ebp - 0x704], ebx
test ebx, ebx
je 0x40d499
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.WinVerifyTrust
push ebx
call esi
push str.CryptCATAdminReleaseContext
push ebx
mov dword [ebp - 0x6b0], eax
call esi
push str.CryptCATAdminReleaseCatalogContext
push ebx
mov dword [ebp - 0x6b8], eax
call esi
push str.CryptCATCatalogInfoFromContext
push ebx
mov dword [ebp - 0x6c8], eax
call esi
push str.CryptCATAdminEnumCatalogFromHash
push ebx
mov dword [ebp - 0x6c4], eax
call esi
push str.CryptCATAdminAcquireContext
push ebx
mov dword [ebp - 0x6c0], eax
call esi
push str.CryptCATAdminCalcHashFromFileHandle
push ebx
mov dword [ebp - 0x6b4], eax
call esi
mov esi, eax
mov eax, dword [ebp - 0x6b0]
mov dword [ebp - 0x6ac], esi
test eax, eax
je 0x40d484
cmp dword [ebp - 0x6b8], 0
je 0x40d484
cmp dword [ebp - 0x6c8], 0
je 0x40d484
cmp dword [ebp - 0x6c4], 0
je 0x40d484
cmp dword [ebp - 0x6c0], 0
je 0x40d484
cmp dword [ebp - 0x6b4], 0
je 0x40d484
test esi, esi
jne 0x40d49b
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00416230
mov esp, ebp
pop ebp
ret 4
xor eax, eax
lea ecx, [ebp - 0x6fc]
push ecx
lea ecx, [ebp - 0x488]
push ecx
push 0
call eax
mov dword [ebp - 0x6cc], eax
test eax, eax
je 0x40d856
push edi
push str.__B1___Before_open_file__s_n
call fcn.00401350
add esp, 8
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40d5ee
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 2
jne 0x40d62c
push edi
push str.__C1___File_not_found__s_n
call fcn.00401350
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x270], ax
lea eax, [ebp - 0x26e]
push eax
call fcn.00417930
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x478], ax
lea eax, [ebp - 0x476]
push eax
call fcn.00417930
add esp, 0x20
lea eax, [ebp - 0x478]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push 0x5c
push edi
call fcn.0041681d
push eax
lea eax, [ebp - 0x478]
push eax
push str._sSysWOW64Drivers_s
lea eax, [ebp - 0x270]
push 0x104
push eax
call fcn.00401280
add esp, 0x1c
lea eax, [ebp - 0x270]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40d62c
lea esi, [ebp - 0x270]
mov edx, 0x104
mov ecx, edi
sub esi, edi
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x40d5d4
movzx eax, word [esi + ecx]
test ax, ax
je 0x40d5d4
mov word [ecx], ax
add ecx, 2
dec edx
jne 0x40d5b6
jmp 0x40d5d8
test edx, edx
jne 0x40d5db
sub ecx, 2
push edi
xor eax, eax
push str.__C2___Successfully_opened__s_n
mov word [ecx], ax
call fcn.00401350
add esp, 8
push 0
lea eax, [ebp - 0x68]
mov dword [ebp - 0x6a8], 0x64
push eax
lea eax, [ebp - 0x6a8]
push eax
push ebx
call dword [ebp - 0x6ac]
test eax, eax
jne 0x40d650
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00416230
mov esp, ebp
pop ebp
ret 4
push esi
push ebx
push str.__B2___Failed_to_open_file_handle__08X__08x_n
call fcn.00401350
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00416230
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 0x6a8]
xor ecx, ecx
mov edx, 2
lea eax, [eax*2 + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00417498
xor esi, esi
add esp, 4
mov edi, eax
mov dword [ebp - 0x6ac], edi
cmp dword [ebp - 0x6a8], esi
jbe 0x40d6b8
jmp 0x40d690
movzx ecx, byte [ebp + esi - 0x68]
push ecx
push str._02X
push 4
push edi
call fcn.00401280
inc esi
add esp, 0x10
add edi, 4
cmp esi, dword [ebp - 0x6a8]
jb 0x40d690
mov edi, dword [ebp - 0x6ac]
push 0
lea eax, [ebp - 0x498]
push eax
lea eax, [ebp - 0x6bc]
push eax
call dword [ebp - 0x6b4]
test eax, eax
je 0x40d610
push 0
push 0
push dword [ebp - 0x6a8]
lea eax, [ebp - 0x68]
push eax
push dword [ebp - 0x6bc]
call dword [ebp - 0x6c0]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.__B7___stop_fpCryptCATAdminEnumCatalogFromHash__s__08X_n
call fcn.00401350
add esp, 0xc
test esi, esi
je 0x40d832
push 0x208
lea eax, [ebp - 0x6a0]
mov dword [ebp - 0x6a4], 0
push 0
push eax
call fcn.00417930
add esp, 0xc
lea eax, [ebp - 0x6a4]
push 0
push eax
push esi
call dword [ebp - 0x6c4]
xorps xmm0, xmm0
mov dword [ebp - 0x718], 0
movdqu xmmword [ebp - 0x738], xmm0
lea eax, [ebp - 0x6a0]
mov dword [ebp - 0x738], 0x24
mov dword [ebp - 0x730], eax
mov eax, dword [ebp - 0x700]
movdqu xmmword [ebp - 0x728], xmm0
push 0x30
mov dword [ebp - 0x728], eax
lea eax, [ebp - 0x6fc]
push 0
push eax
mov dword [ebp - 0x72c], edi
call fcn.00417930
add esp, 0xc
mov dword [ebp - 0x6fc], 0x30
lea eax, [ebp - 0x738]
mov dword [ebp - 0x6e8], 2
mov dword [ebp - 0x6e4], eax
lea eax, [ebp - 0x6fc]
mov dword [ebp - 0x6f0], 2
push eax
lea eax, [ebp - 0x488]
mov dword [ebp - 0x6ec], 1
push eax
push 0
mov dword [ebp - 0x6d4], 0
mov dword [ebp - 0x6dc], 0
mov dword [ebp - 0x6d8], 0
mov dword [ebp - 0x6f8], 0
mov dword [ebp - 0x6f4], 0
mov dword [ebp - 0x6d0], 0
call dword [ebp - 0x6b0]
push 0
push esi
push dword [ebp - 0x6bc]
mov dword [ebp - 0x6cc], eax
call dword [ebp - 0x6c8]
push 0
push dword [ebp - 0x6bc]
call dword [ebp - 0x6b8]
push edi
call fcn.004174a1
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x704]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [ebp - 4]
xor eax, eax
cmp dword [ebp - 0x6cc], eax
pop edi
sete al
xor ecx, ebp
pop esi
pop ebx
call fcn.00416230
mov esp, ebp
pop ebp
ret 4