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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x3e], 1
mov dword [ebp - 4], ebx
je 0x407ba7
mov edi, dword [ebp + 8]
mov ecx, edi
call fcn.004024bf
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4079fe
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 2
je 0x407ba7
call esi
cmp eax, 3
je 0x407ba7
mov eax, dword [ebx + 0x3e]
cmp eax, 2
je 0x407bcf
mov esi, dword [ebp + 0xc]
test ah, 7
je 0x407b09
lea ecx, [ebp - 0x64]
call fcn.00407d61
mov ecx, edi
call fcn.004024bf
push dword [edi + 4]
lea ecx, [ebp - 0x64]
call fcn.00418b25
test al, al
je 0x407ae1
mov ecx, dword [esi + 0x2e]
and dword [ebp - 8], 0
mov eax, dword [esi + 0x2a]
and dword [ebp - 8], 0
mov edx, dword [ebp - 0x58]
mov ebx, ecx
or ebx, eax
jne 0x407a56
xor bl, bl
jmp 0x407bad
mov ebx, dword [ebp - 4]
mov ebx, dword [ebx + 0x3e]
mov dword [ebp + 8], ebx
and dword [ebp + 8], 0x200
je 0x407a7b
cmp eax, edx
jg 0x407bab
jl 0x407a7b
cmp ecx, dword [ebp - 0x54]
ja 0x407bab
mov ebx, dword [ebp - 4]
test byte [ebx + 0x3f], 1
je 0x407a91
cmp ecx, dword [ebp - 0x54]
jne 0x407a91
cmp eax, edx
je 0x407bab
mov ebx, dword [ebp - 4]
mov ebx, dword [ebx + 0x3e]
mov dword [ebp + 0xc], ebx
and dword [ebp + 0xc], 0x400
je 0x407ab6
cmp eax, edx
jg 0x407ab6
jl 0x407bab
cmp ecx, dword [ebp - 0x54]
jb 0x407bab
cmp dword [ebp + 8], 0
je 0x407ac7
cmp eax, edx
jl 0x407a4f
jg 0x407ac7
cmp ecx, dword [ebp - 0x54]
jb 0x407a4f
cmp dword [ebp + 0xc], 0
je 0x407af7
cmp eax, edx
jl 0x407af7
jg 0x407a4f
cmp ecx, dword [ebp - 0x54]
jbe 0x407af7
jmp 0x407a4f
cmp dword [esi + 0x2e], 0
jne 0x407bab
cmp dword [esi + 0x2a], 0
jne 0x407bab
jmp 0x407afa
mov ebx, dword [ebp - 4]
lea ecx, [ebp - 0x64]
mov dword [ebp - 0x64], 0x41b754
call fcn.00407dbe
test byte [ebx + 0x3e], 0x70
je 0x407bcf
mov ecx, edi
call fcn.004024bf
mov eax, dword [edi + 4]
lea ecx, [ebp - 0x1a4]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp + 8], eax
lea eax, [ebp - 0xc]
mov ebx, dword [ebp - 0x190]
and dword [ebp - 0x18], 0
mov edi, dword [ebp - 0x18c]
push eax
mov ax, word [esi + 0x46]
push eax
mov ax, word [esi + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_DosDateTimeToFileTime]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
mov eax, dword [ebp - 4]
and dword [ebp - 0x18], 0
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
mov eax, dword [eax + 0x3e]
test al, 0x20
je 0x407b7e
cmp ecx, edi
jg 0x407b98
jl 0x407b7e
cmp edx, ebx
ja 0x407b98
test al, 0x10
je 0x407b8a
cmp edx, ebx
jne 0x407b8a
cmp ecx, edi
je 0x407b98
test al, 0x40
je 0x407bc0
cmp ecx, edi
jg 0x407bc0
jl 0x407b98
cmp edx, ebx
jae 0x407bc0
cmp dword [ebp + 8], 0xffffffff
je 0x407ba7
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov al, 1
jmp 0x407bd1
mov bl, 1
lea ecx, [ebp - 0x64]
mov dword [ebp - 0x64], 0x41b754
call fcn.00407dbe
mov al, bl
jmp 0x407bd1
cmp dword [ebp + 8], 0xffffffff
je 0x407bcf
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
xor al, al
pop edi
pop esi
pop ebx
leave
ret 8