Function at 0x7d705310
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 0x10], 0
mov dword [ebp - 8], 1
mov eax, dword [ebp + 0xc]
and eax, 0x1000
je 0x7d70533c
mov ecx, dword [ebp + 0xc]
or ecx, 0xe00
mov dword [ebp + 0xc], ecx
mov edx, dword [ebp + 0xc]
and edx, 0x100
je 0x7d705391
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ntext.dll_RtlDetermineDosPathNameType_U]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 2
je 0x7d70536e
cmp dword [ebp - 0x18], 4
je 0x7d70536e
push 0x57
call sub.kernel32.dll_SetLastError
xor eax, eax
jmp 0x7d70556e
mov ecx, dword [ebp + 8]
push ecx
call fcn.7d705810
add esp, 4
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x1c]
sub edx, dword [ebp + 8]
sar edx, 1
mov eax, dword [ebp - 8]
lea ecx, [eax + edx + 1]
mov dword [ebp - 8], ecx
jmp 0x7d705398
mov dword [ebp + 8], 0
push 0x7d73f818
call dword [sym.imp.ntext.dll_RtlEnterCriticalSection]
mov edx, dword [ebp + 0xc]
and edx, 0x200
je 0x7d7053e0
call fcn.7d701060
mov eax, dword [eax + 0x30]
mov ecx, dword [eax + 0x10]
mov edx, dword [ecx + 0x3c]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
push eax
call fcn.7d705810
add esp, 4
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
sub ecx, dword [ebp - 0x10]
sar ecx, 1
mov edx, dword [ebp - 8]
lea eax, [edx + ecx + 1]
mov dword [ebp - 8], eax
mov ecx, dword [ebp + 0xc]
and ecx, 0x400
je 0x7d705443
mov edx, dword [0x7d73da10]
mov dword [ebp - 0xc], edx
jmp 0x7d7053fe
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
mov dword [ebp - 0xc], ecx
cmp dword [ebp - 0xc], 0x7d73da10
je 0x7d705422
mov edx, dword [ebp - 0xc]
add edx, 8
push edx
call sub.ntext.dll_wcslen
add esp, 4
mov ecx, dword [ebp - 8]
lea edx, [ecx + eax + 1]
mov dword [ebp - 8], edx
jmp 0x7d7053f6
cmp dword [0x7d73f830], 0
je 0x7d705443
mov eax, dword [0x7d73f830]
push eax
call sub.ntext.dll_wcslen
add esp, 4
mov ecx, dword [ebp - 8]
lea edx, [ecx + eax + 1]
mov dword [ebp - 8], edx
mov eax, dword [ebp + 0xc]
and eax, 0x800
je 0x7d70545c
push 0
push 0
call sym.kernel32_wrapper.dll_GetSystemDirectoryW
add eax, dword [ebp - 8]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
shl ecx, 1
push ecx
push 0
call sym.kernel32_wrapper.dll_GetProcessHeap
push eax
call sub.kernel32.dll_HeapAlloc
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
mov dword [ebp - 4], edx
cmp dword [ebp - 4], 0
je 0x7d705560
cmp dword [ebp + 8], 0
je 0x7d7054a4
mov eax, dword [ebp - 0x1c]
sub eax, dword [ebp + 8]
sar eax, 1
push eax
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 4]
push edx
call fcn.7d7052a0
add esp, 0xc
mov dword [ebp - 4], eax
cmp dword [ebp - 0x10], 0
je 0x7d7054c6
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x10]
sar eax, 1
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 4]
push edx
call fcn.7d7052a0
add esp, 0xc
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
and eax, 0x400
je 0x7d705522
mov ecx, dword [0x7d73da10]
mov dword [ebp - 0xc], ecx
jmp 0x7d7054e3
mov edx, dword [ebp - 0xc]
mov eax, dword [edx]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0x7d73da10
je 0x7d705504
mov ecx, dword [ebp - 0xc]
add ecx, 8
push ecx
mov edx, dword [ebp - 4]
push edx
call fcn.7d705270
add esp, 8
mov dword [ebp - 4], eax
jmp 0x7d7054db
cmp dword [0x7d73f830], 0
je 0x7d705522
mov eax, dword [0x7d73f830]
push eax
mov ecx, dword [ebp - 4]
push ecx
call fcn.7d705270
add esp, 8
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
and edx, 0x800
je 0x7d705547
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x14]
lea edx, [ecx + eax*2]
sub edx, dword [ebp - 4]
sar edx, 1
push edx
mov eax, dword [ebp - 4]
push eax
call sym.kernel32_wrapper.dll_GetSystemDirectoryW
jmp 0x7d705560
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0x14]
jbe 0x7d705558
mov edx, dword [ebp - 4]
sub edx, 2
mov dword [ebp - 4], edx
xor eax, eax
mov ecx, dword [ebp - 4]
mov word [ecx], ax
push 0x7d73f818
call dword [sym.imp.ntext.dll_RtlLeaveCriticalSection]
mov eax, dword [ebp - 0x14]
mov esp, ebp
pop ebp
ret