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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x6a8
mov eax, dword [0x1046190]
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.010326f3
test eax, eax
je 0x1035124
mov eax, dword [ebp + 0x10]
push edi
push 0x1007224
xor esi, esi
push 4
mov dword [ebp - 0x698], esi
mov dword [ebp - 0x6a4], eax
xor ebx, ebx
call fcn.01036b8b
add esp, 0xc
mov dword [ebp - 0x6a0], 1
jmp 0x1034e7a
xor esi, esi
inc dword [ebp - 0x6a0]
cmp dword [ebp - 0x6a4], esi
je 0x1034f61
mov esi, 0x208
push esi
lea eax, [ebp - 0x48c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x10350ff
push 0x1007208
push esi
lea eax, [ebp - 0x48c]
push eax
call fcn.01028adc
lea eax, [ebp - 0x48c]
push eax
call fcn.010326f3
test eax, eax
je 0x1034f38
push 0x3c
lea eax, [ebp - 0x7c]
push eax
push edi
call fcn.01033c10
cmp dword [ebp + 0xc], 0
mov eax, 0x10071fc
jne 0x1034ee5
mov eax, 0x10071e8
push eax
push esi
lea eax, [ebp - 0x48c]
push eax
call fcn.01028adc
push edi
push esi
lea eax, [ebp - 0x48c]
push eax
call fcn.01028adc
push 0x10071e4
push esi
lea eax, [ebp - 0x48c]
push eax
call fcn.01028adc
lea eax, [ebp - 0x48c]
push eax
lea eax, [ebp - 0x7c]
push eax
call fcn.01034d13
xor ecx, ecx
test eax, eax
setge cl
test ecx, ecx
mov dword [ebp - 0x698], ecx
jne 0x1035106
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1034f4c
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
push ebx
push edi
push 0x10071a0
push 2
call fcn.01036b8b
jmp 0x10350dc
push esi
mov dword [ebp - 0x6a8], esi
call dword [sym.imp.ole32.dll_OleInitialize]
mov ebx, eax
cmp ebx, esi
jl 0x103510e
lea eax, [ebp - 0x284]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x1034fcf
push edi
push 0x103
lea eax, [ebp - 0x694]
push eax
call fcn.01028a67
lea eax, [ebp - 0x694]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
cmp eax, esi
pop ecx
pop ecx
je 0x1034fcf
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 0x1034fd4
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 0x103507b
push esi
push edi
push dword [ebp - 0x69c]
call fcn.01033c97
push 8
push 0
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov esi, eax
cmp esi, 0x20
jbe 0x1035057
cmp dword [ebp + 0xc], 0
mov eax, 0x1007188
jne 0x1035031
mov eax, 0x1007174
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x103504e
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 0x1035074
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1035066
push 0x57
pop eax
test eax, eax
jle 0x1035072
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 0x1035091
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 0x1035117
test ebx, ebx
jne 0x10350c3
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10350b8
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
test ebx, ebx
jne 0x10350c3
mov ebx, 0x80004005
push ebx
push dword [ebp - 0x69c]
push 0x1007138
push 2
call fcn.01036b8b
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 0x1034e78
jmp 0x103514d
mov ebx, 0x80004005
jmp 0x103514d
push edi
push 0x10070fc
jmp 0x1035143
push ebx
push 0x1006da4
push esi
jmp 0x1035145
push dword [ebp - 0x69c]
push 0x10070c8
jmp 0x1035143
cmp dword [ebp + 0xc], 0
je 0x103513d
push esi
push edi
push 0x1007088
push 2
call fcn.01036b8b
add esp, 0x10
jmp 0x103514d
push edi
push 0x1007058
push 4
call fcn.01036b8b
add esp, 0xc
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.01031a01
leave
ret 0xc