Function at 0x477f60
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 0x477f69
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 0x47820b
push dword fs:[eax]
mov dword fs:[eax], esp
call sub.kernel32.dll_GetVersion_1
test eax, 0x80000000
jne 0x4780df
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_lstrlenW
mov edx, eax
test bl, bl
je 0x477fd0
mov eax, edx
sub eax, 2
cmp eax, 1
jl 0x477fd0
mov ecx, dword [ebp - 4]
cmp word [ecx + eax*2], 0x5c
jne 0x477fcb
mov edx, dword [ebp - 4]
mov word [edx + eax*2], 0
mov edx, eax
jmp 0x477fd0
dec eax
test eax, eax
jne 0x477fb4
test edx, edx
jle 0x477ff2
mov eax, dword [ebp - 4]
cmp word [eax + edx*2 - 2], 0x5c
je 0x477ff2
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 0x478031
lea ecx, [ebp - 8]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
mov eax, dword [eax]
mov dl, 1
call fcn.0047016c
mov eax, dword [ebp - 8]
push eax
lea ecx, [ebp - 0xc]
xor edx, edx
mov eax, dword [ebp - 4]
call fcn.0047016c
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
pop ecx
call fcn.0040438c
jmp 0x47806e
lea eax, [ebp - 0x14]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
mov edx, dword [edx]
call fcn.00404278
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x10]
mov dl, 1
call fcn.0046ab48
mov eax, dword [ebp - 0x10]
push eax
lea ecx, [ebp - 0x18]
xor edx, edx
mov eax, dword [ebp - 4]
call fcn.0047016c
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
pop ecx
call fcn.0040438c
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov eax, dword [eax]
call fcn.00404340
cmp eax, 6
jle 0x4780bc
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov eax, dword [eax]
cmp byte [eax + 2], 0x3a
je 0x4780a9
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov eax, dword [eax]
cmp byte [eax], 0x5c
jne 0x4780bc
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov eax, dword [eax]
cmp byte [eax + 2], 0x5c
jne 0x4780bc
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 0x4780c0
xor ebx, ebx
jmp 0x4780c2
mov bl, 1
test bl, bl
je 0x4781f0
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 0x4781f0
push esi
call sub.kernel32.dll_lstrlenA_1
mov edx, eax
test bl, bl
je 0x478108
mov eax, edx
sub eax, 2
cmp eax, 1
jl 0x478108
cmp byte [esi + eax], 0x5c
jne 0x478103
mov byte [esi + eax], 0
mov edx, eax
jmp 0x478108
dec eax
test eax, eax
jne 0x4780f5
test edx, edx
jle 0x47811c
cmp byte [esi + edx - 1], 0x5c
je 0x47811c
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 0x478156
lea edx, [ebp - 0x1c]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
mov eax, dword [eax]
call fcn.0046abe8
mov eax, dword [ebp - 0x1c]
push eax
lea eax, [ebp - 0x20]
mov edx, esi
call fcn.00404278
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
pop ecx
call fcn.0040438c
jmp 0x478183
lea eax, [ebp - 0x24]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
mov edx, dword [edx]
call fcn.00404278
mov eax, dword [ebp - 0x24]
push eax
lea eax, [ebp - 0x28]
mov edx, esi
call fcn.00404278
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
pop ecx
call fcn.0040438c
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov eax, dword [eax]
call fcn.00404340
cmp eax, 3
jle 0x4781d6
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov eax, dword [eax]
cmp byte [eax + 1], 0x3a
je 0x4781be
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov eax, dword [eax]
cmp byte [eax], 0x5c
jne 0x4781d6
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov eax, dword [eax]
cmp byte [eax + 1], 0x5c
jne 0x4781d6
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov eax, dword [eax]
call fcn.00404540
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x4781da
xor ebx, ebx
jmp 0x4781dc
mov bl, 1
test bl, bl
je 0x4781f0
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 0x478212
lea eax, [ebp - 0x28]
mov edx, 9
call fcn.004040a4
ret