Function at 0x7cf7525a
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
push esi
mov dword [ebp - 0xc], edi
call dword [sym.imp.SHLWAPI.dll_PathGetDriveNumberW]
push eax
call sym.SHELL32.dll_IsNetDrive
test eax, eax
jne 0x7cf755b1
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsUNCW]
test eax, eax
je 0x7cf7529a
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryEmptyW]
test eax, eax
jne 0x7cf75587
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
je 0x7cf752c8
test al, 1
je 0x7cf752c8
and al, 0xfe
mov dword [ebp - 0xc], 1
push eax
push esi
call ebx
test eax, eax
je 0x7cf755b1
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x28]
push edi
push eax
push esi
call dword [sym.imp.ntdll.dll_RtlDosPathNameToNtPathName_U]
test al, al
jne 0x7cf752ee
cmp dword [ebp - 0xc], edi
je 0x7cf752e7
push dword [ebp - 0x10]
push esi
call ebx
push 3
jmp 0x7cf755ab
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x3c]
cmp ax, di
je 0x7cf75307
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x24], eax
jmp 0x7cf7530a
mov dword [ebp - 0x34], edi
mov eax, dword [ebp - 0x34]
push 4
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x28]
mov dword [ebp - 0x54], 0x18
mov dword [ebp - 0x48], 0x40
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x40], edi
call dword [sym.imp.SHLWAPI.dll_IsOS]
test eax, eax
je 0x7cf75502
push 0x204021
lea eax, [ebp - 0x20]
mov esi, dword [sym.imp.ntdll.dll_NtOpenFile]
push 7
push eax
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 8]
push 0x130080
push eax
call esi
cmp eax, edi
mov dword [ebp - 0x14], eax
jge 0x7cf753cd
cmp eax, 0xc000000d
jne 0x7cf753b5
push 0x4021
lea eax, [ebp - 0x20]
push 7
push eax
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 8]
push 0x130000
push eax
call esi
mov esi, eax
cmp esi, edi
jge 0x7cf75524
mov eax, dword fs:[0x18]
push dword [ebp - 0x18]
mov eax, dword [eax + 0x30]
push edi
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
cmp dword [ebp - 0xc], edi
je 0x7cf753af
push dword [ebp - 0x10]
push dword [ebp + 8]
call ebx
push esi
jmp 0x7cf755a4
mov eax, dword fs:[0x18]
push dword [ebp - 0x18]
mov eax, dword [eax + 0x30]
push edi
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
jmp 0x7cf7541a
push 0x23
lea eax, [ebp - 0x30]
push 8
push eax
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_NtQueryInformationFile]
mov ecx, eax
cmp ecx, edi
mov dword [ebp - 0x14], ecx
jge 0x7cf75422
cmp ecx, 0xc0000002
je 0x7cf75422
cmp ecx, 0xc000000d
je 0x7cf75422
mov eax, dword fs:[0x18]
push dword [ebp - 0x18]
mov eax, dword [eax + 0x30]
push edi
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_NtClose]
cmp dword [ebp - 0xc], edi
jmp 0x7cf754f0
cmp ecx, edi
mov eax, 0x400
jl 0x7cf75524
test dword [ebp - 0x30], eax
je 0x7cf75473
cmp dword [ebp - 0x2c], 0xa0000003
jne 0x7cf75473
mov eax, dword fs:[0x18]
push dword [ebp - 0x18]
mov eax, dword [eax + 0x30]
push edi
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_NtClose]
cmp dword [ebp - 0xc], edi
je 0x7cf75469
push dword [ebp - 0x10]
push dword [ebp + 8]
call ebx
push 0x1126
jmp 0x7cf755ab
cmp ecx, edi
jl 0x7cf75524
test dword [ebp - 0x30], eax
je 0x7cf75524
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_NtClose]
push 0x4021
lea eax, [ebp - 0x20]
push 7
push eax
lea eax, [ebp - 0x54]
mov edi, 0x130000
push eax
lea eax, [ebp - 8]
push edi
push eax
call esi
test eax, eax
mov dword [ebp - 0x14], eax
jge 0x7cf75522
cmp eax, 0xc0000279
jne 0x7cf754cf
push 0x204021
lea eax, [ebp - 0x20]
push 7
push eax
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 8]
push edi
push eax
call esi
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jge 0x7cf75522
mov eax, dword fs:[0x18]
push dword [ebp - 0x18]
mov eax, dword [eax + 0x30]
push 0
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
cmp dword [ebp - 0xc], 0
je 0x7cf754fa
push dword [ebp - 0x10]
push dword [ebp + 8]
call ebx
push dword [ebp - 0x14]
jmp 0x7cf755a4
push 0x4021
lea eax, [ebp - 0x20]
push 7
push eax
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 8]
push 0x130000
push eax
call dword [sym.imp.ntdll.dll_NtOpenFile]
jmp 0x7cf75524
xor edi, edi
mov eax, dword fs:[0x18]
push dword [ebp - 0x18]
mov eax, dword [eax + 0x30]
push edi
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push 0xd
lea eax, [ebp - 1]
mov esi, dword [sym.imp.ntdll.dll_NtSetInformationFile]
push 1
push eax
lea eax, [ebp - 0x20]
push eax
mov byte [ebp - 1], 1
push dword [ebp - 8]
call esi
mov edi, eax
test edi, edi
jl 0x7cf7558c
push 0xd
lea eax, [ebp - 1]
and byte [ebp - 1], 0
push 1
push eax
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 8]
call esi
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_NtClose]
cmp dword [ebp - 0xc], 0
je 0x7cf75587
push dword [ebp - 0x10]
push dword [ebp + 8]
call ebx
push 1
pop eax
jmp 0x7cf755b3
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_NtClose]
cmp dword [ebp - 0xc], 0
je 0x7cf755a3
push dword [ebp - 0x10]
push dword [ebp + 8]
call ebx
push edi
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4