Function at 0x100149d0
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x628
mov eax, dword [0x100416e4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
movzx ebx, word [ebp + 0x14]
mov eax, edx
mov dword [ebp - 0x628], eax
mov edx, ecx
movzx ecx, word [ebp + 0xc]
mov dword [ebp - 0x624], edx
mov dword [ebp - 0x620], ecx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x10]
test eax, eax
je 0x10014b99
cmp word [eax], 0
je 0x10014b99
push 0x100021bc
push eax
call dword [sym.imp.msvcrt.dll_wcspbrk]
add esp, 8
test eax, eax
je 0x10014b05
mov ecx, dword [ebp - 0x628]
call fcn.10032a20
test eax, eax
je 0x10014a70
test esi, esi
je 0x10014bf1
push dword [ebp - 0x628]
mov eax, dword [ebp - 0x620]
push 0x10002194
movzx eax, ax
push eax
push esi
call dword [sym.imp.msvcrt.dll_swprintf_s]
add esp, 0x10
jmp 0x10014bf1
push 0x101
lea eax, [ebp - 0x414]
push eax
push 0x104
lea eax, [ebp - 0x61c]
push eax
push 0x101
lea eax, [ebp - 0x210]
push eax
push 4
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x628]
call dword [sym.imp.msvcrt.dll__wsplitpath_s]
add esp, 0x24
test esi, esi
je 0x10014ad1
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x620]
push 0x100021d0
movzx eax, ax
push eax
push esi
call dword [sym.imp.msvcrt.dll_swprintf_s]
add esp, 0x14
test edi, edi
je 0x10014c08
test bx, bx
je 0x10014c08
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x61c]
push eax
push 0x100021d0
push ebx
push edi
call dword [sym.imp.msvcrt.dll_swprintf_s]
add esp, 0x14
jmp 0x10014bff
mov edx, dword [ebp - 0x624]
mov edx, dword [edx + 0x2c]
test edx, edx
je 0x10014b37
cmp word [edx], 0
je 0x10014b37
test esi, esi
je 0x10014b6f
mov eax, dword [ebp - 0x620]
movzx ecx, ax
lea eax, [ecx - 1]
push eax
push edx
push ecx
push esi
call dword [sym.imp.msvcrt.dll_wcsncpy_s]
add esp, 0x10
jmp 0x10014b6f
test esi, esi
je 0x10014b6f
mov eax, dword [ebp - 0x620]
movzx eax, ax
push esi
push eax
mov dword [ebp - 0x624], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push 0x7e
push esi
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
je 0x10014b6f
push dword [ebp - 0x624]
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test edi, edi
je 0x10014c08
test bx, bx
je 0x10014c08
mov ecx, ebx
lea eax, [ecx - 1]
push eax
push dword [ebp - 0x628]
push ecx
push edi
call dword [sym.imp.msvcrt.dll_wcsncpy_s]
add esp, 0x10
jmp 0x10014bff
mov edx, dword [edx + 0x2c]
test edx, edx
je 0x10014bbf
cmp word [edx], 0
je 0x10014bbf
test esi, esi
je 0x10014bf1
movzx ecx, cx
lea eax, [ecx - 1]
push eax
push edx
push ecx
push esi
call dword [sym.imp.msvcrt.dll_wcsncpy_s]
add esp, 0x10
jmp 0x10014bf1
test esi, esi
je 0x10014bf1
movzx eax, cx
push esi
push eax
mov dword [ebp - 0x624], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push 0x7e
push esi
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
je 0x10014bf1
push dword [ebp - 0x624]
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test edi, edi
je 0x10014c08
test bx, bx
je 0x10014c08
xor eax, eax
mov word [edi], ax
mov eax, ebx
xor ecx, ecx
mov word [edi + eax*2 - 2], cx
test esi, esi
je 0x10014c1c
mov eax, dword [ebp - 0x620]
xor ecx, ecx
movzx eax, ax
mov word [esi + eax*2 - 2], cx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1003c3b0
mov esp, ebp
pop ebp
ret 0x10