Function at 0x1001edc
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
jne 0x1001f07
mov eax, dword [ebp + 0xc]
mov dword [eax], 2
jmp 0x1002121
push esi
push edi
push 3
push dword [ebp + 8]
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy]
add esp, 0xc
lea eax, [ebp - 0x1c]
push eax
mov word [ebp - 0x16], bx
call dword [sym.imp.SHLWAPI.dll_PathIsRootW]
mov edi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
neg esi
sbb esi, esi
inc esi
je 0x1001f79
push ebx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
call ebx
mov dword [ebp - 0x10], eax
lea eax, [eax + eax + 2]
push eax
push 0x40
call edi
test eax, eax
mov dword [ebp - 4], eax
je 0x1001fc6
push eax
push dword [ebp - 0x10]
call ebx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x10]
cmp word [eax + ecx*2 - 4], 0x5c
je 0x1001f77
push 0x100139c
push eax
call dword [sym.imp.msvcrt.dll_wcscat]
pop ecx
pop ecx
xor ebx, ebx
push dword [ebp + 8]
call dword [sym.imp.msvcrt.dll_wcslen]
cmp esi, ebx
pop ecx
je 0x1001f8a
add eax, dword [ebp - 0x10]
lea ebx, [eax + eax + 2]
push ebx
push 0x40
call edi
test eax, eax
mov dword [ebp - 8], eax
je 0x1001fc6
test esi, esi
je 0x1001faa
push dword [ebp - 4]
push eax
call dword [sym.imp.msvcrt.dll_wcscat]
pop ecx
pop ecx
push dword [ebp + 8]
push dword [ebp - 8]
call dword [sym.imp.msvcrt.dll_wcscat]
pop ecx
pop ecx
push ebx
push 0x40
call edi
mov esi, eax
test esi, esi
mov dword [ebp - 0x14], esi
jne 0x1001ffd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x100
mov esi, eax
lea eax, [ebp - 0x21c]
push eax
push 0x1c12
push dword [0x1004008]
call dword [sym.imp.USER32.dll_LoadStringW]
lea eax, [ebp - 0x21c]
push eax
push esi
call fcn.01001b59
jmp 0x10020ea
push dword [ebp - 8]
push esi
call dword [sym.imp.SHLWAPI.dll_PathCanonicalizeW]
test eax, eax
jne 0x1002037
push 0x100
lea eax, [ebp - 0x21c]
push eax
push 0x1c11
push dword [0x1004008]
call dword [sym.imp.USER32.dll_LoadStringW]
lea eax, [ebp - 0x21c]
push eax
call fcn.01001b28
pop ecx
jmp 0x1002083
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
lea eax, [eax + eax + 2]
push eax
push 0x40
call edi
mov edi, eax
test edi, edi
mov dword [ebp - 0xc], edi
jne 0x1002086
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x100
mov edi, eax
lea eax, [ebp - 0x21c]
push eax
push 0x1c12
push dword [0x1004008]
call dword [sym.imp.USER32.dll_LoadStringW]
lea eax, [ebp - 0x21c]
push eax
push edi
call fcn.01001b59
push esi
jmp 0x10020e4
push esi
push edi
call dword [sym.imp.msvcrt.dll_wcscpy]
push 0x5c
push edi
call dword [sym.imp.msvcrt.dll_wcsrchr]
add esp, 0x10
test eax, eax
je 0x10020a2
and word [eax], 0
push edi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x10020f3
push 0x100
lea eax, [ebp - 0x21c]
push eax
push 0x1c14
push dword [0x1004008]
call dword [sym.imp.USER32.dll_LoadStringW]
push dword [ebp - 0xc]
lea eax, [ebp - 0x21c]
push eax
push 0x1001428
call fcn.01001b28
add esp, 0xc
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp + 0xc]
mov dword [eax], 2
xor esi, esi
cmp dword [ebp - 4], esi
je 0x1002103
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 8], esi
je 0x1002111
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0xc], esi
pop edi
pop esi
je 0x1002121
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x14]
pop ebx
leave
ret 8