Function at 0x402580
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2f4
mov eax, dword [0x41c018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
xorps xmm0, xmm0
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 0x30
mov dword [ebp - 0x2ec], eax
lea eax, [ebp - 0x2e0]
push 0
push eax
mov dword [ebp - 0x2f0], ecx
mov dword [ebp - 0x2e8], ebx
mov dword [ebp - 0x2e4], 0
mov dword [ebp - 0x284], 0
mov dword [ebp - 0x28c], 0
mov dword [ebp - 0x288], 0
movdqu xmmword [ebp - 0x2b0], xmm0
mov dword [ebp - 0x290], 0
movdqu xmmword [ebp - 0x2a0], xmm0
call fcn.004051d0
push 0x54
lea eax, [ebp - 0x60]
mov dword [ebp - 0x70], 0xaac56b
push 0
push eax
mov dword [ebp - 0x6c], 0x11d0cd44
mov dword [ebp - 0x68], 0xc000c28c
mov dword [ebp - 0x64], 0xee95c24f
call fcn.004051d0
add esp, 0x18
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x402674
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
cmp eax, 2
sete cl
lea eax, [ecx*2 - 1]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040476a
mov esp, ebp
pop ebp
ret 8
push 0
push 0
lea eax, [ebp - 0x284]
push eax
call dword [sym.imp.WINTRUST.dll_CryptCATAdminAcquireContext]
test eax, eax
je 0x4026ea
push 0
push 0
lea eax, [ebp - 0x288]
push eax
push esi
call dword [sym.imp.WINTRUST.dll_CryptCATAdminCalcHashFromFileHandle]
test eax, eax
je 0x4026dc
push dword [ebp - 0x288]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
push 0
test edi, edi
je 0x4026de
push edi
lea eax, [ebp - 0x288]
push eax
push esi
call dword [sym.imp.WINTRUST.dll_CryptCATAdminCalcHashFromFileHandle]
test eax, eax
jne 0x402707
push edi
push eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [ebp - 0x284]
call dword [sym.imp.WINTRUST.dll_CryptCATAdminReleaseContext]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040476a
mov esp, ebp
pop ebp
ret 8
lea eax, [ebp - 0x28c]
mov dword [ebp - 0x28c], 0
push eax
push 0
push dword [ebp - 0x288]
push edi
push dword [ebp - 0x284]
call dword [sym.imp.WINTRUST.dll_CryptCATAdminEnumCatalogFromHash]
mov ebx, eax
mov dword [ebp - 0x28c], ebx
test ebx, ebx
jne 0x402773
push eax
push dword [ebp - 0x284]
call dword [sym.imp.WINTRUST.dll_CryptCATAdminReleaseContext]
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push edi
push ebx
call eax
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040476a
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp - 0x2f0]
cmp dword [eax + 0xc], 0
je 0x40289a
push 0x20c
lea eax, [ebp - 0x280]
push 0
push eax
call fcn.004051d0
add esp, 0xc
mov dword [ebp - 0x280], 0x20c
lea eax, [ebp - 0x280]
push 0
push eax
push ebx
call dword [sym.imp.WINTRUST.dll_CryptCATCatalogInfoFromContext]
test eax, eax
je 0x402894
mov ebx, dword [sym.imp.WINTRUST.dll_WinVerifyTrust]
lea eax, [ebp - 0x27c]
mov dword [ebp - 0x2a8], eax
mov eax, dword [ebp - 0x288]
mov dword [ebp - 0x294], eax
mov eax, dword [ebp - 0x2e8]
mov dword [ebp - 0x2a0], eax
lea eax, [ebp - 0x60]
mov dword [ebp - 0x2a4], eax
lea eax, [ebp - 0x2b0]
mov dword [ebp - 0x2c8], eax
lea eax, [ebp - 0x2e0]
push eax
lea eax, [ebp - 0x70]
mov dword [ebp - 0x2b0], 0x24
push eax
push 0
mov dword [ebp - 0x298], edi
mov dword [ebp - 0x2d4], 2
mov dword [ebp - 0x2cc], 2
mov dword [ebp - 0x2c4], 1
mov dword [ebp - 0x2e0], 0x30
call ebx
mov dword [ebp - 0x2e4], eax
test eax, eax
jne 0x402894
push dword [ebp - 0x2c0]
call dword [sym.imp.WINTRUST.dll_WTHelperProvDataFromStateData]
push 0
push 0
push 0
push eax
call dword [sym.imp.WINTRUST.dll_WTHelperGetProvSignerFromChain]
push 0
push eax
call dword [sym.imp.WINTRUST.dll_WTHelperGetProvCertFromChain]
push dword [ebp - 0x2ec]
push dword [eax + 4]
call fcn.00402e20
lea eax, [ebp - 0x2e0]
mov dword [ebp - 0x2c4], 2
push eax
lea eax, [ebp - 0x70]
push eax
push 0
call ebx
mov ebx, dword [ebp - 0x28c]
push 0
push ebx
push dword [ebp - 0x284]
call dword [sym.imp.WINTRUST.dll_CryptCATAdminReleaseCatalogContext]
push 0
push dword [ebp - 0x284]
call dword [sym.imp.WINTRUST.dll_CryptCATAdminReleaseContext]
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push edi
push 0
call eax
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x2e4]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0040476a
mov esp, ebp
pop ebp
ret 8