Function at 0x1002ae4c
Capabilities:
Check if file exists
Check os version
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 4
push 0
push 0
dec ecx
jne 0x1002ae55
push ecx
xchg dword [ebp - 4], ecx
push ebx
push esi
mov ebx, ecx
mov dword [ebp - 4], edx
mov esi, eax
xor eax, eax
push ebp
push 0x1002b0f7
push dword fs:[eax]
mov dword fs:[eax], esp
call sub.KERNEL32.dll_GetVersion
test eax, 0x80000000
jne 0x1002afcb
mov eax, dword [ebp - 4]
push eax
call sub.KERNEL32.dll_lstrlenW
mov edx, eax
test bl, bl
je 0x1002aebc
mov eax, edx
sub eax, 2
cmp eax, 1
jl 0x1002aebc
mov ecx, dword [ebp - 4]
cmp word [ecx + eax*2], 0x5c
jne 0x1002aeb7
mov edx, dword [ebp - 4]
mov word [edx + eax*2], 0
mov edx, eax
jmp 0x1002aebc
dec eax
test eax, eax
jne 0x1002aea0
test edx, edx
jle 0x1002aede
mov eax, dword [ebp - 4]
cmp word [eax + edx*2 - 2], 0x5c
je 0x1002aede
mov eax, dword [ebp - 4]
mov word [eax + edx*2], 0x5c
mov eax, dword [ebp - 4]
mov word [eax + edx*2 + 2], 0
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
cmp dword [eax], 0
jne 0x1002af1d
lea ecx, [ebp - 8]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
mov eax, dword [eax]
mov dl, 1
call fcn.1001fd78
mov eax, dword [ebp - 8]
push eax
lea ecx, [ebp - 0xc]
xor edx, edx
mov eax, dword [ebp - 4]
call fcn.1001fd78
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
pop ecx
call fcn.100127c8
jmp 0x1002af5a
lea eax, [ebp - 0x14]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
mov edx, dword [edx]
call fcn.10012720
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x10]
mov dl, 1
call fcn.1001fdcc
mov eax, dword [ebp - 0x10]
push eax
lea ecx, [ebp - 0x18]
xor edx, edx
mov eax, dword [ebp - 4]
call fcn.1001fd78
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
pop ecx
call fcn.100127c8
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov eax, dword [eax]
call fcn.1001277c
cmp eax, 6
jle 0x1002afa8
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov eax, dword [eax]
cmp byte [eax + 2], 0x3a
je 0x1002af95
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov eax, dword [eax]
cmp byte [eax], 0x5c
jne 0x1002afa8
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov eax, dword [eax]
cmp byte [eax + 2], 0x5c
jne 0x1002afa8
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov eax, dword [eax]
push eax
call sub.KERNEL32.dll_GetFileAttributesW
cmp eax, 0xffffffff
jne 0x1002afac
xor ebx, ebx
jmp 0x1002afae
mov bl, 1
test bl, bl
je 0x1002b0dc
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov eax, dword [eax]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 8]
mov dword [edx], eax
jmp 0x1002b0dc
push esi
call sub.KERNEL32.dll_lstrlenA
mov edx, eax
test bl, bl
je 0x1002aff4
mov eax, edx
sub eax, 2
cmp eax, 1
jl 0x1002aff4
cmp byte [esi + eax], 0x5c
jne 0x1002afef
mov byte [esi + eax], 0
mov edx, eax
jmp 0x1002aff4
dec eax
test eax, eax
jne 0x1002afe1
test edx, edx
jle 0x1002b008
cmp byte [esi + edx - 1], 0x5c
je 0x1002b008
mov byte [esi + edx], 0x5c
mov byte [esi + edx + 1], 0
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
cmp dword [eax], 0
jne 0x1002b042
lea edx, [ebp - 0x1c]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
mov eax, dword [eax]
call fcn.1001fef0
mov eax, dword [ebp - 0x1c]
push eax
lea eax, [ebp - 0x20]
mov edx, esi
call fcn.10012720
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
pop ecx
call fcn.100127c8
jmp 0x1002b06f
lea eax, [ebp - 0x24]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
mov edx, dword [edx]
call fcn.10012720
mov eax, dword [ebp - 0x24]
push eax
lea eax, [ebp - 0x28]
mov edx, esi
call fcn.10012720
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
pop ecx
call fcn.100127c8
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov eax, dword [eax]
call fcn.1001277c
cmp eax, 3
jle 0x1002b0c2
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov eax, dword [eax]
cmp byte [eax + 1], 0x3a
je 0x1002b0aa
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov eax, dword [eax]
cmp byte [eax], 0x5c
jne 0x1002b0c2
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov eax, dword [eax]
cmp byte [eax + 1], 0x5c
jne 0x1002b0c2
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov eax, dword [eax]
call fcn.1001297c
push eax
call sub.KERNEL32.dll_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x1002b0c6
xor ebx, ebx
jmp 0x1002b0c8
mov bl, 1
test bl, bl
je 0x1002b0dc
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov eax, dword [eax]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
mov dword [edx], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x1002b0fe
lea eax, [ebp - 0x28]
mov edx, 9
call fcn.1001254c
ret