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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x6a8
mov eax, dword [0x1072c48]
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.010561ca
test eax, eax
je 0x1059ebd
mov eax, dword [ebp + 0x10]
push edi
push 0x100a4f4
xor esi, esi
push 4
mov dword [ebp - 0x698], esi
mov dword [ebp - 0x6a4], eax
xor ebx, ebx
call fcn.01055c69
add esp, 0xc
mov dword [ebp - 0x6a0], 1
jmp 0x1059c11
xor esi, esi
inc dword [ebp - 0x6a0]
cmp dword [ebp - 0x6a4], esi
je 0x1059cf8
mov esi, 0x208
push esi
lea eax, [ebp - 0x48c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x1059e98
push 0x100a4d8
push esi
lea eax, [ebp - 0x48c]
push eax
call fcn.01035886
lea eax, [ebp - 0x48c]
push eax
call fcn.010561ca
test eax, eax
je 0x1059ccf
push 0x3c
lea eax, [ebp - 0x7c]
push eax
push edi
call fcn.010581a3
cmp dword [ebp + 0xc], 0
mov eax, 0x100a4cc
jne 0x1059c7c
mov eax, 0x100a4b8
push eax
push esi
lea eax, [ebp - 0x48c]
push eax
call fcn.01035886
push edi
push esi
lea eax, [ebp - 0x48c]
push eax
call fcn.01035886
push 0x100a4b4
push esi
lea eax, [ebp - 0x48c]
push eax
call fcn.01035886
lea eax, [ebp - 0x48c]
push eax
lea eax, [ebp - 0x7c]
push eax
call fcn.01059719
xor ecx, ecx
test eax, eax
setge cl
mov dword [ebp - 0x698], ecx
test ecx, ecx
jne 0x1059e9f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1059ce3
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
push ebx
push edi
push 0x100a470
push 2
call fcn.01055c69
jmp 0x1059e75
push esi
mov dword [ebp - 0x6a8], esi
call dword [sym.imp.ole32.dll_OleInitialize]
mov ebx, eax
cmp ebx, esi
jl 0x1059ea7
lea eax, [ebp - 0x284]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x1059d68
push edi
push 0x103
lea eax, [ebp - 0x694]
push eax
call fcn.01035811
lea eax, [ebp - 0x694]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
pop ecx
pop ecx
cmp eax, esi
je 0x1059d68
xor ecx, ecx
mov word [eax], cx
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 0x1059d6d
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
pop ecx
test edi, edi
je 0x1059e14
push esi
push edi
push dword [ebp - 0x69c]
call fcn.010582d2
push 8
push 0
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov esi, eax
cmp esi, 0x20
jbe 0x1059df0
cmp dword [ebp + 0xc], 0
mov eax, 0x100a458
jne 0x1059dca
mov eax, 0x100a444
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1059de7
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 0x1059e0d
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1059dff
push 0x57
pop eax
test eax, eax
jle 0x1059e0b
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 0x1059e2a
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 0x1059eb0
test ebx, ebx
jne 0x1059e5c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1059e51
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
test ebx, ebx
jne 0x1059e5c
mov ebx, 0x80004005
push ebx
push dword [ebp - 0x69c]
push 0x100a408
push 2
call fcn.01055c69
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 0x1059c0f
jmp 0x1059ee6
mov ebx, 0x80004005
jmp 0x1059ee6
push edi
push 0x100a3cc
jmp 0x1059edc
push ebx
push 0x1009edc
push esi
jmp 0x1059ede
push dword [ebp - 0x69c]
push 0x100a398
jmp 0x1059edc
cmp dword [ebp + 0xc], 0
je 0x1059ed6
push esi
push edi
push 0x100a358
push 2
call fcn.01055c69
add esp, 0x10
jmp 0x1059ee6
push edi
push 0x100a328
push 4
call fcn.01055c69
add esp, 0xc
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.01047464
leave
ret 0xc