Function at 0x100017a2
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x274
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x268], eax
mov eax, dword [ebp + 0xc]
push ebx
mov dword [ebp - 0x274], eax
mov eax, dword [ebp + 0x10]
push esi
xor ebx, ebx
push edi
mov dword [ebp - 0x270], eax
mov eax, dword [ebp + 0x14]
push ebx
mov dword [ebp - 0x26c], eax
mov dword [ebp - 0x258], ebx
mov dword [ebp - 0x264], ebx
mov dword [ebp - 0x25c], ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov esi, eax
cmp esi, ebx
je 0x10001841
dec esi
lea eax, [esi + 0x14]
mov dword [ebp - 0x260], eax
lea eax, [esi + esi + 2]
push eax
lea edi, [esi + 0xe]
call dword [sym.imp.msvcrt.dll_malloc]
pop ecx
mov dword [ebp - 0x258], eax
test eax, eax
je 0x10001841
push eax
lea eax, [esi + 1]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
cmp eax, esi
je 0x1000187b
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x258]
mov esi, dword [sym.imp.msvcrt.dll_free]
mov edi, eax
call esi
push dword [ebp - 0x264]
call esi
push dword [ebp - 0x25c]
call esi
push ebx
call esi
add esp, 0x10
test edi, edi
je 0x10001aa9
push edi
jmp 0x10001aab
lea eax, [edi + edi + 2]
push eax
call dword [sym.imp.msvcrt.dll_malloc]
pop ecx
mov dword [ebp - 0x264], eax
test eax, eax
je 0x10001841
lea eax, [edi + edi + 2]
push eax
call dword [sym.imp.msvcrt.dll_malloc]
pop ecx
mov dword [ebp - 0x25c], eax
test eax, eax
je 0x10001841
mov eax, dword [ebp - 0x260]
lea eax, [eax + eax + 2]
push eax
call dword [sym.imp.msvcrt.dll_malloc]
mov ebx, eax
pop ecx
test ebx, ebx
je 0x10001841
push dword [ebp - 0x258]
lea eax, [edi + 1]
push eax
push dword [ebp - 0x264]
call sub.msvcrt.dll_wcscpy_s
add esp, 0xc
test eax, eax
jne 0x10001841
push dword [ebp - 0x258]
lea eax, [edi + 1]
push eax
push dword [ebp - 0x25c]
call sub.msvcrt.dll_wcscpy_s
add esp, 0xc
test eax, eax
jne 0x10001841
push dword [ebp - 0x258]
mov eax, dword [ebp - 0x260]
inc eax
push eax
push ebx
call sub.msvcrt.dll_wcscpy_s
add esp, 0xc
test eax, eax
jne 0x10001841
mov eax, edi
sub eax, esi
inc eax
push 0x10001604
push eax
mov eax, dword [ebp - 0x264]
lea eax, [eax + esi*2]
push eax
call sub.msvcrt.dll_wcscpy_s
add esp, 0xc
test eax, eax
jne 0x10001841
mov eax, dword [ebp - 0x25c]
sub edi, esi
push 0x100015e4
inc edi
lea eax, [eax + esi*2]
push edi
push eax
call sub.msvcrt.dll_wcscpy_s
add esp, 0xc
test eax, eax
jne 0x10001841
mov eax, dword [ebp - 0x260]
sub eax, esi
inc eax
push 0x100015b8
push eax
lea eax, [ebx + esi*2]
push eax
call sub.msvcrt.dll_wcscpy_s
add esp, 0xc
test eax, eax
jne 0x10001841
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x264]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x10001841
mov edi, dword [sym.imp.KERNEL32.dll_FindClose]
push eax
call edi
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x10001841
push eax
call edi
lea eax, [ebp - 0x254]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
push ebx
mov dword [ebp - 0x260], eax
call dword [sym.imp.msvcrt.dll_free]
xor ebx, ebx
cmp dword [ebp - 0x260], 0xffffffff
pop ecx
je 0x10001841
push dword [ebp - 0x260]
call edi
lea eax, [ebp - 0x228]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x10001a09
sub eax, edx
sar eax, 1
lea edi, [eax + esi + 2]
lea eax, [edi + edi + 2]
push eax
call dword [sym.imp.msvcrt.dll_malloc]
mov ebx, eax
pop ecx
test ebx, ebx
je 0x10001841
push dword [ebp - 0x258]
lea eax, [edi + 1]
push eax
push ebx
call sub.msvcrt.dll_wcscpy_s
add esp, 0xc
test eax, eax
jne 0x10001841
push 0x5c
pop ecx
lea eax, [ebx + esi*2]
mov word [eax], cx
lea ecx, [ebp - 0x228]
push ecx
sub edi, esi
add eax, 2
push edi
push eax
call sub.msvcrt.dll_wcscpy_s
add esp, 0xc
test eax, eax
jne 0x10001841
mov eax, dword [ebp - 0x258]
mov ecx, dword [ebp - 0x268]
mov dword [ecx], eax
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 0x274]
mov dword [ecx], eax
mov eax, dword [ebp - 0x25c]
mov ecx, dword [ebp - 0x270]
mov dword [ecx], eax
mov eax, dword [ebp - 0x26c]
mov dword [eax], ebx
mov al, 1
jmp 0x10001ab3
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10003373
leave
ret 0x10