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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x434
or dword [ebp - 0x1c], 0xffffffff
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
cmp esi, edi
mov dword [ebp - 4], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x24], edi
je 0x7cf6795f
cmp word [esi], 0x22
jne 0x7cf67830
inc esi
lea eax, [ebp - 0x22c]
inc esi
xor edx, edx
mov cx, word [esi]
cmp cx, di
je 0x7cf677dd
cmp cx, 0x22
je 0x7cf677dd
mov word [eax], cx
inc edx
inc eax
inc eax
inc esi
inc esi
cmp edx, 0x104
jl 0x7cf677bf
cmp word [esi], di
mov word [ebp + edx*2 - 0x22c], di
je 0x7cf677f0
lea eax, [esi + 2]
mov dword [ebp - 4], eax
test byte [ebp + 0x14], 0x40
jne 0x7cf67807
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
je 0x7cf67824
test byte [ebp + 0x14], 0x20
jne 0x7cf67824
push 3
lea eax, [ebp - 0x22c]
push edi
push eax
call sym.SHELL32.dll_PathResolve
test eax, eax
je 0x7cf6795f
mov dword [ebp - 0x10], 1
jmp 0x7cf6795f
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
cmp eax, edi
je 0x7cf67843
and byte [ebp + 0x14], 0x7f
cmp eax, edi
jne 0x7cf6784c
test byte [ebp + 0x14], 0x40
mov dword [ebp - 8], edi
je 0x7cf67853
mov dword [ebp - 8], 1
mov dword [ebp - 0x18], 2
mov dword [ebp - 0x14], esi
sub dword [ebp - 0x18], esi
lea eax, [ebp - 0x22c]
sub dword [ebp - 0x14], eax
mov dword [ebp - 0x20], edi
lea ebx, [ebp - 0x22c]
mov eax, dword [ebp - 0x14]
xor ecx, ecx
lea esi, [eax + ebx]
mov ax, word [eax + ebx]
cmp ax, cx
mov word [ebx], ax
je 0x7cf67890
cmp ax, 0x20
jne 0x7cf67942
cmp dword [ebp - 8], ecx
mov word [ebx], cx
je 0x7cf678ab
push 3
lea eax, [ebp - 0x22c]
push ecx
push eax
call sym.SHELL32.dll_PathResolve
test eax, eax
je 0x7cf67914
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x7cf67914
test al, 0x10
je 0x7cf678c7
test byte [ebp + 0x14], 0x10
jne 0x7cf67914
cmp dword [ebp - 8], 0
je 0x7cf678e9
test byte [ebp + 0x14], 0x20
je 0x7cf678e9
push edi
lea eax, [ebp - 0x22c]
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
mov word [eax], 0x20
test byte [ebp + 0x14], 0x80
mov dword [ebp - 0x10], 1
mov dword [ebp - 4], esi
je 0x7cf6795a
lea eax, [edi + 1]
push eax
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x434]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
mov dword [ebp - 0x24], edi
cmp dword [ebp - 8], 0
je 0x7cf6793c
mov eax, dword [ebp - 0x18]
lea edi, [ebp - 0x22c]
lea ecx, [esi + eax]
mov esi, dword [ebp + 8]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x20]
jmp 0x7cf67942
mov ax, word [esi]
mov word [ebx], ax
cmp word [ebx], 0
je 0x7cf6795a
inc edi
inc ebx
inc ebx
cmp edi, 0x104
mov dword [ebp - 0x20], edi
jl 0x7cf67872
mov esi, dword [ebp + 8]
xor edi, edi
cmp dword [ebp - 0x10], edi
je 0x7cf67a5f
test byte [ebp + 0x14], 0x80
je 0x7cf67993
mov ebx, dword [ebp - 0x24]
cmp ebx, edi
je 0x7cf67993
lea eax, [ebx + 1]
push eax
lea eax, [ebp - 0x434]
push eax
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
lea eax, [esi + ebx*2]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x22c]
push 0x20
push eax
call dword [sym.imp.SHLWAPI.dll_StrChrW]
test eax, eax
je 0x7cf679af
mov eax, dword [ebp + 0x14]
and eax, 1
mov dword [ebp - 0xc], eax
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [ebp - 0x22c]
push eax
call ebx
mov esi, eax
mov eax, dword [ebp - 0xc]
inc esi
neg eax
sbb eax, eax
and eax, 2
add esi, eax
mov eax, dword [ebp + 0x14]
and eax, 3
mov dword [ebp + 8], eax
je 0x7cf679e4
cmp dword [ebp - 4], edi
je 0x7cf679e4
push dword [ebp - 4]
call ebx
jmp 0x7cf679e6
xor eax, eax
add esi, eax
cmp dword [ebp + 0xc], edi
je 0x7cf67a5c
cmp esi, dword [ebp + 0x10]
jg 0x7cf67a5f
lea eax, [esi + esi]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
mov dword [ebp + 0x14], edi
je 0x7cf67a5f
cmp dword [ebp - 0xc], 0
je 0x7cf67a13
mov word [edi], 0x22
inc edi
inc edi
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x22c]
push eax
push edi
call ebx
cmp dword [ebp - 0xc], 0
je 0x7cf67a35
push 0x7cf36ea4
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
cmp dword [ebp + 8], 0
je 0x7cf67a4b
cmp dword [ebp - 4], 0
je 0x7cf67a4b
push dword [ebp - 4]
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push dword [ebp + 0x14]
push dword [ebp + 0xc]
call ebx
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x1c], esi
mov eax, dword [ebp - 0x1c]
pop edi
pop esi
pop ebx
leave
ret 0x10