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

Disassembly:
sub esp, 0x1c
push ebx
push ebp
mov ebp, dword [esp + 0x2c]
push esi
mov eax, ebp
push edi
xor edi, edi
mov byte [esp + 0x34], 0
mov byte [esp + 0x13], 0
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40f020
sub eax, edx
sar eax, 1
mov esi, eax
jne 0x40f03f
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 8
xor ecx, ecx
lea eax, [esi + 2]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00422540
add esp, 4
mov ebx, eax
push ebp
lea eax, [esi + 1]
push eax
push ebx
call fcn.00422e62
add esp, 0xc
mov word [ebx + esi*2 + 2], di
cmp word [ebx], 0x20
mov ebp, ebx
jne 0x40f08a
jmp 0x40f080
add ebp, 2
cmp word [ebp], 0x20
je 0x40f080
push 0x28
push ebp
call fcn.00422b8f
mov esi, eax
add esp, 8
test esi, esi
je 0x40f0d2
mov word [esi], di
add esi, 2
cmp word [esi], di
je 0x40f0d2
cmp edi, 6
jge 0x40f0d2
push 0x44eed0
push esi
call fcn.00423553
add esp, 8
test eax, eax
je 0x40f0d2
mov dword [esp + edi*4 + 0x14], esi
lea esi, [eax + 2]
mov word [eax], 0
add edi, 1
cmp word [esi], 0
jne 0x40f0a6
push 0x44eed8
push ebp
call fcn.00422afe
add esp, 8
test eax, eax
jne 0x40f0ee
mov byte [esp + 0x34], 1
jmp 0x40f278
push 0x44eedc
push ebp
call fcn.00422afe
add esp, 8
test eax, eax
jne 0x40f109
mov byte [esp + 0x34], al
jmp 0x40f278
push 0x44eee0
push ebp
call fcn.00422afe
add esp, 8
test eax, eax
jne 0x40f129
call fcn.00420bb0
mov byte [esp + 0x34], al
jmp 0x40f278
push str.IsIA64
push ebp
call fcn.00422afe
add esp, 8
test eax, eax
jne 0x40f149
call fcn.00420c00
mov byte [esp + 0x34], al
jmp 0x40f278
push str.IsCmd
push ebp
call fcn.00422afe
add esp, 8
test eax, eax
jne 0x40f182
cmp edi, 1
setne al
test al, al
mov byte [esp + 0x13], al
jne 0x40f278
mov edx, dword [esp + 0x14]
call fcn.004015c0
test eax, eax
setg byte [esp + 0x34]
jmp 0x40f278
push str.IfExists
push ebp
call fcn.00422afe
add esp, 8
test eax, eax
jne 0x40f1ac
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
setne byte [esp + 0x34]
jmp 0x40f278
push str.IsOS
push ebp
call fcn.00422afe
add esp, 8
test eax, eax
jne 0x40f238
mov edx, str.nooscheck
call fcn.004015c0
test eax, eax
je 0x40f1d6
mov byte [esp + 0x34], 1
jmp 0x40f278
cmp edi, 2
setne al
test al, al
mov byte [esp + 0x13], al
jne 0x40f278
mov eax, dword [esp + 0x14]
call fcn.00420b40
mov edi, eax
mov eax, dword [esp + 0x18]
call fcn.00420b40
test edi, edi
je 0x40f20f
test eax, eax
je 0x40f20f
call fcn.004209d0
mov byte [esp + 0x34], al
jmp 0x40f278
push str.Unrecognized_OS_name_in_condition
push 0x4575d0
mov eax, 2
call fcn.00419220
mov edx, dword [esp + 0x38]
add esp, 8
mov dword [edx + 0x38], 0xb
mov byte [esp + 0x34], 0
jmp 0x40f278
push str.IsGroupSel
push ebp
call fcn.00422afe
add esp, 8
test eax, eax
jne 0x40f273
cmp edi, 1
setne al
test al, al
mov byte [esp + 0x13], al
jne 0x40f278
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x30]
push eax
add ecx, 0x248
push ecx
call fcn.00405d00
mov byte [esp + 0x34], al
jmp 0x40f278
mov byte [esp + 0x13], 1
push ebx
call fcn.00422ece
add esp, 4
cmp byte [esp + 0x13], 0
je 0x40f2a6
cmp word [ebp], 0
je 0x40f2a6
push str.Syntax_error_found_in_condition
push 0x4575d0
mov eax, 2
call fcn.00419220
add esp, 8
mov al, byte [esp + 0x34]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 8