Function at 0x51c980
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x6b4500
push 0x5c6cc0
mov eax, dword fs:[0]
push eax
sub esp, 0x46c
mov eax, dword [0x6d1554]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov esi, dword [ebp + 8]
test esi, esi
je 0x51cb74
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x51cb74
cmp dword [0x6d14d0], 0
je 0x51ca81
mov dword [ebp - 0x434], 0
mov dword [ebp - 0x438], 0
mov dword [ebp - 0x420], 0
xor ebx, ebx
push str.ntdll.dll
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
mov edi, eax
test edi, edi
je 0x51ca51
push str.RtlGetNtVersionNumbers
push edi
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
test eax, eax
je 0x51ca4a
lea ecx, [ebp - 0x420]
push ecx
lea ecx, [ebp - 0x438]
push ecx
lea ecx, [ebp - 0x434]
push ecx
call eax
movzx eax, word [ebp - 0x420]
mov dword [ebp - 0x420], eax
mov ebx, 1
push edi
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
test ebx, ebx
je 0x51ca77
mov eax, dword [ebp - 0x434]
cmp eax, 6
jne 0x51ca6b
cmp dword [ebp - 0x438], 2
jae 0x51ca6d
cmp eax, eax
jbe 0x51ca77
mov dword [0x6d86c4], 1
mov dword [0x6d14d0], 0
cmp dword [0x6d86c4], 0
jne 0x51ca94
mov eax, 1
jmp 0x51cb76
mov dword [ebp - 0x478], 0x10
mov dword [ebp - 0x474], esi
mov dword [ebp - 0x470], 0
mov dword [ebp - 0x46c], 0
mov dword [ebp - 0x430], 0xaac56b
mov dword [ebp - 0x42c], 0x11d0cd44
mov dword [ebp - 0x428], 0xc000c28c
mov dword [ebp - 0x424], 0xee95c24f
xor eax, eax
mov dword [ebp - 0x468], 0x30
mov dword [ebp - 0x464], eax
mov dword [ebp - 0x460], eax
mov dword [ebp - 0x45c], 2
mov dword [ebp - 0x458], eax
mov dword [ebp - 0x454], 1
mov dword [ebp - 0x44c], 1
mov dword [ebp - 0x448], eax
mov dword [ebp - 0x444], eax
or eax, 0x1080
mov dword [ebp - 0x440], eax
mov dword [ebp - 0x43c], 0
lea eax, [ebp - 0x478]
mov dword [ebp - 0x450], eax
xor edi, edi
mov dword [ebp - 4], edi
lea eax, [ebp - 0x468]
push eax
lea eax, [ebp - 0x430]
push eax
push edi
call sub.WINTRUST.dll_WinVerifyTrust
test eax, eax
je 0x51cb92
cmp eax, 0x800b0101
je 0x51cb92
mov dword [ebp - 4], 0xfffffffe
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0054d193
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x448]
call sub.WINTRUST.dll_WTHelperProvDataFromStateData
test eax, eax
je 0x51cc48
cmp dword [eax + 0x40], 0
jbe 0x51cc48
mov eax, dword [eax + 0x44]
test eax, eax
je 0x51cc48
mov eax, dword [eax + 0x28]
test eax, eax
je 0x51cc48
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x51cc48
cmp dword [eax + 0xc], 0
jbe 0x51cc48
mov eax, dword [ecx]
test eax, eax
je 0x51cc48
cmp dword [eax + 0xc], 0
jbe 0x51cc48
mov eax, dword [eax + 0x10]
test eax, eax
je 0x51cc48
mov eax, dword [eax]
test eax, eax
je 0x51cc48
mov esi, dword [eax + 4]
test esi, esi
je 0x51cc48
push 0x400
push 0
lea eax, [ebp - 0x41c]
push eax
call fcn.005c7920
add esp, 0xc
push 0x200
lea eax, [ebp - 0x41c]
push eax
push 0
push 0
push 4
push esi
call dword [sym.imp.CRYPT32.dll_CertGetNameStringW]
dec eax
cmp eax, 0x1fe
ja 0x51cc48
lea eax, [ebp - 0x41c]
push eax
call fcn.0051cd10
add esp, 4
mov ecx, 1
test eax, eax
cmovne edi, ecx
mov dword [ebp - 0x47c], edi
mov esi, dword [ebp - 0x448]
push 0x30
push 0
lea eax, [ebp - 0x468]
push eax
call fcn.005c7920
add esp, 0xc
mov dword [ebp - 0x468], 0x30
mov dword [ebp - 0x448], esi
mov dword [ebp - 0x44c], 2
lea eax, [ebp - 0x468]
push eax
lea eax, [ebp - 0x430]
push eax
push 0
call sub.WINTRUST.dll_WinVerifyTrust
mov dword [ebp - 4], 0xfffffffe
mov eax, edi
jmp 0x51cb76