Function at 0x40cb70
Capabilities:
Check if file exists
Get file attributes
Link many functions at runtime

Disassembly:
sub esp, 0x94
push ebx
push ebp
push esi
push edi
xor eax, eax
mov dword [esp + 0x10], 0
xor esi, esi
mov dword [esp + 0x14], 0
push esi
xor ebp, ebp
mov dword [esp + 0x1c], eax
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [esp + 0xa8]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40cf62
test al, 0x50
jne 0x40cf62
cmp dword [0x4499b4], ebx
jne 0x40ccde
xor eax, eax
push str.crypt32.dll
mov dword [esp + 0x28], eax
call fcn.00408ef0
xor ecx, ecx
mov dword [esp + 0x20], eax
add esp, 4
cmp ecx, str.crypt32.dll
je 0x40cbed
test eax, eax
je 0x40cc00
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x24]
mov dword [0x4499b4], eax
test eax, eax
je 0x40ccde
push str.CryptMsgClose
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CertCloseStore
push dword [0x4499b4]
mov dword [0x4499b8], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CertFreeCertificateContext
push dword [0x4499b4]
mov dword [0x4499bc], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CertFindCertificateInStore
push dword [0x4499b4]
mov dword [0x4499c0], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CryptMsgGetParam
push dword [0x4499b4]
mov dword [0x4499c4], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CryptQueryObject
push dword [0x4499b4]
mov dword [0x4499c8], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CertGetNameStringA
push dword [0x4499b4]
mov dword [0x4499cc], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CryptDecodeObjectEx
push dword [0x4499b4]
mov dword [0x4499d0], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CertGetIssuerCertificateFromStore
push dword [0x4499b4]
mov dword [0x4499d4], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, eax
mov dword [0x4499d8], ecx
jmp 0x40cce4
mov ecx, dword [0x4499d8]
cmp dword [0x4499b8], ebx
je 0x40cee1
cmp dword [0x4499bc], ebx
je 0x40cee1
cmp dword [0x4499c0], ebx
je 0x40cee1
cmp dword [0x4499c4], ebx
je 0x40cee1
cmp dword [0x4499c8], ebx
je 0x40cee1
mov eax, dword [0x4499cc]
test eax, eax
je 0x40cee1
cmp dword [0x4499d0], ebx
je 0x40cee1
cmp dword [0x4499d4], ebx
je 0x40cee1
test ecx, ecx
je 0x40cee1
push 0
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x3c]
push ecx
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x40]
push ecx
push 0
push 2
push 0x400
push edi
push 1
call eax
mov ebx, eax
test ebx, ebx
jne 0x40cd89
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x40cf67
lea eax, [esp + 0x20]
push eax
push 0
push 0
push 6
push dword [esp + 0x24]
call dword [0x4499c8]
mov ebx, eax
test ebx, ebx
jne 0x40cdb1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x40cf67
push dword [esp + 0x20]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebp, eax
test ebp, ebp
jne 0x40cdd2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
xor ebx, ebx
jmp 0x40cf67
lea eax, [esp + 0x20]
push eax
push ebp
push 0
push 6
push dword [esp + 0x24]
call dword [0x4499c8]
mov ebx, eax
test ebx, ebx
jne 0x40cdf9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x40cf67
mov eax, dword [ebp + 4]
mov dword [esp + 0x4c], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x50], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x38], eax
mov eax, dword [ebp + 0x10]
push 0
mov dword [esp + 0x40], eax
lea eax, [esp + 0x38]
push eax
push 0xb0000
push 0
push 0x10001
push dword [esp + 0x24]
call dword [0x4499c4]
mov dword [esp + 0x18], eax
test eax, eax
jne 0x40ce49
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
xor ebx, ebx
jmp 0x40cf67
mov edi, dword [esp + 0xac]
test edi, edi
je 0x40ce73
push eax
call fcn.00409fb0
add esp, 4
mov dword [edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
mov esi, eax
test esi, esi
jne 0x40cf67
jmp 0x40ce79
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [esp + 0x10]
push ebp
call fcn.0040b390
add esp, 8
test eax, eax
jne 0x40cea2
push ebp
call fcn.0040b300
add esp, 4
test eax, eax
jne 0x40cea2
xor ebx, ebx
call edi
mov esi, eax
jmp 0x40cf67
cmp dword [0x44985c], 0
jne 0x40ced6
push 0
push str.wintrust.dll
call fcn.0040a430
add esp, 8
mov dword [0x44985c], eax
test eax, eax
je 0x40ced6
push str.WinVerifyTrust
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x449860], eax
jmp 0x40cedb
mov eax, dword [0x449860]
xor ebx, ebx
test eax, eax
jne 0x40cee8
mov esi, 0x7e
jmp 0x40cf67
xor edi, edi
lea ebx, [ebx]
push edi
push dword [esp + 0xac]
call fcn.0040b250
add esp, 8
test eax, eax
je 0x40cf0e
inc edi
mov esi, eax
cmp edi, 1
jb 0x40cef0
jmp 0x40cf13
mov ebx, 1
cmp esi, 0x800b010a
jne 0x40cf67
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0
push eax
mov eax, dword [esp + 0x1c]
push 0
push eax
push dword [esp + 0x1c]
call dword [0x4499d8]
mov edi, eax
test edi, edi
je 0x40cf67
mov ecx, dword [edi + 0xc]
add ecx, 0x44
push ecx
call fcn.00409b60
add esp, 4
test eax, eax
je 0x40cf59
mov ebx, 1
xor esi, esi
push edi
call dword [0x4499c0]
jmp 0x40cf67
mov esi, 2
push ebp
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40cf7d
push eax
call dword [0x4499c0]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40cf8e
push 0
push eax
call dword [0x4499bc]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40cf9d
push eax
call dword [0x4499b8]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x94
ret