Function at 0x100203d
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x100401c]
push ebx
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
xor esi, esi
cmp eax, esi
mov dword [ebp - 0x228], eax
mov dword [ebp - 0x224], ebx
mov dword [ebp - 0x210], esi
mov dword [ebp - 0x220], esi
mov dword [ebp - 0x21c], esi
mov dword [ebp - 0x218], esi
jne 0x100208d
mov dword [ebx], 2
jmp 0x100233a
push edi
push 3
push eax
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy]
add esp, 0xc
lea eax, [ebp - 0xc]
push eax
mov word [ebp - 6], si
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 0x1002158
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push 0
push 0
call ebx
mov dword [ebp - 0x214], eax
lea eax, [eax + eax + 2]
push eax
push 0x40
call edi
test eax, eax
mov dword [ebp - 0x210], eax
jne 0x1002127
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x100
mov esi, eax
lea eax, [ebp - 0x20c]
push eax
push 0x1c12
push dword [0x1004024]
call dword [sym.imp.USER32.dll_LoadStringW]
lea eax, [ebp - 0x20c]
push eax
push esi
call fcn.01001c60
mov eax, dword [ebp - 0x224]
mov dword [eax], 2
jmp 0x10022fb
push eax
push dword [ebp - 0x214]
call ebx
mov eax, dword [ebp - 0x210]
mov ecx, dword [ebp - 0x214]
cmp word [eax + ecx*2 - 4], 0x5c
je 0x1002152
push 0x10013bc
push eax
call dword [sym.imp.msvcrt.dll_wcscat]
pop ecx
pop ecx
mov ebx, dword [ebp - 0x224]
push dword [ebp - 0x228]
call dword [sym.imp.msvcrt.dll_wcslen]
test esi, esi
pop ecx
je 0x100216f
add eax, dword [ebp - 0x214]
lea eax, [eax + eax + 2]
push eax
push 0x40
mov dword [ebp - 0x214], eax
call edi
test eax, eax
mov dword [ebp - 0x218], eax
je 0x10021c5
test esi, esi
je 0x100219b
push dword [ebp - 0x210]
push eax
call dword [sym.imp.msvcrt.dll_wcscat]
pop ecx
pop ecx
push dword [ebp - 0x228]
push dword [ebp - 0x218]
call dword [sym.imp.msvcrt.dll_wcscat]
pop ecx
pop ecx
push dword [ebp - 0x214]
push 0x40
call edi
mov esi, eax
test esi, esi
mov dword [ebp - 0x220], esi
jne 0x10021fc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x100
mov esi, eax
lea eax, [ebp - 0x20c]
push eax
push 0x1c12
push dword [0x1004024]
call dword [sym.imp.USER32.dll_LoadStringW]
lea eax, [ebp - 0x20c]
push eax
push esi
call fcn.01001c60
jmp 0x10022f5
push dword [ebp - 0x218]
push esi
call dword [sym.imp.SHLWAPI.dll_PathCanonicalizeW]
test eax, eax
jne 0x1002239
push 0x100
lea eax, [ebp - 0x20c]
push eax
push 0x1c11
push dword [0x1004024]
call dword [sym.imp.USER32.dll_LoadStringW]
lea eax, [ebp - 0x20c]
push eax
call fcn.01001c1e
pop ecx
jmp 0x1002288
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 - 0x21c], edi
jne 0x100228b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x100
mov edi, eax
lea eax, [ebp - 0x20c]
push eax
push 0x1c12
push dword [0x1004024]
call dword [sym.imp.USER32.dll_LoadStringW]
lea eax, [ebp - 0x20c]
push eax
push edi
call fcn.01001c60
push esi
jmp 0x10022ef
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 0x10022a7
and word [eax], 0
push edi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x10022fb
push 0x100
lea eax, [ebp - 0x20c]
push eax
push 0x1c14
push dword [0x1004024]
call dword [sym.imp.USER32.dll_LoadStringW]
push dword [ebp - 0x21c]
lea eax, [ebp - 0x20c]
push eax
push 0x1001448
call fcn.01001c1e
add esp, 0xc
push dword [ebp - 0x220]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebx], 2
xor esi, esi
cmp dword [ebp - 0x210], esi
pop edi
je 0x1002312
push dword [ebp - 0x210]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x218], esi
je 0x1002326
push dword [ebp - 0x218]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x21c], esi
je 0x100233a
push dword [ebp - 0x21c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x220]
pop esi
pop ebx
call fcn.01003260
leave
ret 8