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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x88
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x60], ebx
call fcn.00406698
push ebx
lea edi, [esi + 0x64]
push 0x104
push edi
mov dword [ebp - 0x78], edi
call fcn.0040258e
mov dword [ebp - 0x50], eax
test eax, eax
jl 0x40ab8c
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x419be6
push edi
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
test eax, eax
je 0x419eb1
lea edi, [esi + 0x288]
push edi
push 0x409aa0
push 1
push 0
push 0x40d890
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov dword [ebp - 0x50], eax
test eax, eax
jl 0x419c1c
cmp dword [edi], 0
je 0x419c36
lea ebx, [esi + 0x26c]
push ebx
push 0x40d9fc
push 0x17
push 0
push 0x40d954
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov dword [ebp - 0x50], eax
test eax, eax
jl 0x419c40
push dword [ebx]
lea ecx, [esi + 0x294]
call fcn.00405a05
mov ecx, dword [edi]
mov eax, dword [ebx]
mov edx, dword [eax]
push 0x40abd4
push ecx
push eax
call dword [edx + 0xc]
mov dword [ebp - 0x50], eax
test eax, eax
jl 0x40ab8c
push dword [edi]
lea ecx, [esi + 0x28c]
call fcn.0040d826
lea edi, [esi + 0x280]
push edi
push dword [ebp - 0x60]
mov ecx, esi
call fcn.00411be2
mov dword [ebp - 0x50], eax
test eax, eax
jl 0x419c5d
push dword [ebp - 0x78]
mov ecx, dword [edi]
mov eax, dword [ebx]
mov edx, dword [eax]
push ecx
push eax
call dword [edx + 0xc]
and dword [ebp - 0x60], 0
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x50]
cmp eax, 0x80070057
je 0x419c68
cmp eax, 0x8007000d
je 0x419c68
cmp eax, 0x80070026
je 0x419c68
cmp eax, 0x800710d2
je 0x419c68
cmp dword [ebp - 0x50], 0
jl 0x419ca8
add esi, 0x290
push esi
call fcn.0040c91d
mov dword [ebp - 0x50], eax
test eax, eax
jl 0x419cb5
mov esi, dword [esi]
mov eax, dword [ebx]
mov ecx, dword [eax]
push 0x40b1dc
push esi
push eax
call dword [ecx + 0xc]
mov dword [ebp - 0x50], eax
test eax, eax
jl 0x419cc0
sub esp, 0x10
mov eax, dword [ebp - 0x5c]
mov edi, esp
mov esi, 0x40b0fc
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
and dword [ebp - 0x58], 0
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
sub esp, 0x10
mov edi, esp
mov esi, 0x40b10c
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
add eax, 0x280
mov eax, dword [eax]
movsd dword es:[edi], dword [esi]
push eax
movsd dword es:[edi], dword [esi]
call fcn.0040c3fe
push eax
lea ecx, [ebp - 0x58]
call fcn.0040aca8
push dword [ebx]
mov ecx, dword [ebp - 0x5c]
call fcn.0040ca70
test eax, eax
jl 0x419ccb
push 0x40b198
mov esi, 0x40c2e8
push esi
push 4
call fcn.004173ad
add esp, 0xc
push dword [ebx]
lea ecx, [ebp - 0x68]
call fcn.00405889
lea ecx, [ebp - 0x88]
call fcn.004055a8
cmp dword [ebp - 0x80], 0xffffffff
jle 0x40a758
push 0xffffffffffffffff
lea ecx, [ebp - 0x88]
call fcn.00402625
push 0x1000
push dword [0x437074]
push 0x64
push dword [0x437070]
push dword [ebp - 0x68]
call fcn.0040cd8b
push dword [ebp - 0x84]
lea ecx, [ebp - 0x88]
mov dword [ebp - 0x50], eax
call fcn.00402625
xor edi, edi
cmp dword [ebp - 0x50], edi
jl 0x419ce5
lea eax, [ebp - 0x54]
push eax
push 0x40abfc
push 0x17
push edi
push 0x40b0ec
mov dword [ebp - 0x54], edi
call dword [sym.imp.ole32.dll_CoCreateInstance]
cmp eax, edi
mov dword [ebp - 0x50], eax
jl 0x419d18
mov eax, dword [ebx]
mov ecx, dword [eax]
push 0x40b188
push dword [ebp - 0x54]
push eax
call dword [ecx + 0xc]
cmp eax, edi
mov dword [ebp - 0x50], eax
jl 0x419d3b
push edi
push dword [ebp - 0x54]
mov dword [ebp - 0x64], edi
call fcn.0040c3c9
push eax
lea ecx, [ebp - 0x64]
call fcn.0040aca8
mov esi, dword [ebp - 0x5c]
mov eax, dword [esi + 0x290]
push edi
push eax
mov dword [ebp - 0x70], edi
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x74], edi
call fcn.0040c3c9
push eax
lea ecx, [ebp - 0x70]
call fcn.0040aca8
mov eax, dword [esi + 0x290]
push edi
push eax
call fcn.0040ad49
push eax
lea ecx, [ebp - 0x6c]
call fcn.0040aca8
mov eax, dword [esi + 0x288]
push edi
push eax
call fcn.0040c3c9
push eax
lea ecx, [ebp - 0x74]
call fcn.0040aca8
mov eax, dword [ebx]
mov ecx, dword [eax]
push edi
push dword [ebp - 0x64]
push dword [ebp - 0x58]
push eax
call dword [ecx + 0x1c]
cmp eax, edi
jge 0x40a8d5
mov eax, dword [ebx]
push dword [ebp - 0x54]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
cmp dword [ebp - 0x54], edi
je 0x40a866
push edi
lea eax, [ebp - 0x54]
push eax
call fcn.0040c554
cmp dword [ebp - 0x64], edi
je 0x40a875
push edi
lea eax, [ebp - 0x64]
push eax
call fcn.0040c554
lea eax, [ebp - 0x54]
push eax
push 0x40abfc
push 0x17
push edi
push 0x40b12c
call dword [sym.imp.ole32.dll_CoCreateInstance]
cmp eax, edi
jl 0x419dbe
mov eax, dword [ebx]
mov ecx, dword [eax]
push 0x40b174
push dword [ebp - 0x54]
push eax
call dword [ecx + 0xc]
cmp eax, edi
jl 0x419dbe
push edi
push dword [ebp - 0x54]
call fcn.0040c3c9
push eax
lea ecx, [ebp - 0x64]
call fcn.0040aca8
mov eax, dword [ebx]
mov ecx, dword [eax]
push edi
push dword [ebp - 0x64]
push dword [ebp - 0x58]
push eax
call dword [ecx + 0x1c]
cmp eax, edi
jl 0x419dbe
push edi
push dword [ebp - 0x54]
mov dword [esi + 0x400], 1
mov dword [ebp - 0x5c], edi
call fcn.0040ad49
push eax
lea ecx, [ebp - 0x5c]
call fcn.0040aca8
mov eax, dword [ebx]
mov ecx, dword [eax]
push edi
push dword [ebp - 0x70]
push dword [ebp - 0x5c]
push eax
call dword [ecx + 0x1c]
cmp eax, edi
mov dword [ebp - 0x50], eax
jl 0x419d46
mov eax, dword [ebx]
mov ecx, dword [eax]
push edi
push dword [ebp - 0x74]
push dword [ebp - 0x6c]
push eax
call dword [ecx + 0x1c]
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x5c], edi
je 0x40a92e
mov eax, dword [ebp - 0x5c]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
cmp dword [ebp - 0x50], edi
jl 0x419e0a
push 0x48
lea eax, [ebp - 0x4c]
push edi
push eax
call sub.msvcrt.dll_memset
mov eax, dword [ebp - 0x58]
mov ecx, dword [eax]
add esp, 0xc
lea edx, [ebp - 0x4c]
push edx
push eax
call dword [ecx + 0x1c]
cmp eax, edi
mov dword [ebp - 0x50], eax
jl 0x419e29
mov eax, dword [esi + 0x290]
push 0xffffffffffffffff
push dword [esi + 0x60]
push edi
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.0040ad7e
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x4c]
push eax
call fcn.00408c14
cmp dword [ebp - 0x50], edi
jl 0x419e4e
lea eax, [ebp - 0x7c]
push eax
push 0x40abfc
push 0x17
push edi
push 0x40b11c
mov dword [ebp - 0x7c], edi
call dword [sym.imp.ole32.dll_CoCreateInstance]
cmp eax, edi
mov dword [ebp - 0x50], eax
jl 0x40ab28
cmp dword [ebp - 0x7c], edi
je 0x40aa3b
mov eax, dword [ebx]
mov ecx, dword [eax]
push 0x40abb8
push dword [ebp - 0x7c]
push eax
call dword [ecx + 0xc]
cmp eax, edi
mov dword [ebp - 0x50], eax
jl 0x40ab28
push edi
push dword [ebp - 0x7c]
mov dword [ebp - 0x5c], edi
mov dword [ebp - 0x60], edi
call fcn.0040c3c9
push eax
lea ecx, [ebp - 0x60]
call fcn.0040aca8
mov eax, dword [esi + 0x288]
push edi
push eax
call fcn.0040ad49
push eax
lea ecx, [ebp - 0x5c]
call fcn.0040aca8
cmp dword [ebp - 0x60], edi
je 0x40aa2d
cmp dword [ebp - 0x5c], edi
je 0x40aa24
mov eax, dword [ebx]
mov ecx, dword [eax]
push edi
push dword [ebp - 0x60]
push dword [ebp - 0x5c]
push eax
call dword [ecx + 0x1c]
cmp eax, edi
mov dword [ebp - 0x50], eax
jl 0x419e58
mov eax, dword [ebp - 0x60]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
cmp dword [ebp - 0x5c], edi
je 0x40aa3b
mov eax, dword [ebp - 0x5c]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push dword [ebx]
lea ecx, [esi + 0x270]
call fcn.0040aee1
push dword [ebx]
lea ecx, [esi + 0x274]
call fcn.0040af15
push dword [esi + 0x280]
lea ecx, [esi + 0x278]
call fcn.0040af49
push dword [esi + 0x280]
lea ecx, [esi + 0x284]
call fcn.0040af7d
push dword [ebx]
lea ecx, [esi + 0x27c]
call fcn.0040afa0
cmp dword [esi + 0x270], edi
je 0x419e8e
cmp dword [esi + 0x274], edi
je 0x419e8e
cmp dword [esi + 0x278], edi
je 0x419e8e
cmp dword [esi + 0x284], edi
je 0x419e8e
cmp dword [esi + 0x27c], edi
je 0x419e8e
push dword [ebp - 0x54]
lea ecx, [esi + 0x3fc]
call fcn.0040afd5
cmp dword [esi + 0x3fc], edi
je 0x40ab0e
mov dword [ebp - 0x5c], edi
mov dword [ebp - 0x60], edi
mov eax, dword [esi + 0x3fc]
mov ecx, dword [eax]
push edi
push dword [ebp - 0x60]
push dword [ebp - 0x5c]
push eax
call dword [ecx + 0x18]
inc dword [ebp - 0x60]
cmp dword [ebp - 0x60], 0x16
jl 0x40aadc
inc dword [ebp - 0x5c]
cmp dword [ebp - 0x5c], 0xa
jl 0x40aad9
mov eax, dword [esi + 0x3fc]
mov ecx, dword [eax]
push edi
push eax
call dword [ecx + 0x20]
mov ebx, dword [ebx]
add esi, 0x42c
push esi
push ebx
call fcn.0040d041
cmp eax, edi
mov dword [ebp - 0x50], eax
jl 0x419e87
mov eax, dword [ebp - 0x7c]
cmp eax, edi
je 0x40ab35
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x74]
cmp eax, edi
je 0x40ab42
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x6c]
cmp eax, edi
je 0x40ab4f
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x70]
cmp eax, edi
je 0x40ab5c
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x64]
cmp eax, edi
je 0x40ab69
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x54]
cmp eax, edi
je 0x40ab76
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x68]
cmp eax, edi
je 0x40ab83
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x58]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x50]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004013d7
leave
ret 4
cmp dword [ebp - 0x60], eax
jae 0x40a694
jmp 0x40a665
cmp dword [ebp - 0x58], edi
je 0x40ab8c
jmp 0x40ab83
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
push eax
push edi
push 0x41a2d0
push 0x40c2e8
push 1
call fcn.004173ad
add esp, 0x14
call esi
test eax, eax
jle 0x419c14
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x50], eax
jmp 0x40ab8c
push eax
push 0x41a270
push 0x40c2e8
push 1
call fcn.004173ad
add esp, 0x10
jmp 0x40ab8c
push 0x41a220
jmp 0x419eb6
push eax
push dword [ebp - 0x78]
push 0x41a1b8
push 0x40c2e8
push 1
call fcn.004173ad
add esp, 0x14
jmp 0x40ab8c
push eax
push dword [ebp - 0x60]
push 0x41a150
jmp 0x419c49
push dword [ebp - 0x78]
push 0x41d378
push 0x40c2e8
push 1
call fcn.004173ad
add esp, 0x10
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x78]
mov eax, dword [ebx]
push dword [edi]
mov ecx, dword [eax]
add dword [ebp - 0x60], 0x64
push eax
call dword [ecx + 0xc]
lea ecx, [esi + 0x14]
mov dword [ebp - 0x50], eax
call fcn.00425d2f
jmp 0x40aba0
push dword [ebp - 0x50]
push dword [ebp - 0x78]
push 0x41a0f0
jmp 0x419c49
push eax
push 0x41d2b8
jmp 0x419c22
push eax
push 0x41d248
jmp 0x419c22
push eax
push 0x41d1d0
push 0x40c2e8
push 3
call fcn.004173ad
add esp, 0x10
jmp 0x40a71b
push dword [ebp - 0x50]
push dword [ebp - 0x78]
push 0x41d158
push esi
push 1
call fcn.004173ad
add esp, 0x14
mov eax, dword [ebp - 0x68]
cmp eax, edi
je 0x419d08
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x58]
cmp eax, edi
jne 0x40ab86
jmp 0x40ab8c
push eax
push dword [ebp - 0x78]
push 0x41a088
push esi
push 1
call fcn.004173ad
mov eax, dword [ebp - 0x54]
add esp, 0x14
cmp eax, edi
je 0x419cfb
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x419cfb
push eax
push dword [ebp - 0x78]
push 0x41a028
jmp 0x419d21
push 0x41d0f8
push 0x40c2e8
push 1
call fcn.004173ad
mov eax, dword [ebp - 0x5c]
add esp, 0xc
cmp eax, edi
je 0x419d67
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x74]
cmp eax, edi
je 0x419d74
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x6c]
cmp eax, edi
je 0x419d81
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x70]
cmp eax, edi
je 0x419d8e
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x64]
cmp eax, edi
je 0x419d9b
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x54]
cmp eax, edi
je 0x419da8
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x68]
cmp eax, edi
je 0x40abae
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x40abae
mov eax, dword [ebx]
push edi
push dword [ebp - 0x70]
mov dword [esi + 0x400], edi
push dword [ebp - 0x58]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x1c]
cmp eax, edi
mov dword [ebp - 0x50], eax
jge 0x419df3
push 0x41d090
push 0x40c2e8
push 1
call fcn.004173ad
add esp, 0xc
jmp 0x419d67
mov eax, dword [ebx]
mov ecx, dword [eax]
push edi
push dword [ebp - 0x74]
push dword [ebp - 0x6c]
push eax
call dword [ecx + 0x1c]
mov dword [ebp - 0x50], eax
jmp 0x40a92e
push dword [ebp - 0x50]
push dword [ebp - 0x78]
push 0x419f90
push 0x40c2e8
push 1
call fcn.004173ad
add esp, 0x14
jmp 0x419d67
lea eax, [ebp - 0x4c]
push eax
call fcn.00408c14
push dword [ebp - 0x50]
push 0x41d020
push 0x40c2e8
push 1
call fcn.004173ad
add esp, 0x10
jmp 0x40ab35
push dword [ebp - 0x50]
push 0x41cfc0
jmp 0x419e3a
push eax
push dword [ebp - 0x78]
push 0x419ef8
push 0x40c2e8
push 1
call fcn.004173ad
mov eax, dword [ebp - 0x60]
mov ecx, dword [eax]
add esp, 0x14
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x5c]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x40ab28
mov dword [esi], edi
jmp 0x40ab28
push dword [ebp - 0x78]
push 0x41d328
push 0x40c2e8
push 1
call fcn.004173ad
add esp, 0x10
mov dword [ebp - 0x50], 0x80004002
jmp 0x40ab28
push 0x419ed4
push 0x40c2e8
push 1
call fcn.004173ad
mov dword [ebp - 0x50], 0x80070057
add esp, 0xc
jmp 0x40ab8c