Function at 0x1059bcb
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.010561eb
test eax, eax
je 0x1059ede
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.01055c8a
add esp, 0xc
mov dword [ebp - 0x6a0], 1
jmp 0x1059c32
xor esi, esi
inc dword [ebp - 0x6a0]
cmp dword [ebp - 0x6a4], esi
je 0x1059d19
mov esi, 0x208
push esi
lea eax, [ebp - 0x48c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x1059eb9
push 0x100a4d8
push esi
lea eax, [ebp - 0x48c]
push eax
call fcn.010358a6
lea eax, [ebp - 0x48c]
push eax
call fcn.010561eb
test eax, eax
je 0x1059cf0
push 0x3c
lea eax, [ebp - 0x7c]
push eax
push edi
call fcn.010581c4
cmp dword [ebp + 0xc], 0
mov eax, 0x100a4cc
jne 0x1059c9d
mov eax, 0x100a4b8
push eax
push esi
lea eax, [ebp - 0x48c]
push eax
call fcn.010358a6
push edi
push esi
lea eax, [ebp - 0x48c]
push eax
call fcn.010358a6
push 0x100a4b4
push esi
lea eax, [ebp - 0x48c]
push eax
call fcn.010358a6
lea eax, [ebp - 0x48c]
push eax
lea eax, [ebp - 0x7c]
push eax
call fcn.0105973a
xor ecx, ecx
test eax, eax
setge cl
mov dword [ebp - 0x698], ecx
test ecx, ecx
jne 0x1059ec0
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1059d04
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
push ebx
push edi
push 0x100a470
push 2
call fcn.01055c8a
jmp 0x1059e96
push esi
mov dword [ebp - 0x6a8], esi
call dword [sym.imp.ole32.dll_OleInitialize]
mov ebx, eax
cmp ebx, esi
jl 0x1059ec8
lea eax, [ebp - 0x284]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x1059d89
push edi
push 0x103
lea eax, [ebp - 0x694]
push eax
call fcn.01035831
lea eax, [ebp - 0x694]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
pop ecx
pop ecx
cmp eax, esi
je 0x1059d89
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 0x1059d8e
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 0x1059e35
push esi
push edi
push dword [ebp - 0x69c]
call fcn.010582f3
push 8
push 0
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov esi, eax
cmp esi, 0x20
jbe 0x1059e11
cmp dword [ebp + 0xc], 0
mov eax, 0x100a458
jne 0x1059deb
mov eax, 0x100a444
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1059e08
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 0x1059e2e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1059e20
push 0x57
pop eax
test eax, eax
jle 0x1059e2c
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 0x1059e4b
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 0x1059ed1
test ebx, ebx
jne 0x1059e7d
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1059e72
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
test ebx, ebx
jne 0x1059e7d
mov ebx, 0x80004005
push ebx
push dword [ebp - 0x69c]
push 0x100a408
push 2
call fcn.01055c8a
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 0x1059c30
jmp 0x1059f07
mov ebx, 0x80004005
jmp 0x1059f07
push edi
push 0x100a3cc
jmp 0x1059efd
push ebx
push 0x1009edc
push esi
jmp 0x1059eff
push dword [ebp - 0x69c]
push 0x100a398
jmp 0x1059efd
cmp dword [ebp + 0xc], 0
je 0x1059ef7
push esi
push edi
push 0x100a358
push 2
call fcn.01055c8a
add esp, 0x10
jmp 0x1059f07
push edi
push 0x100a328
push 4
call fcn.01055c8a
add esp, 0xc
mov ecx, dword [ebp - 4]
pop edi
pop esi
invalid