Function at 0x40c570
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42e45b
mov eax, dword fs:[0]
push eax
sub esp, 0x1ac
mov eax, dword [0x442018]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov esi, ecx
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x40c5ac
mov eax, dword [edi]
xor ecx, ecx
mov dword [edi + 0x10], 0
mov word [eax], cx
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x40c5c2
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40c756
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x40c756
mov edi, dword [0x444214]
test edi, edi
je 0x40c600
mov ecx, edi
call dword [0x4301b4]
call edi
cmp eax, 0x12c
jg 0x40c74c
push str.GetSimpleDisplayCertNameFromFile:_File__s_does_not_exist.
lea ecx, [ebp - 0x118]
call fcn.0040ee80
mov dword [ebp - 4], 0
lea edx, [ebp - 0x6c]
mov ecx, eax
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x68], fcn.00405a90
mov dword [ebp - 0x64], 0x40e290
call fcn.00405960
mov edx, 0x12c
mov ecx, eax
call fcn.0040eb30
cmp byte [ebp - 0x88], 0
je 0x40c67e
mov edi, dword [ebp - 0x80]
test edi, edi
je 0x40c677
mov eax, dword [edi]
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x4301b4]
mov ecx, edi
call esi
mov edi, eax
test edi, edi
je 0x40c677
mov ecx, dword [edi]
push 1
mov esi, dword [ecx]
mov ecx, esi
call dword [0x4301b4]
mov ecx, edi
call esi
mov byte [ebp - 0x88], 0
lea ecx, [ebp - 0xd0]
call fcn.0040bdf0
mov edx, dword [ebp - 0xd8]
cmp edx, 8
jb 0x40c6c9
mov ecx, dword [ebp - 0xec]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40c6bf
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40c9cb
push edx
push ecx
call fcn.004143f9
add esp, 8
mov edx, dword [ebp - 0x10c]
xor eax, eax
mov dword [ebp - 0xdc], 0
mov dword [ebp - 0xd8], 7
mov word [ebp - 0xec], ax
test edx, edx
je 0x40c741
mov ecx, dword [ebp - 0x104]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffc
cmp ecx, 0x1000
jb 0x40c719
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40c9cb
push ecx
push edx
call fcn.004143f9
add esp, 8
mov dword [ebp - 0x10c], 0
mov dword [ebp - 0x108], 0
mov dword [ebp - 0x104], 0
lea ecx, [ebp - 0x118]
call fcn.00404fa0
mov eax, 2
jmp 0x40c9af
cmp dword [esi + 0x14], 8
mov dword [ebp - 0x20], 0xaac56b
mov dword [ebp - 0x1c], 0x11d0cd44
mov dword [ebp - 0x18], 0xc000c28c
mov dword [ebp - 0x14], 0xee95c24f
mov dword [ebp - 0x60], 0x10
jb 0x40c781
mov esi, dword [esi]
movzx eax, byte [ebp + 0xc]
mov ecx, 0x1212
cmp byte [ebp + 0x14], 0
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x58], 0
lea eax, [eax*2 + 2]
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x44], eax
lea eax, [ebp - 0x60]
mov dword [ebp - 0x38], eax
mov eax, 0x1012
cmovne eax, ecx
mov dword [ebp - 0x50], 0x30
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x20]
mov dword [ebp - 0x4c], 0
push eax
push 0xffffffffffffffff
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 1
mov dword [ebp - 0x34], 1
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x24], 0
call dword [sym.imp.WINTRUST.dll_WinVerifyTrust]
mov ebx, eax
test ebx, ebx
jne 0x40c996
mov edx, dword [ebp - 0x30]
lea ecx, [ebp - 0x78]
call fcn.0040c330
push eax
mov ecx, edi
call fcn.0040a240
lea ecx, [ebp - 0x78]
call fcn.00401dc0
mov esi, dword [0x444214]
test esi, esi
je 0x40c84b
mov ecx, esi
call dword [0x4301b4]
call esi
cmp eax, 0x46
jg 0x40c996
push str.GetSimpleDisplayCertNameFromFile:_Found_cert_name:__s.
lea ecx, [ebp - 0x1b8]
call fcn.0040ee80
mov dword [ebp - 4], 1
lea edx, [ebp - 0x6c]
mov ecx, eax
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x68], fcn.00405a90
mov dword [ebp - 0x64], 0x40e290
call fcn.00405960
mov edx, 0x46
mov ecx, eax
call fcn.0040eb30
cmp byte [ebp - 0x128], 0
je 0x40c8cc
mov edi, dword [ebp - 0x120]
test edi, edi
je 0x40c8c5
mov eax, dword [edi]
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x4301b4]
mov ecx, edi
call esi
mov edi, eax
test edi, edi
je 0x40c8c5
mov ecx, dword [edi]
push 1
mov esi, dword [ecx]
mov ecx, esi
call dword [0x4301b4]
mov ecx, edi
call esi
mov byte [ebp - 0x128], 0
lea ecx, [ebp - 0x170]
call fcn.0040bdf0
mov edx, dword [ebp - 0x178]
cmp edx, 8
jb 0x40c917
mov ecx, dword [ebp - 0x18c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40c90d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40c9d0
push edx
push ecx
call fcn.004143f9
add esp, 8
mov edx, dword [ebp - 0x1ac]
xor eax, eax
mov dword [ebp - 0x17c], 0
mov dword [ebp - 0x178], 7
mov word [ebp - 0x18c], ax
test edx, edx
je 0x40c98b
mov ecx, dword [ebp - 0x1a4]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffc
cmp ecx, 0x1000
jb 0x40c963
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40c9d0
push ecx
push edx
call fcn.004143f9
add esp, 8
mov dword [ebp - 0x1ac], 0
mov dword [ebp - 0x1a8], 0
mov dword [ebp - 0x1a4], 0
lea ecx, [ebp - 0x1b8]
call fcn.00404fa0
lea eax, [ebp - 0x50]
mov dword [ebp - 0x34], 2
push eax
lea eax, [ebp - 0x20]
push eax
push 0xffffffffffffffff
call dword [sym.imp.WINTRUST.dll_WinVerifyTrust]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004143eb
mov esp, ebp
pop ebp
ret
call fcn.00418aaf
call fcn.00418aaf
int3