Function at 0x105aed9
Capabilities:
Get common file path
Set current directory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x6a8
mov eax, dword [0x107fa78]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, 0x80070002
push edi
mov dword [ebp - 0x69c], edi
mov ebx, esi
call fcn.01056f43
test eax, eax
je 0x105b1ea
mov eax, dword [ebp + 0x10]
push edi
push 0x100aab4
xor esi, esi
push 4
mov dword [ebp - 0x698], esi
mov dword [ebp - 0x6a4], eax
xor ebx, ebx
call fcn.0105e5ad
add esp, 0xc
mov dword [ebp - 0x6a0], 1
jmp 0x105af40
xor esi, esi
inc dword [ebp - 0x6a0]
cmp dword [ebp - 0x6a4], esi
je 0x105b027
mov esi, 0x208
push esi
lea eax, [ebp - 0x48c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x105b1c5
push 0x100aa98
push esi
lea eax, [ebp - 0x48c]
push eax
call fcn.01034cee
lea eax, [ebp - 0x48c]
push eax
call fcn.01056f43
test eax, eax
je 0x105affe
push 0x3c
lea eax, [ebp - 0x7c]
push eax
push edi
call fcn.01059119
cmp dword [ebp + 0xc], 0
mov eax, 0x100aa8c
jne 0x105afab
mov eax, 0x100aa78
push eax
push esi
lea eax, [ebp - 0x48c]
push eax
call fcn.01034cee
push edi
push esi
lea eax, [ebp - 0x48c]
push eax
call fcn.01034cee
push 0x100aa74
push esi
lea eax, [ebp - 0x48c]
push eax
call fcn.01034cee
lea eax, [ebp - 0x48c]
push eax
lea eax, [ebp - 0x7c]
push eax
call fcn.0105aa51
xor ecx, ecx
test eax, eax
setge cl
test ecx, ecx
mov dword [ebp - 0x698], ecx
jne 0x105b1cc
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x105b012
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
push ebx
push edi
push 0x100aa30
push 2
call fcn.0105e5ad
jmp 0x105b1a2
push esi
mov dword [ebp - 0x6a8], esi
call dword [sym.imp.ole32.dll_OleInitialize]
mov ebx, eax
cmp ebx, esi
jl 0x105b1d4
lea eax, [ebp - 0x284]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x105b095
push edi
push 0x103
lea eax, [ebp - 0x694]
push eax
call fcn.01034c79
lea eax, [ebp - 0x694]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
cmp eax, esi
pop ecx
pop ecx
je 0x105b095
mov word [eax], si
lea eax, [ebp - 0x694]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov dword [ebp - 0x6a8], 1
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x105b09a
sub eax, edx
sar eax, 1
lea esi, [eax + 5]
xor ecx, ecx
push 2
pop edx
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
mov edi, eax
test edi, edi
pop ecx
je 0x105b141
push esi
push edi
push dword [ebp - 0x69c]
call fcn.01059240
push 8
push 0
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov esi, eax
cmp esi, 0x20
jbe 0x105b11d
cmp dword [ebp + 0xc], 0
mov eax, 0x100aa18
jne 0x105b0f7
mov eax, 0x100aa04
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x105b114
call eax
mov ebx, eax
xor eax, eax
test ebx, ebx
setge al
mov dword [ebp - 0x698], eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x105b13a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x105b12c
push 0x57
pop eax
test eax, eax
jle 0x105b138
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
push edi
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
cmp dword [ebp - 0x6a8], 0
je 0x105b157
lea eax, [ebp - 0x284]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call dword [sym.imp.ole32.dll_OleUninitialize]
cmp dword [ebp - 0x698], 0
jne 0x105b1dd
test ebx, ebx
jne 0x105b189
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x105b17e
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
test ebx, ebx
jne 0x105b189
mov ebx, 0x80004005
push ebx
push dword [ebp - 0x69c]
push 0x100a9c8
push 2
call fcn.0105e5ad
mov edi, dword [ebp - 0x69c]
xor eax, eax
add esp, 0x10
cmp dword [ebp - 0x6a4], eax
sete al
cmp dword [ebp - 0x6a0], 2
mov dword [ebp - 0x6a4], eax
jl 0x105af3e
jmp 0x105b213
mov ebx, 0x80004005
jmp 0x105b213
push edi
push 0x100a98c
jmp 0x105b209
push ebx
push 0x100a3f4
push esi
jmp 0x105b20b
push dword [ebp - 0x69c]
push 0x100a958
jmp 0x105b209
cmp dword [ebp + 0xc], 0
je 0x105b203
push esi
push edi
push 0x100a918
push 2
call fcn.0105e5ad
add esp, 0x10
jmp 0x105b213
push edi
push 0x100a8e8
push 4
call fcn.0105e5ad
add esp, 0xc
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.01047417
leave
ret 0xc