Function at 0x7cf65038
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
push ebx
push esi
push edi
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpynW]
mov edi, 0x104
lea eax, [ebp - 0x20c]
push edi
push dword [ebp + 8]
push eax
call ebx
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_Ordinal_448]
lea eax, [ebp - 0x20c]
lea esi, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsUNCW]
test eax, eax
lea eax, [ebp - 0x20c]
push eax
je 0x7cf65105
call sym.SHELL32.dll_IsLFNDriveW
test eax, eax
mov dword [ebp + 0xc], eax
je 0x7cf650ad
mov eax, dword [ebp + 8]
and word [eax + 4], 0
add edi, 0xfffffffd
jmp 0x7cf650fa
mov ebx, dword [ebp + 8]
mov esi, dword [sym.imp.SHLWAPI.dll_StrChrW]
push 0x5c
lea edi, [ebx + 4]
push edi
call esi
test eax, eax
je 0x7cf650ea
add eax, 2
push 0x5c
push eax
call esi
test eax, eax
je 0x7cf650ea
and word [eax + 2], 0
sub eax, ebx
sar eax, 1
mov edi, 0x103
sub edi, eax
lea esi, [ebp + eax*2 - 0x20c]
jmp 0x7cf651e9
and word [edi], 0
mov dword [ebp + 0xc], 1
mov edi, 0x102
lea esi, [ebp - 0x208]
jmp 0x7cf651e9
call dword [sym.imp.SHLWAPI.dll_PathGetDriveNumberW]
cmp eax, 0xffffffff
je 0x7cf65136
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.SHLWAPI.dll_PathBuildRootW]
cmp word [ebp - 0x208], 0x5c
lea esi, [ebp - 0x208]
jne 0x7cf6518f
lea esi, [ebp - 0x206]
jmp 0x7cf6518f
cmp dword [ebp + 0xc], 0
push edi
je 0x7cf6514b
push dword [ebp + 0xc]
lea eax, [ebp - 0x414]
push eax
call ebx
jmp 0x7cf65178
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.SHLWAPI.dll_PathGetDriveNumberW]
cmp eax, 0xffffffff
je 0x7cf65178
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.SHLWAPI.dll_PathBuildRootW]
cmp word [ebp - 0x20c], 0x5c
jne 0x7cf6518f
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.SHLWAPI.dll_PathStripToRootW]
lea eax, [ebp - 0x414]
push eax
call sym.SHELL32.dll_IsLFNDriveW
test eax, eax
mov dword [ebp + 0xc], eax
jne 0x7cf651c9
cmp word [esi], ax
mov edi, esi
je 0x7cf651c9
mov ax, word [edi]
push 0x11c
push eax
call dword [sym.imp.SHLWAPI.dll_Ordinal_456]
test eax, eax
jne 0x7cf651c1
mov word [edi], 0x5f
inc edi
inc edi
cmp word [edi], 0
jne 0x7cf651a9
lea eax, [ebp - 0x414]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, 0x103
sub edi, eax
mov ax, word [esi]
test ax, ax
je 0x7cf65323
test edi, edi
jle 0x7cf65323
push 0x2e
pop ebx
cmp ax, bx
jne 0x7cf6524f
mov cx, word [esi + 2]
cmp cx, bx
jne 0x7cf65228
mov ax, word [esi + 4]
test ax, ax
je 0x7cf6521d
cmp ax, 0x5c
jne 0x7cf65228
push dword [ebp + 8]
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
jmp 0x7cf65233
test cx, cx
je 0x7cf65233
cmp cx, 0x5c
jne 0x7cf6524f
mov ax, word [esi]
test ax, ax
je 0x7cf65245
cmp ax, 0x5c
je 0x7cf65245
inc esi
inc esi
jmp 0x7cf65233
cmp word [esi], 0
je 0x7cf651e9
inc esi
inc esi
jmp 0x7cf651e9
push dword [ebp + 8]
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
push dword [ebp + 8]
dec edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp + 8]
cmp dword [ebp + 0xc], 0
lea eax, [ecx + eax*2]
je 0x7cf65296
mov cx, word [esi]
test cx, cx
je 0x7cf65312
cmp cx, 0x5c
je 0x7cf65312
test edi, edi
jle 0x7cf65312
dec edi
mov word [eax], cx
inc eax
inc eax
inc esi
inc esi
jmp 0x7cf6526e
push 8
pop edx
mov cx, word [esi]
test cx, cx
je 0x7cf652c5
cmp cx, 0x5c
je 0x7cf652c5
cmp cx, 0x2f
je 0x7cf652c5
cmp cx, bx
je 0x7cf652c5
test edi, edi
jle 0x7cf652c5
test edx, edx
jle 0x7cf652c1
dec edx
dec edi
mov word [eax], cx
inc eax
inc eax
inc esi
inc esi
jmp 0x7cf65299
cmp word [esi], bx
jne 0x7cf65312
test edi, edi
jle 0x7cf65312
mov word [eax], bx
inc eax
inc eax
dec edi
inc esi
push 3
inc esi
mov ebx, eax
mov dword [ebp - 4], edi
pop edx
mov cx, word [esi]
test cx, cx
je 0x7cf65312
cmp cx, 0x5c
je 0x7cf65312
test edi, edi
jle 0x7cf65312
cmp cx, 0x2e
jne 0x7cf65300
mov edi, dword [ebp - 4]
push 3
inc esi
pop edx
mov eax, ebx
inc esi
test edx, edx
jle 0x7cf6530e
mov cx, word [esi]
dec edx
dec edi
mov word [eax], cx
inc eax
inc eax
inc esi
inc esi
jmp 0x7cf652de
cmp word [esi], 0
je 0x7cf6531a
inc esi
inc esi
and word [eax], 0
jmp 0x7cf651e9
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
test byte [ebp + 0x10], 1
jne 0x7cf6534a
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp word [esi + eax*2 - 2], 0x2e
lea eax, [esi + eax*2 - 2]
jne 0x7cf6534a
and word [eax], 0
pop edi
pop esi
pop ebx
leave
ret 0xc